Checking SOAP Messages

I cannot get SOAP messages to validate XML. For example, I took the SOAP message below Wikipedia and it did not comply with the Valid valid validator . Is the validator incorrect or is there an error in the SOAP file? If the validator is wrong, can you suggest something else? He must consider the schemes. For example, W3C says that this xml is well-formed, but in fact it is terribly invalid, as Validome correctly points out.

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
  <soapenv:Header>
    <wsa:ReplyTo>
      <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
    </wsa:ReplyTo>
    <wsa:From>
      <wsa:Address>http://localhost:8080/axis2/services/MyService</wsa:Address>
    </wsa:From>
    <wsa:MessageID>ECE5B3F187F29D28BC11433905662036</wsa:MessageID>
  </soapenv:Header>
  <soapenv:Body>
    <req:echo xmlns:req="http://localhost:8080/axis2/services/MyService/">
      <req:category>classifieds</req:category>
    </req:echo>
  </soapenv:Body>
</soapenv:Envelope>
+3
source share
4 answers

The XML that you published may be completely right - if you specified the location of the schemas for which you can validate it.

"" XML " XML-". - .

+3

SOAP :

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
  <soapenv:Header>
    <wsa:ReplyTo>
      <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
    </wsa:ReplyTo>
    <wsa:From>
      <wsa:Address>http://localhost:8080/axis2/services/MyService</wsa:Address>
    </wsa:From>
    <wsa:MessageID>ECE5B3F187F29D28BC11433905662036</wsa:MessageID>
  </soapenv:Header>
  <soapenv:Body>
    <req:echo xmlns:req="http://localhost:8080/axis2/services/MyService/">
      <req:category>classifieds</req:category>
    </req:echo>
  </soapenv:Body>
</soapenv:Envelope>
+4

, , SOAP, , . , , , . , , , SOAP, .

, <mod_eeduns/> <total_obligatedAmount/>, ( ) <total_obligatedAmount_within_this_search/>

SOAP, XSD, XML-. , ( ). , .

, W3C , , , . , ..<eeParentDuns ></eeParentDuns>.. , , Xml, SOAP + XSD.

0

In order for the SOAP message to look exactly as it should be, you must check it for all the schemas referenced in this message. In your example, this is SOAP, WS Addressing, and the schema for the user namespace (myService).

SOAP and WS-Addressing schemes are accessible from a URL that is also used for the namespace, but this is just a convention, not a requirement.

0
source

Source: https://habr.com/ru/post/1714188/


All Articles