• Post Reply Bookmark Topic Watch Topic
  • New Topic

JAX-WS - understanding BindingProvider  RSS feed

 
Chanuth Fernando
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am new to JAX-WS framework .

Here is my client sample code( download from web) which works fine . Can someone please explain the purpose of the BindingProvider and how it works here.

As per below code once we set the BindingProvider instance , it is not use in the subsequent calls .
There is no relationship with the BindingProvider and the service instance.??

withreference to below code can some oneexpalin how the stub instnace (SimpleService) get the BindingProvider instance ???


SimpleService_Service service = new SimpleService_Service();
SimpleService stub = service.getP1();
String target = "http://localhost:8080/axis2/services/SimpleService";

System.out.println("Connecting to " + target);
BindingProvider provider = (BindingProvider)stub;
provider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, target);


Request req = new Request();
req.setString1("Hello ");
req.setString2("JAX-WS");


System.out.println(stub.concat(req)
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
The stub does not "get" the BindingProvider, the stub object IS in fact a BindingProvider.
If you look at sections 4.2 (section 4.2.3 contains a code example similar to yours) and 6.1 of the JAX-WS 2.1 specification, there is some mentioning about the relationship between a port and the BindingProvider interface.
Hope this provides some explanation - otherwise please do not hesitate to ask!
Best wishes!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!