Level: Introductory Bilal Siddiqui (wap_monster@yahoo.com), CEO, WAP Monster
01 Sep 2002 In this article, Bilal will start with a discussion of the evolution of SOAP, present a list of major SOAP interoperability issues and their details, and create a guideline to develop better interoperable Web services. Bilal will also cover the details of using datatypes in SOAP.
This article is the third in a series of four articles (see Resources) aimed at introducing the process of creating, describing and publishing Web services. In the first part, I explained how to describe a Web service with the help of WSDL authoring examples. In the second part, I discussed the architecture of SOAP and its semantics. In this installment, I'll take a look at the interoperability issues related to SOAP.
The Web services model divides the entire B2B spectrum into three steps or domains: describe a service, bind it with a concrete implementation, and publish it over a registry. These three steps are independent of one another and give rise to separate interoperability issues. WSDL (Web Services Description Language) constitutes the description domain, SOAP covers the binding domain, and Universal Description, Discovery and Integration (UDDI) registries cover the publishing domain. My discussion in this part will be limited to the interoperability issues related to the binding domain. I will start by describing the evolution of SOAP, which will follow the actual SOAP interoperability issues. Evolution of SOAP versions
The W3C started work on the SOAP specification in 1999 at a time when the XML Schema specification was still evolving and was identified as a key part of the SOAP specification. SOAP uses XML Schema datatype definitions to define and instantiate data types in SOAP. SOAP 1.1 was released in May 2000 as a W3C Note (Resources). This was a combined effort of developers from Microsoft, IBM, Lotus Development, and UserLand Software, Inc. SOAP 1.1 adopted the Working Draft of XML Schema with the 1999 namespace URI ("http://www.w3.org/1999/XMLSchema"). Currently SOAP 1.2 (Resources) is very near becoming a Candidate Recommendation and it has adopted the XML Schema Recommendation (May 2001) and the 2001 namespace URI ("http://www.w3.org/2001/XMLSchema")
for XML Schema.
Interoperability issues
I'll start with transport (HTTP) based SOAP interoperability issues. 1. Transport
The SOAP 1.1 specification allows a SOAP message to be sent within an HTTP request. As described in Part 2 (Resources), SOAP integrates with HTTP without affecting its semantics. The SOAP specification adds the mandatory SOAPAction header to the HTTP request header. As I have described in the previous installment, that SOAPAction header can legally take three kinds of values:
- tt can be null
- it can be an empty quoted string
- it can also be an arbitrary UR
This flexibility allows SOAP implementations to choose their style of SOAPAction header and its functionality. But this flexibility has given rise to interoperability issues. In order to study these interoperability issues, I created a SOAP client (Resources) that sends a request to the SOAP server (specified by the URL parameter) and displays the server response on receipt. I sent simple SOAP requests to different servers while changing the value of the SOAPAction header and viewed how they support the three kinds of header allowed by the SOAP 1.1 specification. My tests followed the SOAPBuilders' Round 2 (Base) echoString test (Resources), except for the SOAPAction header (which I manipulated). You should visit SOAPBuilders' Round 2 site for the WSDL file (base tests) that describes the test Web Service that I will invoke during the execution of my tests.  |
SOAP servers tested
I tested the following SOAP servers in this article:
- Apache Axis SOAP Server
- Apache SOAP 2.2 Server
- WhiteMesa 2.7 SOAP Server
- IONA XMLBus
- SOAP::Lite
- EasySOAP++
- 4S4C
- Microsoft ASP.NET Web Services
|
|
I used four SOAP requests in my test.
-
Listing 1 contains the SOAP request with the value of
SOAPAction the header in double quotes. The value of the SOAPAction header is the same as that given in the WSDL file ("http://soapinterop.org/").
-
Listing 2 contains the same
SOAPAction header value, but without double quotes (http://soapinterop.org/).
-
Listing 3 contains a
SOAPAction header that is different from the one given in the WSDL file ("http://differentfromwsdl.org/").
-
Listing 4 specifies a null value for the
SOAPAction header.
I sent Listing 1 to the WhiteMesa SOAP Server 2.7 which responded with a successful response, showing that such a SOAPAction header can be successfully processed by WhiteMesa. Next I sent Listing 2 to WhiteMesa, which again processed it successfully. Finally, when I changed the value of the SOAPAction header to "http://differentfromwsdl.org/" (Listing 3) WhiteMesa failed to process the request and returned a fault response. The fault String was "Unrecognized 'SOAPAction' HTTP header received.". The WhiteMesa SOAP Serve 2.7 also returned a fault response against the request in Listing 4 in which the SOAPAction value is null. I also tested Listings 1, 3 and 4 with IONA XMLBus and SOAP::Lite, which successfully processed the request in Listing 1 but returned fault messages against the requests in Listings 3 and 4. IONA XMLBus returned a fault response against Listing 2 (unquoted URI) as well, pointing out that it expects the SOAPAction header in requests to be the same as defined in the WSDL file and double quoted. Next I sent the requests in Listings 1, 3 and 4 to Easy SOAP++ 0.6, which returned correct responses. Apache Axis and Apache SOAP 2.2 returned correct responses irrespective of the SOAPAction header value.
Conclusion
For maximum interoperability, I recommend quoting the SOAPAction header value; it should conform to the WSDL file.
2. XML
XML Schema
This section describes the behavior of various SOAP servers against the different XML Schema versions used in authoring SOAP requests. I will examine the results of tests carried out using the test client against the XML schema namespace URI support in different SOAP servers.
Listing 1 and Listing 5 are identical SOAP requests but differ only in the version of XML Schema used. Listing 1 uses the 2001 XML Schema URI, while Listing 5 uses the 1999 URI. I conducted the namespace URI support test with a number of servers and found that IONA XMLBus failed with the 1999 URI, but returned a successful response to the request in Listing 1 which uses the 2001 URI. Therefore, the support in IONA XMLBus is restricted to the 2001 XML Schema namespace URI. I can safely say that the 2001 URI will work with most of the implementations, but the older implementations such as IBM SOAP Toolkit and Apache SOAP are still around and they use the 1999 URI. Apache SOAP 2.2 accepts both 1999 and 2001 URIs but it uses the 1999 URI by default in response messages (although it does allow you to change it to 2001). Therefore you can expect clients that only look for the 2001 URI (such as IONA XMLBus) will have interoperability problems with old SOAP implementations.
Conclusion
Perhaps the best practice for XML Schema namespace URI will be to use the 2001 URI in requests as this is soon to be the standard (the SOAP 1.2 specification) and is widely supported by current SOAP implementations.  |
Wire type dependency vs. WSDL awareness
SOAP 1.1 allows for implementations to provide type information about the data that is contained in a message. This is a literal description of the data (for example, int, string etc.). Some implementations depend on this information to properly de-serialize the data in a message. Apache SOAP 2.2 is one of those implementations that need explicit typing information on the wire (that is, datatype information provided as an attribute value of the element containing the data); otherwise it fails to de-serialize the data.
I have already discussed the semantics of WSDL files in Part 1 (Resources). A WSDL file is used to describe a Web service. It contains information about the methods exposed by the Web service and their signatures. Since the WSDL file contains information on what parameters could go into a method and what to expect in return, this information can be used to de-serialize a SOAP request which invokes a method and its response. Therefore the solution to the above problem is WSDL file awareness; that is, the runtime application that is de-serializing a SOAP message is able to make use of the datatype information present in the WSDL file.
Most implementations are now WSDL aware and do not depend on typing on the wire. Apache Axis can process data without typing on the wire and so can White Mesa 2.7; but there is an interoperability issue present here. White Mesa 2.7 cannot process a request if the element names are not the same as specified in the WSDL file. That is the case with many other implementations. But on the other hand, Apache Axis is capable of processing such a request without raising a fault. So if you write such a request for Apache Axis it won't run on White Mesa 2.7. It is probably a better practice to write requests and responses that conform to the WSDL file for the service. That will work with all WSDL aware implementations.
|
|
3. Datatypes
Datatype compatibility is perhaps the most important issue in SOAP interoperability. If two applications cannot understand each other's datatypes, they cannot perform a meaningful exchange of data and therefore cannot interoperate. Datatypes have already been introduced in the second article in this series, where I talked about a few simple and complex datatypes. SOAP uses the XML Schema datatypes and structures to identify the type of data carried in a SOAP message. Data posted using SOAP first gets serialized; that is, the data value is converted in to a string to travel within an XML document. At the destination, this string must be de-serialized, that is, converted back into a datatype that represents the original value. It is up to the SOAP implementations to map XML Schema datatypes onto the appropriate native datatype. A problem may arise if the two native datatypes do not conform, that is, when the same datatype in XML will have different values (and therefore, different meanings) in different implementations. It is very important that the data remains consistent after serialization and de-serialization. I'll discuss this issue in detail.
Float
A common problem with float occurs with the representation of infinity. XML Schema represents infinity with the string INF. Listing 6 sends INF as float infinity in the request, which is returned as Infinity by Apache SOAP 2.2 server whereas Apache Axis returns INF (Listing 7). I also tested MS SOAP Toolkit 3.0 server, by sending the SOAP request of Listing 6. It returned a server side fault code and was unable to de-serialize the float infinity value INF as indicated by the fault string "SoapMapper:Converting data for SoapMapper failed inside the typemapper". Another problem is with float precision support. I sent 1.23456789E38 as float to a few SOAP servers (refer to Listing 9). IONA XMLBus returned 1.23456789E38, White Mesa 2.7 server which returned 1.234568E38 and MS SOAP ToolKit 3.0 server returned 1.23456786051167E+38. Although this points to the fact that the implementations are interoperating, they are still unable to reproduce the data as its original value.
Decimal
For decimal, the minimum number of digits required by the XML Schema specification to be supported by implementations is 18 digits. Since no upper limit is defined in the specification, implementations are free to set it on their own. Microsoft ASP.NET Web Services and WhiteMesa 2.7 give a precision up to 28 digits and Apache Axis can literally support hundreds of digits. This difference in support means that when an Apache Axis implementation sends some decimal number greater than 28 digits in size to WhiteMesa 2.7 implementation, the extra precision will be truncated thereby making the data inconsistent. I sent the decimal number request in Listing 9 (which holds a very large decimal number) to see precision support of different servers. The response from ASP.NET server, Apache Axis and WhiteMesa 2.7 can be viewed in Listings 10, 11 and 12 respectively. The 4S4C server returned a value of 1.235 in response to Listing 9.
DateTime
The datatype for time and date information in XML Schema is dateTime . White Mesa 2.7 gives precision in seconds. Apache SOAP 2.2 and Apache Axis use the java.util.Date class to represents a specific instance in time with millisecond precision. Microsoft ASP.NET Web Services uses the Date type which can represent time with precision in nanoseconds. Now if a .NET based SOAP client side implementation sends dateTime information to a SOAP 2.2 implementation or to a White Mesa 2.7 implementation, the extra precision in dateTime will be lost leading to data inconsistency. Note that a precision into seconds is mandatory in XML Schema but fractional seconds are optional and legal. I conducted the dateTime tests with the request in Listing 13. The responses from Microsoft ASP.NET Web Services, Apache Axis, WhiteMesa 2.7 and SOAP::Lite are displayed in Listings 14, 15, 16 and 17 respectively.
Byte Array
SOAP allows you to exchange data in the form of byte arrays. The byte array must be base64 encoded before it is placed within an XML document. Many implementations have failed the echoBase64 test in Round 2 (Base) interoperability tests at SOAPBuilder (Resources). Some implementations have returned inconsistent values because of a difference in native datatype formats. Some have returned the value by further base64 encoding the already encoded base64 value. The requests in Listing 18 (using 1999 XML Schema base64Binary datatype) and Listing 19 (using 2001 Schema base64Binary datatype) send a simple echoBase64 method call to SOAP servers. Apache SOAP 2.2 returned fault messages in response to both Listing 18 and Listing 19. The server was unable to recognize the datatype in either case and thus failed to de-serialize the base 64 encoded byte array. Have a look at Listing 20, which specifies base64 as the datatype encoding. The base64 encoding is defined by the SOAP 1.1 specifications, as compared to the base64Binary datatype defined by the XML Schema specifications. Apache SOAP 2.2 successfully processed the request of Listing 20. IONA XMLBus successfully processed 19 but failed with 18 (recall the section on XML Schema issues where I found that IONA XMLBus only support the 2001 XML Schema URI). It also failed to recognize the SOAP-ENC:base64 datatype instance in the request in Listing 20 and returned a fault string. It is evident from the above tests that Apache SOAP 2.2 and IONA XMLBus have interoperability issue between them when exchanging base 64 encoded byte arrays.
Arrays
Data in the form of arrays has been a tough test for implementations, especially when matters are complicated with scenarios that use nested arrays, multidimensional arrays and nested structs. A struct is a complex user defined datatype that may contain simple or further complex datatypes. Readers with C Language programming experience might want to draw an analogy between a C struct and an XML Schema struct. There are an infinite number of ways to combine single and multidimensional arrays with other datatypes in structs. Therefore, I devised a number of SOAP requests to test the behavior of different SOAP servers. The tests follow the SOAPBuilders' Round 2 (Group B) test suite. The WSDL file for Group B tests is available at SOAPBuilders' Round 2 Web site.
-
Listing 21 contains a simple array of
strings.
-
Listing 22 contains an array of
structs. The struct contains a string, a float and an int datatype.
-
Listing 23 contains a two-dimensional array of
strings.
-
Listing 24 defines an off-set (a value that defines the position from which the array should be processed) for the two-dimensional array.
-
Listing 25 contains a
struct with a nested array of strings.
-
Listing 26 contains a 2-D array without the innermost dimension size specified.
All of the SOAP implementations I tested had no problem with simple type and complex type arrays that is, Listing 21 and Listing 22. The WhiteMesa 2.7 server was tested with Listings 21, 22, 23, 24, 25 and 26. It successfully processed all the requests, although it failed to process Listing 25
only when the offset value was specified (greater than zero). White Mesa 2.7 has shown the ability to process 2D arrays when the size of the innermost dimension is not specified (Listing 26). I sent the request in Listing 23 to SOAP::Lite which was unable to process it and returned a fault response with the fault string "Not implemented, because SOAP::Lite does not generate multidimensional arrays (yet accepts ;))". The request in Listing 26 which was successfully processed by WhiteMesa was not processed by many other implementations; SOAP::Lite and Apache Axis returned fault messages.
Conclusion
Data exchange that includes the exchange of arrays and their different combinations is possible with most of the SOAP implementations with a few exceptions that I have identified above. In order to ensure maximum interoperability and data consistency, Web services developers should write comprehensive data tests comprising all possible variations of expected data patterns as that may bring out resolvable issues and confirm application and data consistency. Miscellaneous
There are other areas in SOAP that can introduce interoperability problems. They can surface due to an engine's inability to process the mustUnderstand SOAP headers. SOAP functionality can be extended through custom headers. This extensibility also opens the route for proprietary and non-standard solutions which may ultimately create interoperability issues. SOAP allows the use of multiple return parameters which are not supported by some implementations (for example, Apache SOAP 2.2). Encoding schema describes the rules that are followed to serialize and de-serialize data to and from XML. Unfortunately SOAP 1.1 does not specify a default encoding for SOAP messages although it does propose one. SOAP implementers are not bound by the specification to implement the specification-defined encoding in order to conform. The lack of a default encoding schema can lead to interoperability problems.
Final words
Now I can offer a little advice for developers who are planning to build Web services on present SOAP implementations or who are on their way writing their own SOAP servers and clients.
- If you are planning to work with SOAP 1.1 implementations, keep the
SOAPAction header quoted in your requests and be sure it conforms to the service's WSDL file.
- Adopt the 2001 namespace URI for XML Schema as it is the de facto standard now.
- Comply with the encoding defined by SOAP 1.1 and ensure that data that you send and receive is really what it should be.
- Your method element names should conform to the WSDL description.
- Provide datatype information on the wire in SOAP messages.
Listing 1. SOAP request with SOAPAction value"http://soapinterop.org/".
POST /endpoint HTTP/1.1
Host:host-URL
Content-Type: "text/xml"; Charset="utf-8"
SOAPAction: "http://soapinterop.org/"
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:echoString xmlns:ns1="http://soapinterop.org/">
<inputString xsi:type="xsd:string">
A Test String
</inputString>
</ns1:echoString>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 2. SOAP request with SOAPAction value (unquoted) http://soapinterop.org/.
POST /endpoint HTTP/1.1
Host:host-URL
Content-Type: "text/xml"; Charset="utf-8"
SOAPAction: http://soapinterop.org/
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:echoString xmlns:ns1="http://soapinterop.org/">
<inputString xsi:type="xsd:string">
A Test String
</inputString>
</ns1:echoString>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 3. SOAP request with SOAPAction value "http://differentfromwsdl.org/".
POST /endpoint HTTP/1.1
Host:host-URL
Content-Type: "text/xml"; Charset="utf-8"
SOAPAction: "http://differentfromwsdl.org/"
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:echoString xmlns:ns1="http://soapinterop.org/">
<inputString xsi:type="xsd:string">
A Test String
</inputString>
</ns1:echoString>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 4. SOAP request with a null SOAPAction value.
POST /endpoint HTTP/1.1
Host:host-URL
Content-Type: "text/xml"; Charset="utf-8"
SOAPAction:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:echoString xmlns:ns1="http://soapinterop.org/">
<inputString xsi:type="xsd:string">
A Test String
</inputString>
</ns1:echoString>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 5. SOAP request with the 1999 namespace URI for XML Schema.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:echoString xmlns:ns1="http://soapinterop.org/">
<inputString xsi:type="xsd:string">
A Test String
</inputString>
</ns1:echoString>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 6. SOAP request with 'INF'as float infinity.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:echoFloat xmlns:ns1="http://soapinterop.org/">
<inputFloat xsi:type="xsd:float">INF</inputFloat>
</ns1:echoFloat>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 7. Response from Apache Axis server for the request in Listing 6.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:echoFloatResponse
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://soapinterop.org/">
<echoFloatReturn xsi:type="xsd:float">INF</echoFloatReturn>
</ns1:echoFloatResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 8. SOAP request to test a float value with SOAP servers.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:echoFloat xmlns:ns1="http://soapinterop.org/">
<inputFloat xsi:type="xsd:float">1.23456789E38</inputFloat>
</ns1:echoFloat>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 9. A large decimal number SOAP request.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:echoDecimal xmlns:ns1="http://soapinterop.org/">
<inputDecimal xsi:type="xsd:decimal">
0.123456789123456789123456789123456789
</inputDecimal>
</ns1:echoDecimal>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 10. SOAP Response from Microsoft's ASP.NET Web Services for the request in Listing 9.
HTTP/1.0 200 OK
Server: Microsoft-IIS/5.0
Date: Sat, 29 Jun 2002 09:05:39 GMT
X-Powered-By: ASP.NET X-AspNet-Version: 1.0.4221
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 568
X-Cache: MISS from cache-L7.wol.net.pk
Connection: keep-alive
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://soapinterop.org/" xmlns:types="http://soapinterop.org/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<types:echoDecimalResponse>
<return xsi:type="xsd:decimal">
0.1234567891234567891234567891
</return>
</types:echoDecimalResponse>
</soap:Body>
</soap:Envelope>
|
Listing 11. SOAP Response from Apache Axis for the request in Listing 9.
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Date: Sat, 29 Jun 2002 09:09:07 GMT
Transfer-Encoding: chunked
Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector)
1fc
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:echoDecimalResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://soapinterop.org/">
<return xsi:type="xsd:decimal">
0.123456789123456789123456789123456789
</return>
</ns1:echoDecimalResponse>
</soapenv:Body>
</soapenv:Envelope>
0
|
Listing 12. SOAP Response from WhiteMesa 2.7 for the request in Listing 9.
HTTP/1.0 200 OK
Date: Sat, 29 Jun 2002 09:36:29 GMT
Server: WhiteMesa SOAP Server/2.7
Content-Type: text/xml; charset="utf-8"
Content-Length: 362
X-Cache: MISS from cache-L3.wol.net.pk
Connection: keep-alive
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<m:echoDecimalResponse
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:m="http://soapinterop.org/">
<return>
0.1234567891234567891234567891
</return>
</m:echoDecimalResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 13. SOAP dataTime datatype request.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:echoDate xmlns:ns1="http://soapinterop.org/">
<inputDate xsi:type="xsd:dateTime">
1956-10-18T22:20:00.1234567
</inputDate>
</ns1:echoDate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 14. Response from Microsoft ASP.NET Web Services for the request in Listing 13.
HTTP/1.0 200 OK Server: Microsoft-IIS/5.0
Date: Sat, 29 Jun 2002 07:50:58 GMT
X-Powered-By: ASP.NET X-AspNet-Version: 1.0.4221
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 566
X-Cache: MISS from malhitest
Connection: keep-alive
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:echoDate xmlns:ns1="http://soapinterop.org/">
<inputDate xsi:type="xsd:dateTime">
1956-10-18T22:20:00.1234567
</inputDate>
</ns1:echoDate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 15. Response from Apache Axis for the request in Listing 13.
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Date: Sat, 29 Jun 2002 09:09:01 GMT
Transfer-Encoding: chunked
Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector)
1e9
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:echoDateResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://soapinterop.org/">
<return xsi:type="xsd:dateTime">
1956-10-18T22:20:00.123Z
</return>
</ns1:echoDateResponse>
</soapenv:Body>
</soapenv:Envelope>
0
|
Listing 16. Response from WhiteMesa 2.7 for the request in Listing 13.
HTTP/1.0 200 OK
Date: Sat, 29 Jun 2002 09:16:09 GMT
Server: WhiteMesa SOAP Server/2.7
Content-Type: text/xml; charset="utf-8"
Content-Length: 346
X-Cache: MISS from cache-L4.wol.net.pk
Connection: keep-alive
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<m:echoDateResponse
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:m="http://soapinterop.org/">
<return>
1956-10-18T22:20:00Z
</return>
</m:echoDateResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 17. Response from SOAP::Lite for the request in Listing 13.
HTTP/1.0 200 OK
Date: Sat, 29 Jun 2002 09:17:20 GMT
Server: Apache/1.3.26 (Unix) mod_gzip/1.3.19.1a mod_ssl/2.8.1 OpenSSL/0.9.4 PHP/4.2.1
SOAPServer: SOAP::Lite/Perl/0.55
Content-Length: 553
Content-Type: text/xml; charset=utf-8
X-Cache: MISS from cache-L4.wol.net.pk
Connection: keep-alive
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<namesp1:echoDateResponse
xmlns:namesp1="http://soapinterop.org/">
<return xsi:type="xsd:dateTime">
1956-10-18T22:20:00.1234567
</return>
</namesp1:echoDateResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 18. SOAP request with 1999 XML Schema URI qualified base64Binary dataype.
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:echoBase64
xmlns:ns1="http://soapinterop.org/">
<inputBase64
xsi:type="xsi:base64Binary">
VGhpcyBpcyBhIFRlc3QgU3RyaW5n
</inputBase64>
</ns1:echoBase64>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 19. SOAP request with 2001 XML Schema URI qualified base64Binary dataype.
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:echoBase64
xmlns:ns1="http://soapinterop.org/">
<inputBase64
xsi:type="xsi:base64Binary">
VGhpcyBpcyBhIFRlc3QgU3RyaW5n
</inputBase64>
</ns1:echoBase64>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 20. SOAP request with SOAP-ENC qualified base64 dataype.
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:echoBase64
xmlns:ns1="http://soapinterop.org/">
<inputBase64
xsi:type="SOAP-ENC:base64">
VGhpcyBpcyBhIFRlc3QgU3RyaW5n
</inputBase64>
</ns1:echoBase64>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 21. An array of strings in a SOAP request.
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:echoStringArray
xmlns:ns1="http://soapinterop.org/">
<inputStringArray
SOAP-ENC:arrayType="xsd:string[2]"
xsi:type="SOAP-ENC:Array">
<item xsi:type="xsd:string">
hello
</item>
<item xsi:type="xsd:string">
goodbye
</item>
</inputStringArray>
</ns1:echoStringArray>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 22. An array of structs in a SOAP request.
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:ns2="http://soapinterop.org/xsd">
<SOAP-ENV:Body>
<ns1:echoStructArray
xmlns:ns1="http://soapinterop.org/">
<inputStructArray
SOAP-ENC:arrayType="ns2:SOAPStruct[2]"
xsi:type="SOAP-ENC:Array">
<inputStruct
xsi:type="ns2:SOAPStruct">
<varFloat
xsi:type="xsd:float">
6.2237275295275275295297529752
</varFloat>
<varString
xsi:type="xsd:string">
test string
</varString>
<varInt
xsi:type="xsd:int">
5
</varInt>
</inputStruct>
<inputStruct xsi:type="ns2:SOAPStruct">
<varFloat
xsi:type="xsd:float">
12.4
</varFloat>
<varString
xsi:type="xsd:string">
another test
</varString>
<varInt
xsi:type="xsd:int">
10
</varInt>
</inputStruct>
</inputStructArray>
</ns1:echoStructArray>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 23. A two dimensional array of strings in a SOAP request.
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<m:echo2DStringArray
xmlns:m="http://soapinterop.org/">
<input2DStringArray SOAP-ENC:arrayType="xsd:string[3,2]">
<item>Row-0,Column-0</item>
<item>Row-0,Column-1</item>
<item>Row-1,Column-0</item>
<item>Row-1,Column-1</item>
<item>Row-2,Column-0</item>
<item>Row-2,Column-1</item>
</input2DStringArray>
</m:echo2DStringArray>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 24. A two dimensional array of strings with off-set in a SOAP request.
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<m:echo2DStringArray
xmlns:m="http://soapinterop.org/">
<input2DStringArray
SOAP-ENC:arrayType="xsd:string[3,2]"
SOAP-ENC:offset="[2,0]">
<item>Row-0,Column-0</item>
<item>Row-0,Column-1</item>
<item>Row-1,Column-0</item>
<item>Row-1,Column-1</item>
<item>Row-2,Column-0</item>
<item>Row-2,Column-1</item>
</input2DStringArray>
</m:echo2DStringArray>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 25. A SOAP request with an array of strings nested in a struct.
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<m:echoNestedArray
xmlns:m="http://soapinterop.org/">
<inputStruct>
<varInt>12345</varInt>
<varFloat>1234.5678
</varFloat>
<varString>
A Test String
</varString>
<varArray
SOAP-ENC:arrayType="xsd:string[4]"
SOAP-ENC:offset="[0]">
<item>First Array String</item>
<item>Second Array String</item>
<item>Third Array String</item>
<item>Fourth Array String</item>
</varArray>
</inputStruct>
</m:echoNestedArray>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Listing 26. SOAP request with 2-D array and unspecified size of rows (inner most dimension).
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<m:echo2DStringArray
xmlns:m="http://soapinterop.org/">
<input2DStringArray
SOAP-ENC:arrayType="xsd:string[,3]"
SOAP-ENC:offset="[2,0]">
<item>2,0</item>
<item>2,1</item>
<item>2,2</item>
<item>3,0</item>
<item>3,1</item>
<item>3,2</item>
<item>4,0</item>
<item>4,1</item>
<item>4,2</item>
</input2DStringArray>
</m:echo2DStringArray>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
Resources
About the author  | |  |
XML consultant Bilal Siddiqui received a degree in Electronics Engineering from the University of Engineering and Technology, Lahore, in 1995. He then began designing software solutions for industrial control systems. Later he turned to XML and used his experience programming in C++ to build Web- and WAP-based XML processing tools, server-side parsing solutions, and service applications. You may contact Bilal at wap_monster@yahoo.com.
|
Rate this page
|