R: mistake in SOAP envelope XMLSchema
"Alessandro Pira" <[email protected]> Wed, 14 Nov 2007 14:48:17 +0000
| Newsgroups | gmane.text.xml.distributed |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. ------_=_NextPart_001_01C826CD.5651873C Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable =20 Hi Christopher, =20 thank you for your answer. Actually I was talking about SOAP 1.1 (not 1.2) and about this = 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 attribute to = appear on the envelope element, but SOAP 1.1 (and its schema) should! =20 Best regards, =20 Alessandro Pira =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 Alessandro,=20 The quoted text you cite is pretty clear. I have emphasized using CAPS.=20 "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 Additionally, from the SOAP1.2 specification [1]:=20 "The encodingStyle attribute information item MAY appear on the = following:=20 1. A SOAP header block (see 5.2.1 SOAP header block = <http://www.w3.org/TR/soap12-part1/#soapheadblock> ).=20 2. A child element information item of the SOAP Body element = information item (see 5.3.1 SOAP Body child Element = <http://www.w3.org/TR/soap12-part1/#soapbodyel> ) if that child is not a = SOAP Fault element information item (see 5.4 SOAP Fault = <http://www.w3.org/TR/soap12-part1/#soapfault> ).=20 3. A child element information item of the SOAP Detail element = information item (see 5.4.5.1 SOAP detail entry = <http://www.w3.org/TR/soap12-part1/#faultdetailentry> ).=20 4. Any descendent of 1, 2, and 3 above.=20 The encodingStyle attribute information item MUST NOT appear on any = element other than above in a SOAP message infoset."=20 The soap:encodingStyle attribute is NOT permitted to be included in on = the soap:Envelope element. Therefore, the schema is correct.=20 [1] http://www.w3.org/TR/soap12-part1/#soapencattr=20 Cheers,=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 [email protected] wrote on 11/12/2007 05:44:25 AM: > 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 ------_=_NextPart_001_01C826CD.5651873C Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2800.1597" name=3DGENERATOR></HEAD> <BODY> <DIV dir=3Dltr align=3Dleft><FONT face=3DVerdana = size=3D2></FONT> </DIV> <DIV dir=3Dltr align=3Dleft><FONT face=3DVerdana size=3D2><SPAN=20 class=3D879044214-14112007>Hi Christopher,</SPAN></FONT></DIV> <DIV dir=3Dltr align=3Dleft><FONT face=3DVerdana size=3D2><SPAN=20 class=3D879044214-14112007></SPAN></FONT> </DIV> <DIV dir=3Dltr align=3Dleft><FONT face=3DVerdana size=3D2><SPAN=20 class=3D879044214-14112007>thank you for your = answer.</SPAN></FONT></DIV> <DIV dir=3Dltr align=3Dleft><FONT face=3DVerdana size=3D2><SPAN=20 class=3D879044214-14112007>Actually I was talking about SOAP 1.1 (not = 1.2) and=20 about this XMLSchema:</SPAN></FONT></DIV> <DIV dir=3Dltr align=3Dleft><FONT face=3DVerdana size=3D2><SPAN=20 class=3D879044214-14112007></SPAN></FONT> </DIV> <DIV><FONT face=3DVerdana size=3D2><A=20 href=3D"http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap= .org/soap/envelope/</A></FONT></DIV> <DIV><FONT face=3DVerdana size=3D2></FONT> </DIV> <DIV><SPAN class=3D879044214-14112007><FONT face=3DVerdana = size=3D2>which (as stated=20 in the comment) appears to be the official SOAP 1.1 schema. (Am I=20 wrong?)</FONT></SPAN></DIV> <DIV><SPAN class=3D879044214-14112007><FONT face=3DVerdana size=3D2>I = agree with you:=20 SOAP 1.2 does not allow the encodingStyle attribute to appear on the = envelope=20 element, but SOAP 1.1 (and its schema) should!</FONT></SPAN></DIV> <DIV><SPAN class=3D879044214-14112007><FONT face=3DVerdana=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D879044214-14112007><FONT face=3DVerdana size=3D2>Best = regards,</FONT></SPAN></DIV> <DIV><SPAN class=3D879044214-14112007><FONT face=3DVerdana=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D879044214-14112007><FONT face=3DVerdana = size=3D2>Alessandro=20 Pira</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><FONT face=3DVerdana = size=3D2></FONT> </DIV><BR> <DIV class=3DOutlookMessageHeader lang=3Dit dir=3Dltr align=3Dleft> <HR tabIndex=3D-1> <FONT face=3DTahoma size=3D2><B>Da:</B> Christopher B Ferris=20 [mailto:[email protected]] <BR><B>Inviato:</B> mercoled=EC 14 novembre = 2007=20 15.07<BR><B>A:</B> Alessandro Pira<BR><B>Cc:</B>=20 [email protected]<BR><B>Oggetto:</B> Re: mistake in SOAP envelope=20 XMLSchema<BR></FONT><BR></DIV> <DIV></DIV><BR><FONT face=3Dsans-serif size=3D2>Alessandro,</FONT> = <BR><BR><FONT=20 face=3Dsans-serif size=3D2>The quoted text you cite is pretty clear. I = have=20 emphasized using CAPS. </FONT><BR><BR><FONT face=3DVerdana = size=3D2>"SOAP 1.2 DOES=20 NOT ALLOW the env:encodingStyle attribute to appear on the SOAP = env:Envelope,=20 whereas SOAP 1.1 allows it to appear on any element. SOAP 1.2 specifies = specific=20 elements where this attribute may be used."</FONT> <BR><BR><FONT = face=3DVerdana=20 size=3D2>Additionally, from the SOAP1.2 specification [1]:</FONT> = <BR><BR><FONT=20 size=3D3>"The </FONT><TT><FONT size=3D3>encodingStyle</FONT></TT><FONT = size=3D3>=20 <I>attribute information item</I> MAY appear on the following:</FONT> = <BR><FONT=20 face=3Dsans-serif size=3D2>1. </FONT><FONT = size=3D3>A SOAP=20 header block (see </FONT><A=20 href=3D"http://www.w3.org/TR/soap12-part1/#soapheadblock"><FONT = color=3Dblue=20 size=3D3><B><U>5.2.1 SOAP header block</U></B></FONT></A><FONT = size=3D3>).</FONT>=20 <BR><FONT face=3Dsans-serif size=3D2>2. = </FONT><FONT=20 size=3D3>A child <I>element information item</I> of the SOAP = </FONT><TT><FONT=20 size=3D3>Body</FONT></TT><FONT size=3D3> <I>element information item</I> = (see=20 </FONT><A href=3D"http://www.w3.org/TR/soap12-part1/#soapbodyel"><FONT = color=3Dblue=20 size=3D3><B><U>5.3.1 SOAP Body child Element</U></B></FONT></A><FONT = size=3D3>) if=20 that child is not a SOAP Fault <I>element information item</I> (see = </FONT><A=20 href=3D"http://www.w3.org/TR/soap12-part1/#soapfault"><FONT color=3Dblue = size=3D3><B><U>5.4 SOAP Fault</U></B></FONT></A><FONT size=3D3>).</FONT> = <BR><FONT=20 face=3Dsans-serif size=3D2>3. </FONT><FONT = size=3D3>A child=20 <I>element information item</I> of the SOAP </FONT><TT><FONT=20 size=3D3>Detail</FONT></TT><FONT size=3D3> <I>element information = item</I> (see=20 </FONT><A = href=3D"http://www.w3.org/TR/soap12-part1/#faultdetailentry"><FONT=20 color=3Dblue size=3D3><B><U>5.4.5.1 SOAP detail = entry</U></B></FONT></A><FONT=20 size=3D3>).</FONT> <BR><FONT face=3Dsans-serif size=3D2>4. = =20 </FONT><FONT size=3D3>Any descendent of 1, 2, and 3 above.</FONT>=20 <P><FONT size=3D3>The </FONT><TT><FONT = size=3D3>encodingStyle</FONT></TT><FONT=20 size=3D3> <I>attribute information item</I> MUST NOT appear on any = element other=20 than above in a SOAP message infoset.</FONT><FONT face=3DVerdana = size=3D2>"</FONT>=20 <BR><BR><FONT face=3Dsans-serif size=3D2>The soap:encodingStyle = attribute is NOT=20 permitted to be included in on the soap:Envelope element. Therefore, the = schema=20 is correct.</FONT> <BR><BR><FONT face=3Dsans-serif size=3D2>[1]=20 http://www.w3.org/TR/soap12-part1/#soapencattr</FONT> <BR><BR><FONT=20 face=3Dsans-serif size=3D2>Cheers,</FONT> <BR><BR><FONT = face=3Dsans-serif=20 size=3D2>Christopher Ferris<BR>STSM, Software Group Standards = Strategy<BR>email:=20 [email protected]<BR>blog:=20 http://www.ibm.com/developerworks/blogs/page/chrisferris<BR>phone: +1 = 508 234=20 2986</FONT> <BR><BR><TT><FONT size=3D2>[email protected] wrote = on=20 11/12/2007 05:44:25 AM:<BR><BR>> Hi all,</FONT></TT> <BR><TT><FONT=20 size=3D2>> </FONT></TT> <BR><TT><FONT size=3D2>> I am = writing to this=20 mailing list since I think I found a mistake in<BR>> the official xml = schema=20 for SOAP envelopes:</FONT></TT> <BR><TT><FONT size=3D2>> = </FONT></TT>=20 <BR><TT><FONT size=3D2>> = http://schemas.xmlsoap.org/soap/envelope/</FONT></TT>=20 <BR><TT><FONT size=3D2>> </FONT></TT> <BR><TT><FONT = size=3D2>> The error=20 involves the encodingStyle attribute which (as stated in <BR>> = examples in=20 the note and also in [1]) seems possible to use in the <BR>> Envelope = element.</FONT></TT> <BR><TT><FONT size=3D2>> But the official = XMLSchema=20 (http://schemas.xmlsoap.org/soap/envelope/<BR>> ) forbids this since = it=20 states:</FONT></TT> <BR><TT><FONT size=3D2>> </FONT></TT> = <BR><TT><FONT=20 size=3D2>> [...]</FONT></TT> <BR><TT><FONT size=3D2>> = <xs:complexType=20 name=3D"Envelope"><BR>> <xs:sequence><BR>> =20 <xs:element ref=3D"tns:Header" minOccurs=3D"0"/><BR>> = =20 <xs:element ref=3D"tns:Body" minOccurs=3D"1"/><BR>> = =20 <xs:any namespace=3D"##other" minOccurs=3D"0" = maxOccurs=3D"unbounded"=20 <BR>> processContents=3D"lax"/><BR>> = </xs:sequence><BR>>=20 <xs:anyAttribute namespace=3D"##other" = processContents=3D"lax"/><BR>>=20 </xs:complexType></FONT></TT> <BR><TT><FONT size=3D2>> = [...]</FONT></TT>=20 <BR><TT><FONT size=3D2>> </FONT></TT> <BR><TT><FONT = size=3D2>> I think=20 it should say namespace=3D"##any" in the xs:anyAttribute <BR>> = element (or=20 explicitly define the encodingStyle attribute).</FONT></TT> = <BR><TT><FONT=20 size=3D2>> </FONT></TT> <BR><TT><FONT size=3D2>> I wrote you = because the=20 company I work for publishes some <BR>> webservices for our = customers, and we=20 use 3rd party libraries for <BR>> managing SOAP communication. Now = some of=20 our customers for some <BR>> reason are accusing us to be not = compliant to=20 the official SOAP <BR>> protocol, which I think is not true, but even = W3C=20 XMLSchema <BR>> validator shows that the Envelope we use is not valid = because=20 of the<BR>> "encodingStyle" attribute.</FONT></TT> <BR><TT><FONT = size=3D2>>=20 </FONT></TT> <BR><TT><FONT size=3D2>> Can you please check if = it's=20 possible to correct the XMLSchema?</FONT></TT> <BR><TT><FONT = size=3D2>>=20 </FONT></TT> <BR><TT><FONT size=3D2>> Thank you in advance for = your=20 time,</FONT></TT> <BR><TT><FONT size=3D2>> </FONT></TT> = <BR><TT><FONT=20 size=3D2>> Alessandro Pira</FONT></TT> <BR><TT><FONT size=3D2>>=20 </FONT></TT> <BR><TT><FONT size=3D2>> </FONT></TT> = <BR><TT><FONT=20 size=3D2>> [1] : the SOAP 1.2 part 0 Primer in Chapter 6 (Changes = Between SOAP=20 <BR>> 1.1 and SOAP 1.2) states:</FONT></TT> <BR><TT><FONT = size=3D2>>=20 </FONT></TT> <BR><TT><FONT size=3D2>> "SOAP 1.2 does not allow = the=20 env:encodingStyle attribute to appear <BR>> on the SOAP env:Envelope, = whereas=20 SOAP 1.1 allows it to appear on <BR>> any element. SOAP 1.2 specifies = specific elements where this <BR>> attribute may be = used."</FONT></TT>=20 <BR><TT><FONT size=3D2>> </FONT></TT> <BR><TT><FONT = size=3D2>>=20 </FONT></TT></P></BODY></HTML> ------_=_NextPart_001_01C826CD.5651873C--