Reputation: 1
I have a JAX-WS imported WSDL client. When I try to connect to webservice endpoint, the JAX-WS client tries to load WSDL. Why that?
Questions:
Adding port with the same QName and port name fails, because I cant add the same. Adding a different port is OK, but I cant get it from the webservice delegate, because the WSDL does not contains the added port definition.
JAX-WS seem to be completely wrong way :(
Upvotes: 0
Views: 4039
Reputation: 42060
Today you're in luck. There is a way, as you've mentioned.
QName qname = new QName("http://thenamespace", "FooService");
FooService service = new FooService(null, qname); // null for ignore WSDL file
Foo port = service.getFooPort();
BindingProvider bindingProvider = (BindingProvider) port;
bindingProvider.getRequestContext()
.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://foo.com/soap/fooBean");
// Use the service
Object obj = port.doSomething(param);
Upvotes: 2