• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

JAX-WS - understanding BindingProvider

Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ");

Ranch Hand
Posts: 2198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic