-
Maintaining Session With JAX-WS (4 messages)
- Posted by: Joseph Ottinger
- Posted on: June 08 2006 10:11 EDT
In "Maintaining Session With JAX-WS," Rama Pulavarthi shows how to use session state for web services from both the server's perspective and the client code, through the use of WebServiceContext from the Common Annotations for Java specification. From the client side, session state is managed through the use of the MessageContext.SESSION_MAINTAIN_PROPERTY (set to true) in the request process. Hello proxy = new HelloService().getHelloPort(); ((BindingProvider)proxy) .getRequestContext() .put(BindingProvider.SESSION_MAINTAIN_PROPERTY,true); int result = proxy.getCounter(); System.out.println(result); result = proxy.getCounter(); System.out.println(result);Threaded Messages (4)
- XFire, HTTP session by Sean Sullivan on June 08 2006 13:21 EDT
- Re: XFire, HTTP session by Roland Altenhoven on June 09 2006 01:03 EDT
- how to get RequestContext in xfire by Davy sun on July 13 2006 23:40 EDT
- Re: Maintaining Session With JAX-WS by Guido Anzuoni on June 09 2006 10:05 EDT
-
XFire, HTTP session[ Go to top ]
- Posted by: Sean Sullivan
- Posted on: June 08 2006 13:21 EDT
- in response to Joseph Ottinger
If you are an XFire user, you can accomplish the same thing with the services.xml file @example session @see http://xfire.codehaus.org/services.xml+Reference @see http://envoisolutions.com/xfire/api/org/codehaus/xfire/transport/Session.html -
Re: XFire, HTTP session[ Go to top ]
- Posted by: Roland Altenhoven
- Posted on: June 09 2006 01:03 EDT
- in response to Sean Sullivan
Yeah, all roads lead to Rome - but XFire provides a grandiose elegance. Roland SOA Kompetenznetzwerk (German) http://www.soa-competence-network.deIf you are an XFire user, you can accomplish the same thing with the services.xml file
@example session
@see http://xfire.codehaus.org/services.xml+Reference
@see http://envoisolutions.com/xfire/api/org/codehaus/xfire/transport/Session.html -
how to get RequestContext in xfire[ Go to top ]
- Posted by: Davy sun
- Posted on: July 13 2006 23:40 EDT
- in response to Sean Sullivan
i am a xfire user. but how can i get the RequestContext in xfire. Hello proxy = new HelloService().getHelloPort(); ((BindingProvider)proxy) .getRequestContext() .put(BindingProvider.SESSION_MAINTAIN_PROPERTY,true); when cast proxy to BindingProvider,it throw ClassCastException! how to resolve? TKS -
Re: Maintaining Session With JAX-WS[ Go to top ]
- Posted by: Guido Anzuoni
- Posted on: June 09 2006 10:05 EDT
- in response to Joseph Ottinger
Again back to about 10 years ago. AKA hot water discovery. The funny thing is that with CORBA everything is managed on the server side, leaving the client unaware. As it have to be. Guido. P.S. With a handful lines of code