QName serviceName = new QName("http://apache.org/hello_world_xml_http/wrapped",
"cutomerservice");
QName portName = new QName("http://apache.org/hello_world_xml_http/wrapped",
"RestProviderPort");
Cutomerservice cutomerservice = new Cutomerservice(wsdlURL, serviceName);
Client client = new Client();
InputStream is = client.getClass().getResourceAsStream("CustomerJohnReq.xml");
Document doc = XMLUtils.parse(is);
DOMSource reqMsg = new DOMSource(doc);
// Sent HTTP POST request to update customer info
Dispatch<DOMSource> disp = cutomerservice.createDispatch(portName, DOMSource.class,
Service.Mode.PAYLOAD);
System.out.println("Invoking server through HTTP POST to update customer info");
DOMSource result = disp.invoke(reqMsg);
printSource(result);