You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Martin Phillips1 <mp...@uk.ibm.com> on 2007/02/26 13:51:42 UTC
SOAP 1.1 Spec Vs. SOAP 1.1 Schema inconsistencies
Hello there everyone, during my playing about with Tuscany SDO2 I have run
into a problem using Tuscany to read in some of my existing SOAP test
messages. I believe that the problem lies in an inconsistency between the
SOAP 1.1 specification, and the SOAP 1.1 Schema. My test SOAP messages
follow the Specification, and Tuscany sticks rigidly to the Schema. Below
is my (inexpert) analysis of the inconsistency.
The basic inconsistency is that the Specification allows the SOAP Envelope
to have an encodingStyle attribute (and shows it in examples), but the
Schema specifically forbids it.
"4.1.1 SOAP encodingStyle Attribute
The SOAP encodingStyle global attribute can be used to indicate the
serialization rules used in a SOAP message. This attribute MAY appear on
any element, and is scoped to that element's contents and all child
elements not themselves containing such an attribute, much as an XML
namespace declaration is scoped. There is no default encoding defined for
a SOAP message."
There is an example SOAP message in the prose of the specification that
has encodingStyle on the Envelope
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<m:GetLastTradePrice xmlns:m="Some-URI">
<symbol>DIS</symbol>
</m:GetLastTradePrice>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Yet the SOAP 1.1 Schema says:
<xs:element name="Envelope" type="tns:Envelope" />
- <xs:complexType name="Envelope">
- <xs:sequence>
<xs:element ref="tns:Header" minOccurs="0" />
<xs:element ref="tns:Body" minOccurs="1" />
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
processContents="lax" />
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax" />
</xs:complexType>
<xs:attribute name="encodingStyle" type="tns:encodingStyle" />
- <xs:attributeGroup name="encodingStyle">
<xs:attribute ref="tns:encodingStyle" />
</xs:attributeGroup>
So the Schema says that Envelope only allows any attributes not in the
same namespace (##other), yet encodingStyle is in the same namespace, and
therfor is not allowed on Envelope.
I may be making a mountain out of a molehill here, but the Spec and Schema
don't seem to match up (assuming my interpretation is correct). This
means that SDO2/Tuscany needs to realise this and decide whether to be as
strict as they currently are (not allowing encodingStyle on Envelope)
which may lead to incompatible-ness with old SOAP out there, or to
specifically relax a bit and allow the attribute, even though it breaks
the Schema.
Just thought I should throw this out there for discussion and debate. I
do not know how much existing SOAP there is with the encodingStyle
attribute on the Envelope, or how much of it will/could be sent to Tuscany
code for parsing, but I thought it would be better that an informed
decision is made as to how Tuscany will behave.
So - what do people think?
Martin.
___________________________________
WebSphere ESB Foundation Technologies
Mail Point 211
IBM United Kingdom Limited
Hursley SO21 2JN
Phone : 01962 817395 (247395)
Notes ID : Martin Phillips1/UK/IBM@IBMGB
INTERNET : mphillip@uk.ibm.com
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU