• 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

WS Addressing and State..

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I really dont understand the WS Addressing spec.I know it is a feature that can be set when connecting to an endpoint service, and if it is set to true, it sends some information in the address.Can someone tell me what this Spec is all about in brief?

As for maintaining State of a user across calls to a WebService, do I need to only set a property 'BindingProvider.SESSION_MAINTAIN_PROPERTY' to true? So that the WS can maintain state across multiple calls for the same client.Can anyone tell me what does this BindingProvider mean and do?

Regards,
Chetan


 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

C Shinde wrote:I really dont understand the WS Addressing spec.I know it is a feature that can be set when connecting to an endpoint service, and if it is set to true, it sends some information in the address.Can someone tell me what this Spec is all about in brief?


WS-Addressing allows you to, regardless of which kind of transport used (HTTP, JMS, etc etc) for transporting requests and responses between client(s) and server, specify where, for instance, a reply is to be sent to.
If you are using HTTP, you will use URLs, but URLs cannot be used if you use JMS or some other transport. WS-Addressing allows you to specify, for instance, the address of a web service accepting requests via JMS.


As for maintaining State of a user across calls to a WebService, do I need to only set a property 'BindingProvider.SESSION_MAINTAIN_PROPERTY' to true? So that the WS can maintain state across multiple calls for the same client.


Yes, for JAX-WS, this is true. Like this:

Can anyone tell me what does this BindingProvider mean and do?


It is an abstraction that provides access to protocoll binding parameters and default context objects for request and response messages.
If you look at the API, it is an interface that in turn is extended by the Dispatch<T> interface. If you look in the JAX-WS specification, you will also find that web service proxies also implement this interface.
If I want some value to be included in the context that is passed to the web service each time I make a request from a client, I can retrieve the request context and set a property in it. This is exactly what is done in the code example above. Hope this makes things more clear!
Best wishes!
 
C Shinde
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ivan, just another question, well this is all good for JAX-WS, what was done in JAX-RPC time? How was the session maintained?
 
C Shinde
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone with an answer for this question? How is Session maintained with JAX-RPC?
 
A lot of people cry when they cut onions. The trick is not to form an emotional bond. This tiny ad told me:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic