You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Scott Merritt <SM...@abilizer.com> on 2001/05/08 00:34:30 UTC

Dumping out XML for Envelope Object

Is there a way to build an Envelope object in the code and then dump out the
XML without using the SOAP Server?

Essentially do something like:

Envelope env = new Envelope();

env.setAttribute(new QName("xmlns", "SOAP-ENV"),
	"http://schemas.xmlsoap.org" + "/soap/envelope/");
env.setAttribute(new QName("xmlns", "xsi"),
	"http://www.w3.org/1999/XMLS" + "chema-instance");
env.setAttribute(new QName("xmlns", "xsd"),
	"http://www.w3.org/1999/" + "XMLSchema");
env.setAttribute(new QName("SOAP-ENV", "encodingStyle"),
	"http://schemas.xmlsoap." + "org/soap/encoding/");

html = env.toString();


And then get:

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
 <SOAP-ENV:Body>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org