Re: soapenv namespace and the fault child elements

Hi Anne,

If you look at the latest editors snapshot [1] you'll see that all of 
the fault child elements are now namespace qualified. Also note that 
many of the names have changed. The envelope schema will be updated in 
line with these changes.

Regards,
Marc.

[1] 
http://www.w3.org/2000/xp/Group/2/05/14/soap12-part1-1.117.html#soapfault

Anne Thomas Manes wrote:

> I think this is a new issue.
> 
> I've been reviewing Elliote Rusty Harold's latest book on Java and XML, and
> we got into this discussion on whether or not the <fault> child elements are
> actually defined within the soapenv namespace. This exchange refers to the
> SOAP 1.1 envelope namespace, but I've noticed that the SOAP 1.2 envelope
> namespace describes the <fault> child elements in the same way.
> 
> Would some XML Schema / namespaces expert take a look at this issue?
> 
> Anne Thomas Manes
> CTO, Systinet
> 
> -----Original Message-----
> From: Elliotte Rusty Harold [mailto:elharo@metalab.unc.edu]
> Sent: Thursday, May 23, 2002 10:14 AM
> To: Anne Thomas Manes
> Subject: RE: Processing XML with Java review clarifications
> 
> 
> 
>>All the <fault> elements are actually defined in the soapenv: namespace.
>>(See the schema at http://schemas.xmlsoap.org/soap/envelope/.) So your
>>second example is more technically correct than the first example.
>>
>>
> 
> I looked at the schema and I still don't think so. This is a really
> tricky point in the schema spec, but as I understand it, it works
> like this. The four fault child elements are all declared in this
> complexType declaration:
> 
>    <xs:complexType name="Fault" final="extension" >
>      <xs:annotation>
> 	  <xs:documentation>
> 	    Fault reporting structure
> 	  </xs:documentation>
> 	</xs:annotation>
>      <xs:sequence>
>        <xs:element name="faultcode" type="xs:QName" />
>        <xs:element name="faultstring" type="xs:string" />
>        <xs:element name="faultactor" type="xs:anyURI" minOccurs="0" />
>        <xs:element name="detail" type="tns:detail" minOccurs="0" />
>      </xs:sequence>
>    </xs:complexType>
> 
> In other words, the faultcode, faultstring, etc. elements are all
> "locally declared elements". Since this schema does not set
> elementFormDefault to qualified, these elements are not in the
> schema's target namespace. They are in no namespace at all.
> 
> 
>>There are lots of namespace errors in the examples in the SOAP 1.1. spec.
>>e.g., Sample 5:
>>
>>
> 
> I'm not sure these are errors. I do think they have design flaws, but
> they are namespace well-formed. In these examples, the symbol,
> Company, Price, and Symbol elements are just not in any namespace,
> just like the faultcode, faultstring, and faultactor elements. I
> suspect whoever wrote the SOAP spec had an unnatural fondness for
> locally declared elements.
> 
> 
>>POST /StockQuote HTTP/1.1
>>Host: www.stockquoteserver.com
>>Content-Type: text/xml; charset="utf-8"
>>Content-Length: nnnn
>>SOAPAction: "Some-URI"
>>
>><SOAP-ENV:Envelope
>>  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>>  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>>   <SOAP-ENV:Header>
>>       <t:Transaction
>>           xmlns:t="some-URI"
>>           SOAP-ENV:mustUnderstand="1">
>>               5
>>       </t:Transaction>
>>   </SOAP-ENV:Header>
>>   <SOAP-ENV:Body>
>>       <m:GetLastTradePrice xmlns:m="Some-URI">
>>           <symbol>DEF</symbol>
>>       </m:GetLastTradePrice>
>>   </SOAP-ENV:Body>
>></SOAP-ENV:Envelope>
>>
>><symbol> is not namespace qualified.
>>
>>Example 6:
>>
>>POST /StockQuote HTTP/1.1
>>Host: www.stockquoteserver.com
>>Content-Type: text/xml; charset="utf-8"
>>Content-Length: nnnn
>>SOAPAction: "Some-URI"
>>
>><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:GetLastTradePriceDetailed
>>         xmlns:m="Some-URI">
>>           <Symbol>DEF</Symbol>
>>           <Company>DEF Corp</Company>
>>           <Price>34.1</Price>
>>       </m:GetLastTradePriceDetailed>
>>   </SOAP-ENV:Body>
>></SOAP-ENV:Envelope>
>>
>><Symbol>, <Company>, and <Price> aren't namespace qualified.
>>
>>There are lots more. But you don't *have* to qualify your elements if
>>there's no confusion about what they mean.
>>
>>
> --
> 
> +-----------------------+------------------------+-------------------+
> | Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
> +-----------------------+------------------------+-------------------+
> |          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
> |             http://www.cafeconleche.org/books/bible2/              |
> |   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
> +----------------------------------+---------------------------------+
> |  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
> |  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
> +----------------------------------+---------------------------------+
> 
> 


-- 
Marc Hadley <marc.hadley@sun.com>
XML Technology Centre, Sun Microsystems.

Received on Friday, 24 May 2002 06:31:58 UTC