Re: mistake in SOAP envelope XMLSchema

Alessandro,

The quoted text you cite is pretty clear. I have emphasized using CAPS. 

"SOAP 1.2 DOES NOT ALLOW the env:encodingStyle attribute to appear on the 
SOAP env:Envelope, whereas SOAP 1.1 allows it to appear on any element. 
SOAP 1.2 specifies specific elements where this attribute may be used."

Additionally, from the SOAP1.2 specification [1]:

"The encodingStyle attribute information item MAY appear on the following:
1.      A SOAP header block (see 5.2.1 SOAP header block).
2.      A child element information item of the SOAP Body element 
information item (see 5.3.1 SOAP Body child Element) if that child is not 
a SOAP Fault element information item (see 5.4 SOAP Fault).
3.      A child element information item of the SOAP Detail element 
information item (see 5.4.5.1 SOAP detail entry).
4.      Any descendent of 1, 2, and 3 above.
The encodingStyle attribute information item MUST NOT appear on any 
element other than above in a SOAP message infoset."

The soap:encodingStyle attribute is NOT permitted to be included in on the 
soap:Envelope element. Therefore, the schema is correct.

[1] http://www.w3.org/TR/soap12-part1/#soapencattr

Cheers,

Christopher Ferris
STSM, Software Group Standards Strategy
email: chrisfer@us.ibm.com
blog: http://www.ibm.com/developerworks/blogs/page/chrisferris
phone: +1 508 234 2986

xml-dist-app-request@w3.org wrote on 11/12/2007 05:44:25 AM:

> Hi all,
> 
> I am writing to this mailing list since I think I found a mistake in
> the official xml schema for SOAP envelopes:
> 
> http://schemas.xmlsoap.org/soap/envelope/
> 
> The error involves the encodingStyle attribute which (as stated in 
> examples in the note and also in [1]) seems possible to use in the 
> Envelope element.
> But the official XMLSchema (http://schemas.xmlsoap.org/soap/envelope/
> ) forbids this since it states:
> 
> [...]
> <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>
> [...]
> 
> I think it should say namespace="##any" in the xs:anyAttribute 
> element (or explicitly define the encodingStyle attribute).
> 
> I wrote you because the company I work for publishes some 
> webservices for our customers, and we use 3rd party libraries for 
> managing SOAP communication. Now some of our customers for some 
> reason are accusing us to be not compliant to the official SOAP 
> protocol, which I think is not true, but even W3C XMLSchema 
> validator shows that the Envelope we use is not valid because of the
> "encodingStyle" attribute.
> 
> Can you please check if it's possible to correct the XMLSchema?
> 
> Thank you in advance for your time,
> 
> Alessandro Pira
> 
> 
> [1] : the SOAP 1.2 part 0 Primer in Chapter 6 (Changes Between SOAP 
> 1.1 and SOAP 1.2) states:
> 
> "SOAP 1.2 does not allow the env:encodingStyle attribute to appear 
> on the SOAP env:Envelope, whereas SOAP 1.1 allows it to appear on 
> any element. SOAP 1.2 specifies specific elements where this 
> attribute may be used."
> 
> 

Received on Wednesday, 14 November 2007 14:08:11 UTC