SOAPService service = new SOAPService(wsdl, serviceName);
assertNotNull(service);
InputStream is = getClass().getResourceAsStream("resources/GreetMeDocLiteralSOAPBodyReq.xml");
InputSource inputSource = new InputSource(is);
SAXSource saxSourceReq = new SAXSource(inputSource);
assertNotNull(saxSourceReq);
InputStream is1 = getClass().getResourceAsStream("resources/GreetMeDocLiteralSOAPBodyReq1.xml");
InputSource inputSource1 = new InputSource(is1);
SAXSource saxSourceReq1 = new SAXSource(inputSource1);
assertNotNull(saxSourceReq1);
InputStream is2 = getClass().getResourceAsStream("resources/GreetMeDocLiteralSOAPBodyReq2.xml");
InputSource inputSource2 = new InputSource(is2);
SAXSource saxSourceReq2 = new SAXSource(inputSource2);
assertNotNull(saxSourceReq2);
InputStream is3 = getClass().getResourceAsStream("resources/GreetMeDocLiteralSOAPBodyReq3.xml");
InputSource inputSource3 = new InputSource(is3);
SAXSource saxSourceReq3 = new SAXSource(inputSource3);
assertNotNull(saxSourceReq3);
Dispatch<SAXSource> disp = service.createDispatch(portName,
SAXSource.class, Service.Mode.PAYLOAD);
SAXSource saxSourceResp = disp.invoke(saxSourceReq);
assertNotNull(saxSourceResp);
String expected = "Hello TestSOAPInputMessage";
checkSAXSource(expected, saxSourceResp);
disp.invokeOneWay(saxSourceReq1);
Response response = disp.invokeAsync(saxSourceReq2);
SAXSource saxSourceResp2 = (SAXSource)response.get();
assertNotNull(saxSourceResp2);
String expected2 = "Hello TestSOAPInputMessage2";
checkSAXSource(expected2, saxSourceResp2);
TestSAXSourceHandler tssh = new TestSAXSourceHandler();
Future fd = disp.invokeAsync(saxSourceReq3, tssh);
assertNotNull(fd);
while (!fd.isDone()) {
//wait
}
String expected3 = "Hello TestSOAPInputMessage3";
SAXSource saxSourceResp3 = tssh.getSAXSource();
assertNotNull(saxSourceResp3);
checkSAXSource(expected3, saxSourceResp3);
}