Validation of a SOAP-Message does not work

This should cover W3C XML Schema, Relax NG and DTD related problems.
tkoch
Posts: 1

Validation of a SOAP-Message does not work

Tue Sep 13, 2011 5:33 pm

My xml's should validate against xsd's with a structure like:

Code: Select all

master.xsd
   |- slave1.xsd
          |-- slave2.xsd


There is no problem if I validate the pure xml.

Code: Select all

<myDS xmlns="master.xsd">
...
   <mySS xmlns="slave1.xsd">
      ...
   </mySS>
...
</myDS>


Now if this xml is sent in a SOAP-Message and I want to validate this SOAP-Message, it fails.

Code: Select all

<s:Envelope ...>
   <s:Header>...</s:Header>
   <s:Body ...>
      <myDS xmlns="master.xsd">
      ...
         <mySS xmlns="slave1.xsd">
           ...
         </mySS>
      ...
      </myDS>
    </s:Body>
</s:Envelope>


Actually I think it should work with the schemas.xmlsoap.org-soap.xsd only.

I found a hack enlarging the schemas.xmlsoap.org-soap.xsd by <import ...> tags. This works so far.
But in my opinion this should not be necessary.

Is there any solution to avoid my hack?
Radu
Posts: 5224

Re: Validation of a SOAP-Message does not work

Wed Sep 14, 2011 11:29 am

Hi,

I'm sorry but I don't quite understand everything.

What is this construct?

Code: Select all

xmlns="master.xsd"


The xmlns attribute defines a binding for the default namespace of the current element. Are you referring to the xsi:schemaLocation attribute which specifies the schema which should be used to validate the XML file?

Probably the SOAP server also needs to know the XML Schema locations in order to validate the XML on its side. Is this related in any way to WSDL?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 1 guest