try { // Call Web Service Operation
MyServiceService service = new MyServiceService();
MyService port = service.getMyServicePort();
BindingProvider bp = (BindingProvider)port;
bp.getRequestContext().put(
BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost:8080/MyServiceService?wsdl");
java.lang.String username = "admin";
java.lang.String password = "admin";
ResultType result = port.myServiceOperation(username, password);
} catch (Exception ex) {
//..
}
The tip is from here: http://tugdualgrall.blogspot.com/2009/02/jax-ws-how-to-configure-service-end_17.html
Hiç yorum yok:
Yorum Gönder