I have a requirement to pass XML as a string into SOAP request to an external system. I am generating an XML using DOM.Document class, but when I am sending it in SOAP request, it gets encoded with
< replaced with
I tried to envelope in CDATA using:
XmlStreamWriter xsw = new XmlStreamWriter(); xsw.writeCData(xml)
but with no luck. Even the
CDATA envelope is getting encoded.
Please let me know if there is any method to pass the XML without being encoded.