QName wrapName = new QName("http://objectweb.org/hello_world_soap_http/types", "greetMe");
QName elName = new QName("http://objectweb.org/hello_world_soap_http/types", "requestType");
String data = new String("TestSOAPInputMessage");
String str = SOAPMessageUtil.createWrapDocLitSOAPMessage(wrapName, elName, data);
TestInputStreamContext inCtx = new TestInputStreamContext(str.getBytes());
binding.read(inCtx, soapContext);
SOAPMessage msg = soapContext.getMessage();
assertNotNull(msg);
assertTrue(msg.getSOAPBody().hasChildNodes());
NodeList list = msg.getSOAPBody().getChildNodes();
assertEquals(1, list.getLength());
Node wrappedNode = list.item(0).getFirstChild();
assertTrue(wrappedNode.hasChildNodes());
assertEquals(data, wrappedNode.getFirstChild().getNodeValue());
//Parse SOAP 1.2 message
InputStream is = getClass().getResourceAsStream("resources/Soap12message.xml");
inCtx.setInputStream(is);
try {
binding.read(inCtx, soapContext);
fail("Should have received a SOAP FaultException");
} catch (SOAPFaultException sfe) {
SOAPFault sf = sfe.getFault();