(sorry for any cross-posting)

I'm attempting to parse a SOAP response with Xerces, and things are looking fine but for the encodingStyle attribute of the 'Envelope' element.

The beginning of a SOAP envelope is something like this:

---
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP- ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:SOAP- ENC="http://schemas.xmlsoap.org/soap/encoding/";><SOAP-ENV:Body>...
---

I grabbed the Schema file for the envelope here from http://schemas.xmlsoap.org/soap/encoding/ (BTW, how can I tell Xerces to get '/' if there is no actual server file name associated with a URL?), named it 'soap-envelope.xsd', and setExternalSchemaLocation() to be 'http://schemas.xmlsoap.org/soap/envelope/ soap-envelope.xsd'.

Upon parsing the response, I get a validation error:

Attribute '{http://schemas.xmlsoap.org/soap/envelope/}encodingStyle' is not declared for element 'Envelope'.

If I add the 'http://schemas.xmlsoap.org/soap/encoding/ soap- encoding.xsd' string to the setExternalSchemaLocation call, it complains upon parsing the encoding Schema file.

Removing the attribute from the XML allows parsing subsequently - I'm sure there's something basic that I'm missing here - any pointers?

Thank you!
-lev

Reply via email to