Document document = XMLUtils.newDocument(reqSource);
String msgString = null;
SOAPEnvelope msg = new SOAPEnvelope();
RPCParam arg1 = new RPCParam("urn:myNamespace", "testParam", document.getFirstChild());
arg1.setXSITypeGeneration(Boolean.FALSE);
RPCElement body = new RPCElement("urn:myNamespace", "method1", new Object[] { arg1 });
msg.addBodyElement(body);
body.setEncodingStyle(Constants.URI_LITERAL_ENC);
SerializationContext context = new SerializationContextImpl(stringWriter, msgContext);
msg.output(context);
msgString = stringWriter.toString();
// Now reparse into DOM so we can check namespaces.
StringReader resReader = new StringReader(msgString);