"</soapenv:Body></soapenv:Envelope>";
InputStream inputStream = new ByteArrayInputStream(envelope.getBytes("UTF-8"));
AxiomSoapMessage message = messageFactory.createWebServiceMessage(new MockTransportInputStream(inputStream));
StringResult result = new StringResult();
transformer.transform(message.getPayloadSource(), result);
XMLUnit.setIgnoreWhitespace(true);
String expectedPayload =
"<ns1:sendMessageResponse xmlns:ns1='urn:Sole' xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' soapenv:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>" +
"<sendMessageReturn xsi:type='soapenc:string' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'>" +
"<![CDATA[<?xml version='1.0' encoding='UTF-8'?>" + "<PDresponse>" +
"<isStatusOK>true</isStatusOK>" + "<status>0</status>" +
"<payLoad><![CDATA[<?xml version='1.0' encoding='UTF-8'?><response>ok</response>]]]]>><![CDATA[</payLoad>" +
"</PDresponse>]]></sendMessageReturn>" + "</ns1:sendMessageResponse>";
XMLAssert.assertXMLEqual(expectedPayload, result.toString());
}