I have the following file that I cURL
:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<ProcessMessage xmlns="http://www.user.com/test/">
<envelope>Encoded XML request message will go here</envelope>
</ProcessMessage>
</soap:Body>
</soap:Envelope>
The full error I get is this:
org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
When I use the file with a CDATA
element then everything works as expected.
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<ProcessMessage xmlns="http://www.user.com/test/">
<![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<envelope>Encoded XML request message will go here</envelope>
]]>
</ProcessMessage>
</soap:Body>
</soap:Envelope>
Any idea how I can accept an XML file without the CDATA
part?