W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
builder.address("http://localhost:"
+ greeterPort
+ "/SOAPDispatchService/SoapDispatchPort");
builder.serviceName(SERVICE_NAME);
builder.endpointName(PORT_NAME);
W3CEndpointReference w3cEpr = builder.build();
Dispatch<SOAPMessage> disp = service
.createDispatch(w3cEpr, SOAPMessage.class, Service.Mode.MESSAGE);
InputStream is = getClass().getResourceAsStream("resources/GreetMeDocLiteralReq.xml");
SOAPMessage soapReqMsg = MessageFactory.newInstance().createMessage(null, is);