easy way to convert straight XML soap envelope into instance of Envelope
843834Oct 4 2002 — edited Oct 7 2002Hi All...
I'm searching for the Holy Grail again...
Say I have a file with a complete SOAP envelope in it:
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:getTemp xmlns:ns1="urn:xmethods-Temperature"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<zipcode xsi:type="xsd:string">68102</zipcode>
</ns1:getTemp>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Is there a magical way to convert this to an org.apache.soap.Envelope or a javax.xml.soap.Envelope without having to dice it up first and then reconstruct it in object form piece by piece? It'd be nice if you
could:
Envelope e = new Envelope("mysoapenv.xml");
with mysoapenv.xml contents being what I printed above, in other words, I want to avoid having to first parse up the envelope, then create Envelope and add the pieces back one by one, possibly unintentionally losing something along the way like a namespace identifier or reference or something...
Help! Thanks!