wood burning stoves 2.0*
The moose likes Web Services and the fly likes WS Addressing and State.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "WS Addressing and State.." Watch "WS Addressing and State.." New topic
Author

WS Addressing and State..

C Shinde
Ranch Hand

Joined: Oct 22, 2009
Posts: 60
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



Regards,
Chetan Shinde
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
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!


My free books and tutorials: http://www.slideshare.net/krizsan
C Shinde
Ranch Hand

Joined: Oct 22, 2009
Posts: 60
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

Joined: Oct 22, 2009
Posts: 60
Anyone with an answer for this question? How is Session maintained with JAX-RPC?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WS Addressing and State..
 
Similar Threads
How to implement Stateful webservices?
How to learn WS*?
SCDJWS 5.0(310-230) Exam objectives
axis 1.4/ wws4j signing and .net problem
Websphere 6.0 and WS-Addressing