Re: R: mistake in SOAP envelope XMLSchema

Christopher B Ferris <[email protected]> Wed, 14 Nov 2007 12:31:50 -0500
Newsgroups gmane.text.xml.distributed
Message-ID <OFD8388DF1.1C018CD9-ON85257393.005F6B3C-85257393.00602818@us.ibm.com>
This is a multipart message in MIME format.
--=_alternative 005FDFE685257393_=
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

Ah, clearly I misunderstood your request.

As for SOAP1.1, that specification, nor it's schema is maintained by the=20
XML Protocol WG. The WS-I
Basic Profile [1], however, aligns with the direction that the XML=20
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 of =

the elements whose namespace name is=20
"http://schemas.xmlsoap.org/soap/envelope/".=20

Since the WS-I Basic Profile is followed by most implementations, since it =

helps to improve the interoperability of those
implementations, it seems to me that any change to the SOAP1.1 schema is=20
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:

>=20
> Hi Christopher,
>=20
> thank you for your answer.
> Actually I was talking about SOAP 1.1 (not 1.2) and about this=20
XMLSchema:
>=20
> http://schemas.xmlsoap.org/soap/envelope/
>=20
> 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=20
> attribute to appear on the envelope element, but SOAP 1.1 (and its=20
> schema) should!
>=20
> Best regards,
>=20
> Alessandro Pira
>=20
>=20
> Da: Christopher B Ferris [mailto:[email protected]]=20
> Inviato: mercoled=EC 14 novembre 2007 15.07
> A: Alessandro Pira
> Cc: [email protected]
> Oggetto: Re: mistake in SOAP envelope XMLSchema

>=20
> Alessandro,=20
>=20
> The quoted text you cite is pretty clear. I have emphasized using CAPS.=20
>=20
> "SOAP 1.2 DOES NOT ALLOW the env:encodingStyle attribute to appear=20
> on the SOAP env:Envelope, whereas SOAP 1.1 allows it to appear on=20
> any element. SOAP 1.2 specifies specific elements where this=20
> attribute may be used."=20
>=20
> Additionally, from the SOAP1.2 specification [1]:=20
>=20
> "The encodingStyle attribute information item MAY appear on the=20
following:=20
> 1.        A SOAP header block (see 5.2.1 SOAP header block).=20
> 2.        A child element information item of the SOAP Body element=20
> information item (see 5.3.1 SOAP Body child Element) if that child=20
> is not a SOAP Fault element information item (see 5.4 SOAP Fault).=20
> 3.        A child element information item of the SOAP Detail=20
> element information item (see 5.4.5.1 SOAP detail entry).=20
> 4.        Any descendent of 1, 2, and 3 above.=20
> The encodingStyle attribute information item MUST NOT appear on any=20
> element other than above in a SOAP message infoset."=20
>=20
> The soap:encodingStyle attribute is NOT permitted to be included in=20
> on the soap:Envelope element. Therefore, the schema is correct.=20
>=20
> [1] http://www.w3.org/TR/soap12-part1/#soapencattr=20
>=20
> Cheers,=20
>=20
> Christopher Ferris
> STSM, Software Group Standards Strategy
> email: [email protected]
> blog: http://www.ibm.com/developerworks/blogs/page/chrisferris
> phone: +1 508 234 2986=20
>=20
> [email protected] wrote on 11/12/2007 05:44:25 AM:
>=20
> > Hi all,=20
> >=20
> > I am writing to this mailing list since I think I found a mistake in
> > the official xml schema for SOAP envelopes:=20
> >=20
> > http://schemas.xmlsoap.org/soap/envelope/=20
> >=20
> > The error involves the encodingStyle attribute which (as stated in=20
> > examples in the note and also in [1]) seems possible to use in the=20
> > Envelope element.=20
> > But the official XMLSchema (http://schemas.xmlsoap.org/soap/envelope/
> > ) forbids this since it states:=20
> >=20
> > [...]=20
> > <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"unbounded=
"=20
> > processContents=3D"lax"/>
> >  </xs:sequence>
> >  <xs:anyAttribute namespace=3D"##other" processContents=3D"lax"/>
> > </xs:complexType>=20
> > [...]=20
> >=20
> > I think it should say namespace=3D"##any" in the xs:anyAttribute=20
> > element (or explicitly define the encodingStyle attribute).=20
> >=20
> > I wrote you because the company I work for publishes some=20
> > webservices for our customers, and we use 3rd party libraries for=20
> > managing SOAP communication. Now some of our customers for some=20
> > reason are accusing us to be not compliant to the official SOAP=20
> > protocol, which I think is not true, but even W3C XMLSchema=20
> > validator shows that the Envelope we use is not valid because of the
> > "encodingStyle" attribute.=20
> >=20
> > Can you please check if it's possible to correct the XMLSchema?=20
> >=20
> > Thank you in advance for your time,=20
> >=20
> > Alessandro Pira=20
> >=20
> >=20
> > [1] : the SOAP 1.2 part 0 Primer in Chapter 6 (Changes Between SOAP=20
> > 1.1 and SOAP 1.2) states:=20
> >=20
> > "SOAP 1.2 does not allow the env:encodingStyle attribute to appear=20
> > on the SOAP env:Envelope, whereas SOAP 1.1 allows it to appear on=20
> > any element. SOAP 1.2 specifies specific elements where this=20
> > attribute may be used."=20
> >=20
> >=20
--=_alternative 005FDFE685257393_=
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable


<br><font size=3D2 face=3D"sans-serif">Ah, clearly I misunderstood your req=
uest.</font>
<br>
<br><font size=3D2 face=3D"sans-serif">As for SOAP1.1, that specification,
nor it's schema is maintained by the XML Protocol WG. The WS-I</font>
<br><font size=3D2 face=3D"sans-serif">Basic Profile [1], however, aligns w=
ith
the direction that the XML Protocol WG took in disallowing use of the</font>
<br><font size=3D2 face=3D"sans-serif">soap:encodingStyle attribute on the
soap:envelope element:</font>
<br>
<br><font size=3D3>R1005 An ENVELOPE MUST NOT contain </font><tt><font size=
=3D3>soap:encodingStyle</font></tt><font size=3D3>
attributes on any of the elements whose namespace name is &quot;http://sche=
mas.xmlsoap.org/soap/envelope/&quot;.
</font>
<br>
<br><font size=3D2 face=3D"sans-serif">Since the WS-I Basic Profile is foll=
owed
by most implementations, since it helps to improve the interoperability
of those</font>
<br><font size=3D2 face=3D"sans-serif">implementations, it seems to me that
any change to the SOAP1.1 schema is also unnecessary.</font>
<br>
<br><font size=3D2 face=3D"sans-serif">[1] http://www.ws-i.org/Profiles/Bas=
icProfile-1.1-2006-04-10.html</font>
<br>
<br><font size=3D2 face=3D"sans-serif">Hope this helps,</font>
<br>
<br><font size=3D2 face=3D"sans-serif">Christopher Ferris<br>
STSM, Software Group Standards Strategy<br>
email: [email protected]<br>
blog: http://www.ibm.com/developerworks/blogs/page/chrisferris<br>
phone: +1 508 234 2986</font>
<br>
<br><tt><font size=3D2>[email protected] wrote on 11/14/2007 09:4=
8:17
AM:<br>
<br>
&gt; &nbsp;</font></tt>
<br><tt><font size=3D2>&gt; Hi Christopher,</font></tt>
<br><tt><font size=3D2>&gt; &nbsp;</font></tt>
<br><tt><font size=3D2>&gt; thank you for your answer.</font></tt>
<br><tt><font size=3D2>&gt; Actually I was talking about SOAP 1.1 (not 1.2)
and about this XMLSchema:</font></tt>
<br><tt><font size=3D2>&gt; &nbsp;</font></tt>
<br><tt><font size=3D2>&gt; http://schemas.xmlsoap.org/soap/envelope/</font=
></tt>
<br><tt><font size=3D2>&gt; &nbsp;</font></tt>
<br><tt><font size=3D2>&gt; which (as stated in the comment) appears to be
the official SOAP 1.1<br>
&gt; schema. (Am I wrong?)</font></tt>
<br><tt><font size=3D2>&gt; I agree with you: SOAP 1.2 does not allow the
encodingStyle <br>
&gt; attribute to appear on the envelope element, but SOAP 1.1 (and its
<br>
&gt; schema) should!</font></tt>
<br><tt><font size=3D2>&gt; &nbsp;</font></tt>
<br><tt><font size=3D2>&gt; Best regards,</font></tt>
<br><tt><font size=3D2>&gt; &nbsp;</font></tt>
<br><tt><font size=3D2>&gt; Alessandro Pira</font></tt>
<br><tt><font size=3D2>&gt; &nbsp;</font></tt>
<br><tt><font size=3D2>&gt; <br>
&gt; Da: Christopher B Ferris [mailto:[email protected]] <br>
&gt; Inviato: mercoled=EC 14 novembre 2007 15.07<br>
&gt; A: Alessandro Pira<br>
&gt; Cc: [email protected]<br>
&gt; Oggetto: Re: mistake in SOAP envelope XMLSchema<br>
</font></tt>
<br><tt><font size=3D2>&gt; <br>
&gt; Alessandro, <br>
&gt; <br>
&gt; The quoted text you cite is pretty clear. I have emphasized using
CAPS. <br>
&gt; <br>
&gt; &quot;SOAP 1.2 DOES NOT ALLOW the env:encodingStyle attribute to appear
<br>
&gt; on the SOAP env:Envelope, whereas SOAP 1.1 allows it to appear on
<br>
&gt; any element. SOAP 1.2 specifies specific elements where this <br>
&gt; attribute may be used.&quot; <br>
&gt; <br>
&gt; Additionally, from the SOAP1.2 specification [1]: <br>
&gt; <br>
&gt; &quot;The encodingStyle attribute information item MAY appear on the
following: <br>
&gt; 1. &nbsp; &nbsp; &nbsp; &nbsp;A SOAP header block (see 5.2.1 SOAP
header block). <br>
&gt; 2. &nbsp; &nbsp; &nbsp; &nbsp;A child element information item of
the SOAP Body element <br>
&gt; information item (see 5.3.1 SOAP Body child Element) if that child
<br>
&gt; is not a SOAP Fault element information item (see 5.4 SOAP Fault).
<br>
&gt; 3. &nbsp; &nbsp; &nbsp; &nbsp;A child element information item of
the SOAP Detail <br>
&gt; element information item (see 5.4.5.1 SOAP detail entry). <br>
&gt; 4. &nbsp; &nbsp; &nbsp; &nbsp;Any descendent of 1, 2, and 3 above.
</font></tt>
<br><tt><font size=3D2>&gt; The encodingStyle attribute information item
MUST NOT appear on any <br>
&gt; element other than above in a SOAP message infoset.&quot; <br>
&gt; <br>
&gt; The soap:encodingStyle attribute is NOT permitted to be included in
<br>
&gt; on the soap:Envelope element. Therefore, the schema is correct. <br>
&gt; <br>
&gt; [1] http://www.w3.org/TR/soap12-part1/#soapencattr <br>
&gt; <br>
&gt; Cheers, <br>
&gt; <br>
&gt; Christopher Ferris<br>
&gt; STSM, Software Group Standards Strategy<br>
&gt; email: [email protected]<br>
&gt; blog: http://www.ibm.com/developerworks/blogs/page/chrisferris<br>
&gt; phone: +1 508 234 2986 <br>
&gt; <br>
&gt; [email protected] wrote on 11/12/2007 05:44:25 AM:<br>
&gt; <br>
&gt; &gt; Hi all, <br>
&gt; &gt; &nbsp; <br>
&gt; &gt; I am writing to this mailing list since I think I found a mistake
in<br>
&gt; &gt; the official xml schema for SOAP envelopes: <br>
&gt; &gt; &nbsp; <br>
&gt; &gt; http://schemas.xmlsoap.org/soap/envelope/ <br>
&gt; &gt; &nbsp; <br>
&gt; &gt; The error involves the encodingStyle attribute which (as stated
in <br>
&gt; &gt; examples in the note and also in [1]) seems possible to use in
the <br>
&gt; &gt; Envelope element. <br>
&gt; &gt; But the official XMLSchema (http://schemas.xmlsoap.org/soap/envel=
ope/<br>
&gt; &gt; ) forbids this since it states: <br>
&gt; &gt; &nbsp; <br>
&gt; &gt; [...] <br>
&gt; &gt; &lt;xs:complexType name=3D&quot;Envelope&quot;&gt;<br>
&gt; &gt; &nbsp;&lt;xs:sequence&gt;<br>
&gt; &gt; &nbsp; &nbsp;&lt;xs:element ref=3D&quot;tns:Header&quot; minOccur=
s=3D&quot;0&quot;/&gt;<br>
&gt; &gt; &nbsp; &nbsp;&lt;xs:element ref=3D&quot;tns:Body&quot; minOccurs=
=3D&quot;1&quot;/&gt;<br>
&gt; &gt; &nbsp; &nbsp;&lt;xs:any namespace=3D&quot;##other&quot; minOccurs=
=3D&quot;0&quot;
maxOccurs=3D&quot;unbounded&quot; <br>
&gt; &gt; processContents=3D&quot;lax&quot;/&gt;<br>
&gt; &gt; &nbsp;&lt;/xs:sequence&gt;<br>
&gt; &gt; &nbsp;&lt;xs:anyAttribute namespace=3D&quot;##other&quot; process=
Contents=3D&quot;lax&quot;/&gt;<br>
&gt; &gt; &lt;/xs:complexType&gt; <br>
&gt; &gt; [...] <br>
&gt; &gt; &nbsp; <br>
&gt; &gt; I think it should say namespace=3D&quot;##any&quot; in the xs:any=
Attribute
<br>
&gt; &gt; element (or explicitly define the encodingStyle attribute). <br>
&gt; &gt; &nbsp; <br>
&gt; &gt; I wrote you because the company I work for publishes some <br>
&gt; &gt; webservices for our customers, and we use 3rd party libraries
for <br>
&gt; &gt; managing SOAP communication. Now some of our customers for some
<br>
&gt; &gt; reason are accusing us to be not compliant to the official SOAP
<br>
&gt; &gt; protocol, which I think is not true, but even W3C XMLSchema <br>
&gt; &gt; validator shows that the Envelope we use is not valid because
of the<br>
&gt; &gt; &quot;encodingStyle&quot; attribute. <br>
&gt; &gt; &nbsp; <br>
&gt; &gt; Can you please check if it's possible to correct the XMLSchema?
<br>
&gt; &gt; &nbsp; <br>
&gt; &gt; Thank you in advance for your time, <br>
&gt; &gt; &nbsp; <br>
&gt; &gt; Alessandro Pira <br>
&gt; &gt; &nbsp; <br>
&gt; &gt; &nbsp; <br>
&gt; &gt; [1] : the SOAP 1.2 part 0 Primer in Chapter 6 (Changes Between
SOAP <br>
&gt; &gt; 1.1 and SOAP 1.2) states: <br>
&gt; &gt; &nbsp; <br>
&gt; &gt; &quot;SOAP 1.2 does not allow the env:encodingStyle attribute
to appear <br>
&gt; &gt; on the SOAP env:Envelope, whereas SOAP 1.1 allows it to appear
on <br>
&gt; &gt; any element. SOAP 1.2 specifies specific elements where this
<br>
&gt; &gt; attribute may be used.&quot; <br>
&gt; &gt; &nbsp; <br>
&gt; &gt; &nbsp;</font></tt>
--=_alternative 005FDFE685257393_=--