Re: Namespace for the 'detail' element

Bob Cunnings <[email protected]> Mon, 24 Feb 2003 08:51:24 -0700
Newsgroups gmane.comp.windows.devel.soap.general
Organization Lectrosonics, Inc.
Message-ID <3E59DD0B.21438.9150FFE@localhost>
Yes, the children of the SOAP 1.1 Fault element are not in any
namespace. This should work as well:

<?xml version="1.0" encoding="utf-8"?>
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
 <env:Body>
   <env:Fault>
      <faultcode>env:Client</faultcode>
      <faultstring>Invalid attempt to ....</faultstring>
      <detail>
         <dispositionReport  xmlns="http://myuri.org/v1.1">
            <result>Invalid userid or password</result>
         </dispositionReport>
      </detail>
   </env:Fault>
 </env:Body>
</env:Envelope>

RC

> The following SOAP document fails schema validation against the SOAP xsd
> (http://schemas.xmlsoap.org/soap/envelope)
> ----------------------
> <?xml version="1.0" encoding="utf-8"?>
> <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
>   <Body>
>     <Fault>
>       <faultcode>Client</faultcode>
>       <faultstring>Invalid attempt to ....</faultstring>
>       <detail>
>         <dispositionReport  xmlns="http://myuri.org/v1.1">
>           <result>Invalid userid or password</result>
>         </dispositionReport>
>       </detail>
>     </Fault>
>   </Body>
> </Envelope>
> ----------------------
>
> Adding a null namespace declaration to each of the
> elements 'faultcode', 'faultstring' and 'detail' causes the above document
> to pass schema validation.
>
> ----------------------
> <?xml version="1.0" encoding="utf-8"?>
> <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
>   <Body>
>     <Fault>
>       <faultcode xmlns=''>Client</faultcode>
>       <faultstring xmlns=''>Invalid attempt to ....</faultstring>
>       <detail xmlns=''>
>         <dispositionReport  xmlns="http://myuri.org/v1.1">
>           <result>Invalid userid or password</result>
>         </dispositionReport>
>       </detail>
>     </Fault>
>   </Body>
> </Envelope>
> ----------------------
>
> Does that mean that these elements (in particular 'detail') should not be
> declared with the SOAP namespace, and MUST occur within the null namespace?
>
> thanks,
>
> -mb
>
> You can read messages from the SOAP archive, unsubscribe from SOAP, or subscribe to other
> DevelopMentor lists at http://discuss.develop.com.

You can read messages from the SOAP archive, unsubscribe from SOAP, or subscribe to other
DevelopMentor lists at http://discuss.develop.com.