Re: Namespace for the 'detail' element

Dan Maharry <[email protected]> Mon, 24 Feb 2003 09:22:21 -0000
Newsgroups gmane.comp.windows.devel.soap.general
Message-ID <006301c2dbe7$d10ccac0$878c87d9@MONALISA>
Nope. It means that your parser doesn't handle default namesapces very
well.
If you give the soap namespace a prefix and prepend your elements
correctly does your document pass validation?

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

Dan

----- Original Message -----
From: "Mark B" <[email protected]>
To: <[email protected]>
Sent: Sunday, February 23, 2003 7:45 PM
Subject: [SOAP] Namespace for the 'detail' element


> 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.