SOAPService service = new SOAPService(wsdl, serviceName);
assertNotNull(service);
InputStream is = getClass().getResourceAsStream("resources/GreetMeDocLiteralReq.xml");
SOAPMessage soapReqMsg = MessageFactory.newInstance().createMessage(null, is);
assertNotNull(soapReqMsg);
InputStream is1 = getClass().getResourceAsStream("resources/GreetMeDocLiteralReq1.xml");
SOAPMessage soapReqMsg1 = MessageFactory.newInstance().createMessage(null, is1);
assertNotNull(soapReqMsg1);
InputStream is2 = getClass().getResourceAsStream("resources/GreetMeDocLiteralReq2.xml");
SOAPMessage soapReqMsg2 = MessageFactory.newInstance().createMessage(null, is2);
assertNotNull(soapReqMsg2);
InputStream is3 = getClass().getResourceAsStream("resources/GreetMeDocLiteralReq3.xml");
SOAPMessage soapReqMsg3 = MessageFactory.newInstance().createMessage(null, is3);
assertNotNull(soapReqMsg3);
Dispatch<SOAPMessage> disp = service.createDispatch(portName,
SOAPMessage.class, Service.Mode.MESSAGE);
SOAPMessage soapResMsg = disp.invoke(soapReqMsg);
assertNotNull(soapResMsg);
String expected = "Hello TestSOAPInputMessage";
assertEquals("Response should be : Hello TestSOAPInputMessage",
expected, soapResMsg.getSOAPBody().getTextContent());
disp.invokeOneWay(soapReqMsg1);
Response response = disp.invokeAsync(soapReqMsg2);
SOAPMessage soapResMsg2 = (SOAPMessage)response.get();
assertNotNull(soapResMsg2);
String expected2 = "Hello TestSOAPInputMessage2";
assertEquals("Response should be : Hello TestSOAPInputMessage2",
expected2, soapResMsg2.getSOAPBody().getTextContent());
TestSOAPMessageHandler tsmh = new TestSOAPMessageHandler();
Future f = disp.invokeAsync(soapReqMsg3, tsmh);
assertNotNull(f);
while (!f.isDone()) {