Reputation: 1766
I have a soap envelope
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="file:///Users/michael/Downloads/soap.xsd">
<soapenv:Body>
</soapenv:Body>
</soapenv:Envelope>
soap.xsd is just a local version of http://schemas.xmlsoap.org/soap/envelope/ saved to soap.xsd
when i try to validate this, it says the schema target is incorrect per the targetAction
All trial and error point to the xmlns:xsi tag as giving the error
I wonder if it has to do with SOAP 1.0 vs 1.1
(i have been able to validate the xml inside the soap with the exact same method) im pretty sure this can be done in one element, but for the sake of sanity, im trying to get this to work
Upvotes: 0
Views: 2451
Reputation: 877
ok the answer to validating a soap is the following format, using trial and error
<?xml version='1.0' encoding='UTF-8'?>
<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/\">
<soapenv:Body>
</soapenv:Body>
</soapenv:Envelope>
You can then validate that this is a valid SOAP, but sadly, if there is xml inside the body, and you also properly point to the xsd file, they both cannot be validated.
When I say validated, I mean not using lib2xml or any other external tool. Only using the xml file itself to validate
Upvotes: 1