// TODO: don't know why this is here, but without it some unit tests fail...
OMDocument omDoc = OMAbstractFactory.getSOAP11Factory().createOMDocument();
omDoc.addChild(envelope);
SOAPBody body = envelope.getBody();
OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXOMBuilder(parser);
OMElement bodyElement = builder.getDocumentElement();
if (addTextAroundBody) {
OMFactory fac = OMAbstractFactory.getOMFactory();
body.addChild(fac.createOMText("\n"));
body.addChild(bodyElement);
body.addChild(fac.createOMText("\n"));