Re: R: mistake in SOAP envelope XMLSchema

"Scott Nichol" <[email protected]> Wed, 14 Nov 2007 18:05:46 +0000
Newsgroups gmane.text.xml.distributed
Message-ID <050601c826e8$edad60d0$6601a8c0@GT5056>



To hop in on this thread, it seems that both SOAP 1.1 and SOAP 1.2 use=20
the namespace http://schemas.xmlsoap.org/soap/envelope/, but the two=20
implicitly assume a different XML Schema for that namespace.  Namely,=20
SOAP 1.1 (http://www.w3.org/TR/2000/NOTE-SOAP-20000508/) explicitly=20
allows the SOAP-ENV:encodingStyle attribute for the SOAP-ENV:Envelope=20
element, while SOAP 1.2 prohibits it.  The schema physically retrievable=20
at http://schemas.xmlsoap.org/soap/envelope/ applies to SOAP 1.2 only,=20
contrary to its comment "Schema for the SOAP/1.1 envelope".  Is there a=20
physically retrievable XML Schema for the namespace=20
http://schemas.xmlsoap.org/soap/envelope/ that applies to SOAP 1.1?

Scott Nichol

----- Original Message -----=20
From: "Christopher B Ferris" <[email protected]>
To: "Alessandro Pira" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Wednesday, November 14, 2007 12:31 PM
Subject: Re: R: mistake in SOAP envelope XMLSchema


Ah, clearly I misunderstood your request.

As for SOAP1.1, that specification, nor it's schema is maintained by the
XML Protocol WG. The WS-I
Basic Profile [1], however, aligns with the direction that the XML
Protocol WG took in disallowing use of the
soap:encodingStyle attribute on the soap:envelope element:

R1005 An ENVELOPE MUST NOT contain soap:encodingStyle attributes on any=20
of
the elements whose namespace name is
"http://schemas.xmlsoap.org/soap/envelope/".

Since the WS-I Basic Profile is followed by most implementations, since=20
it
helps to improve the interoperability of those
implementations, it seems to me that any change to the SOAP1.1 schema is
also unnecessary.

[1] http://www.ws-i.org/Profiles/BasicProfile-1.1-2006-04-10.html

Hope this helps,

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

[email protected] wrote on 11/14/2007 09:48:17 AM:

>
> Hi Christopher,
>
> thank you for your answer.
> Actually I was talking about SOAP 1.1 (not 1.2) and about this
XMLSchema:
>
> http://schemas.xmlsoap.org/soap/envelope/
>
> which (as stated in the comment) appears to be the official SOAP 1.1
> schema. (Am I wrong?)
> I agree with you: SOAP 1.2 does not allow the encodingStyle
> attribute to appear on the envelope element, but SOAP 1.1 (and its
> schema) should!
>
> Best regards,
>
> Alessandro Pira
>
>
> Da: Christopher B Ferris [mailto:[email protected]]
> Inviato: mercoled=EC 14 novembre 2007 15.07
> A: Alessandro Pira
> Cc: [email protected]
> Oggetto: Re: mistake in SOAP envelope XMLSchema

>
> Alessandro,
>
> The quoted text you cite is pretty clear. I have emphasized using=20
> 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: [email protected]
> blog: http://www.ibm.com/developerworks/blogs/page/chrisferris
> phone: +1 508 234 2986
>
> [email protected] 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=20
> > (http://schemas.xmlsoap.org/soap/envelope/
> > ) forbids this since it states:
> >
> > [...]
> > <xs:complexType name=3D"Envelope">
> >  <xs:sequence>
> >    <xs:element ref=3D"tns:Header" minOccurs=3D"0"/>
> >    <xs:element ref=3D"tns:Body" minOccurs=3D"1"/>
> >    <xs:any namespace=3D"##other" minOccurs=3D"0" maxOccurs=3D"unbound=
ed"
> > processContents=3D"lax"/>
> >  </xs:sequence>
> >  <xs:anyAttribute namespace=3D"##other" processContents=3D"lax"/>
> > </xs:complexType>
> > [...]
> >
> > I think it should say namespace=3D"##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."
> >
> >=20