ROUND 2 SOAP Interoperability Tests Specification: Header Processing

 

This specification outlines a (proposed) SOAP service interface that can be implemented by SOAP implementations as part of an interoperability testing process. It introduces standard headers for use in testing header processing..

 

 

General Guidelines

 

 

The list of header entries follows.  Sample envelopes are provided as well. It is important to note that these envelope examples are ONLY examples, and there is no implication that the implementations need to conform to these specific envelopes.

 

header entry: echoMeStringRequest

 

This header entry contains a string which is echoed back to the client in a header entry named "echoMeStringResponse".

 

Request msg header entry name: echoMeStringRequest

Request msg header entry type: xsd:string

Response msg header entry name : echoMeStringResponse

Response msg header entry type: xsd:string

 

Example 1: mustUnderstand="0", targeted at the recipient, processed with result that header entry is returned to client.

Request from client (with mustUnderstand="0", recipient is target) 

POST /interop HTTP/1.0
Host: www.whitemesa.net
User-Agent: White Mesa SOAP Interop Client/1.0
Content-Type: text/xml; charset="utf-8"
Content-Length: 650
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: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:Header>
<h:echoMeStringRequest xmlns:h="http://soapinterop.org/echoheader/" SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next">hello world</h:echoMeStringRequest>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:echoVoid xmlns:m="http://soapinterop.org/">
</m:echoVoid>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response from server

HTTP/1.0 200 OK
Date: Wed, 20 Jun 2001 02:44:31 GMT
Server: WhiteMesa SOAP Server/2.3
Content-Type: text/xml; charset="utf-8"
Content-Length: 646

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 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:Header>
<h:echoMeStringResponse xmlns:h="http://soapinterop.org/echoheader/">hello world</h:echoMeStringResponse>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:echoVoidResponse xmlns:m="http://soapinterop.org/"></m:echoVoidResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Example 2: mustUnderstand="0", *not* targeted at the recipient, header entry is ignored.

Request from client (with mustUnderstand="0", recipient is not target) 

POST /interop HTTP/1.0
Host: www.whitemesa.net
User-Agent: White Mesa SOAP Interop Client/1.0
Content-Type: text/xml; charset="utf-8"
Content-Length: 650
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: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:Header>
<h:echoMeStringRequest xmlns:h="http://soapinterop.org/echoheader/" SOAP-ENV:actor="http://some/other/actor">hello world</h:echoMeStringRequest>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:echoVoid xmlns:m="http://soapinterop.org/">
</m:echoVoid>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response from server

HTTP/1.0 200 OK
Date: Wed, 20 Jun 2001 02:44:31 GMT
Server: WhiteMesa SOAP Server/2.3
Content-Type: text/xml; charset="utf-8"
Content-Length: 646

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 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>
<m:echoVoidResponse xmlns:m="http://soapinterop.org/"></m:echoVoidResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

 

header entry: echoMeStructRequest

 

This header entry contains a single struct which is echoed back to the client  in a header entry named "echoMeStructResponse".

 

An example of this structure is:

 

<ExampleStruct>

<varString>Hello</varString>

<varInt>8</varInt>

<varFloat>10.2</varFloat>

</ExampleStruct>

 

The structure is defined with the following schema:

<complexType name="SOAPStruct">
    <complexContent>
	<all>
		<element name="varString" type="xsd:string"/>
		<element name="varInt" type="xsd:int"/> 
		<element name="varFloat" type="xsd:float"/> 
	</all>
    </complexContent>
</complexType> 

This type is defined within the namespace http://soapinterop.org/xsd

 

Request msg header entry name: echoMeStructRequest

Request msg header entry type: sb:SOAPStruct where xmlns:sb="http://soapinterop.org/xsd"

Response msg header entry name: echoMeStructResponse

Response msg header entry type: sb:SOAPStruct where xmlns:sb="http://soapinterop.org/xsd"

 

Example 1: mustUnderstand="1", targeted at the recipient, processed with result that header entry is returned to client.

Request from client (with mustUnderstand="1", recipient is target)

POST /interop HTTP/1.0
Host: www.whitemesa.net
User-Agent: White Mesa SOAP Interop Client/1.0
Content-Type: text/xml; charset="utf-8"
Content-Length: 502
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: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:Header>
<h:echoMeStructRequest xmlns:h="http://soapinterop.org/echoheader/" SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" SOAP-ENV:mustUnderstand="1">
<varInt>42</varInt>
<varFloat>99.005</varFloat>
<varString>hello world</varString>
</h:echoMeStructRequest>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:echoVoid xmlns:m="http://soapinterop.org/">
</m:echoVoid>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response from server

HTTP/1.0 200 OK
Date: Wed, 20 Jun 2001 02:44:16 GMT
Server: WhiteMesa SOAP Server/2.3
Content-Type: text/xml; charset="utf-8"
Content-Length: 508

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 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:Header>
<h:echoMeStructResponse xmlns:h="http://soapinterop.org/echoheader/">
<varInt>42</varInt>
<varFloat>99.005</varFloat>
<varString>hello world</varString>
</h:echoMeStructResponse>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:echoVoidResponse xmlns:m="http://soapinterop.org/"></m:echoVoidResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

Example 2: mustUnderstand="1", *not* targeted at recipient, is simply ignored. PLEASE NOTE: Although included for completeness, this scenario is excluded from the scope of interop testing because this interpretation of the SOAP 1.1 spec remains controversial.

Request from client (with mustUnderstand="1", recipient is not target)

<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:Header>
<h:echoMeStructRequest xmlns:h="http://soapinterop.org/echoheader/" SOAP-ENV:actor="http://some/other/actor" SOAP-ENV:mustUnderstand="1">
<varInt>33</varInt>
<varFloat>99.625</varFloat>
<varString>hello world</varString>
</h:echoMeStructRequest>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:echoVoid xmlns:m="http://soapinterop.org/">
</m:echoVoid>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response from server

HTTP/1.0 200 OK
Date: Wed, 20 Jun 2001 02:44:16 GMT
Server: WhiteMesa SOAP Server/2.3
Content-Type: text/xml; charset="utf-8"
Content-Length: 508

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 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>
<m:echoVoidResponse xmlns:m="http://soapinterop.org/"></m:echoVoidResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

header entry: unknown header entry element

 

This is any header that is not recognized, or "understood" by the server. If the header entry bears the SOAP-ENV:mustUnderstand attribute value of "1", the server MUST fault if it is the target of the header entry, which is determined by the value of the SOAP-ENV:actor attribute.

 

Example 1: An "unknown" header entry with mustUnderstand="0", targeted at the recipient, is simply ignored.

Request from client (with mustUnderstand="0", recipient is target)

POST /interop HTTP/1.0
Host: www.whitemesa.net
User-Agent: White Mesa SOAP Interop Client/1.0
Content-Type: text/xml; charset="utf-8"
Content-Length: 650
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: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:Header>
<h:echoMeUnknown xmlns:h="http://unknown/" SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next">nobody understands me!</h:echoMeUnknown>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:echoVoid xmlns:m="http://soapinterop.org/">
</m:echoVoid>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response from server (unknown header ignored)

HTTP/1.0 200 OK
Date: Wed, 20 Jun 2001 02:44:31 GMT
Server: WhiteMesa SOAP Server/2.3
Content-Type: text/xml; charset="utf-8"
Content-Length: 646

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 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>
<m:echoVoidResponse xmlns:m="http://soapinterop.org/"></m:echoVoidResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Example 2: An "unknown" header entry with mustUnderstand="1", targeted at the recipient, results in a Fault message.

Request from client (with mustUnderstand="1", recipient is target)

POST /interop HTTP/1.0
Host: www.whitemesa.net
User-Agent: White Mesa SOAP Interop Client/1.0
Content-Type: text/xml; charset="utf-8"
Content-Length: 650
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: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:Header>
<h:echoMeUnknown xmlns:h="http://unknown/" SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" SOAP-ENV:mustUnderstand="1">nobody understands me!</h:echoMeUnknown>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:echoVoid xmlns:m="http://soapinterop.org/">
</m:echoVoid>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response from server (Fault returned: mustUnderstand="1" but not able to process)

HTTP/1.0 500 SOAP Fault
Date: Wed, 20 Jun 2001 02:44:31 GMT
Server: WhiteMesa SOAP Server/2.3
Content-Type: text/xml; charset="utf-8"
Content-Length: 646

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 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>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:MustUnderstand</faultcode>
<faultstring>Unhandled 'mustUnderstand' header element.</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Example 3: An "unknown" header entry with mustUnderstand="0", *not* targeted at the recipient, is simply ignored.

Request from client (with mustUnderstand="0", recipient is not target)

POST /interop HTTP/1.0
Host: www.whitemesa.net
User-Agent: White Mesa SOAP Interop Client/1.0
Content-Type: text/xml; charset="utf-8"
Content-Length: 650
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: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:Header>
<h:echoMeUnknown xmlns:h="http://unknown/" SOAP-ENV:actor="http://some/other/actor">nobody understands me!</h:echoMeUnknown>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:echoVoid xmlns:m="http://soapinterop.org/">
</m:echoVoid>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response from server (unknown header, targeted elsewhere, is ignored)

HTTP/1.0 200 OK
Date: Wed, 20 Jun 2001 02:44:31 GMT
Server: WhiteMesa SOAP Server/2.3
Content-Type: text/xml; charset="utf-8"
Content-Length: 646

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 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>
<m:echoVoidResponse xmlns:m="http://soapinterop.org/"></m:echoVoidResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Example 4: An "unknown" header entry with mustUnderstand="1", *not* targeted at the recipient, is simply ignored. PLEASE NOTE: Although included for completeness, this scenario is excluded from the scope of interop testing because this interpretation of the SOAP 1.1 spec remains controversial.

Request from client (with mustUnderstand="1", recipient is not target)

POST /interop HTTP/1.0
Host: www.whitemesa.net
User-Agent: White Mesa SOAP Interop Client/1.0
Content-Type: text/xml; charset="utf-8"
Content-Length: 650
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: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:Header>
<h:echoMeUnknown xmlns:h="http://unknown/" SOAP-ENV:actor="http://some/other/actor" SOAP-ENV:mustUnderstand="1"></h:echoMeUnknown>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:echoVoid xmlns:m="http://soapinterop.org/">
</m:echoVoid>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response from server (unknown header, targeted elsewhere, is ignored)

HTTP/1.0 200 OK
Date: Wed, 20 Jun 2001 02:44:31 GMT
Server: WhiteMesa SOAP Server/2.3
Content-Type: text/xml; charset="utf-8"
Content-Length: 646

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 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>
<m:echoVoidResponse xmlns:m="http://soapinterop.org/"></m:echoVoidResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Questions, comments to: cunnings@whitemesa.com