... [what I use] actually melds SOAP with REST in a way, where an underlying session management system provides a session ID or token, which is then passed in every subsequent SOAP method call. This manner is a bit more in-band with SOAP, and at least theoretically decouples the session management from the SOAP request format. In the Java world, where this manner usually entails a direct SOAP > SLSB EJB endpoint, this has been commonly hacked by making the "session" a single stateful session bean, while the SOAP endpoint is a stateless session bean facade. The "session ID/token" is the serialized stateful bean's Handle, which the stateless endpoint turns around and deserializes into the stateful session bean object. This ... was all well and good in EJB 2.1. But EJB3 specifically deprecates the Handle, relying on directly saving the SFSB reference to a suitable location. Sure, you can regain access to the Handle if you reimplement the EJB 2.1 interfaces and methods. But that's just ugly and dirties up that nice, clean code with the pretty @Stateful and @Stateless annotations. If you've been doing stateful SOAP in your apps, I'd be interested to hear about it, as I'm sure others would. Personally, I'm doing the serialized Handle hack with EJB3, but I'm quickly trying to get away from it.
News: Stateful SOAP and beans blog from TSS Interop
How do you turn an inherently stateless protocol into a stateful one? Scott Balmos considers this problem on TheServerSide Interop Blog. The first way is probably the most common, he writes, and takes advantage of the fact that almost all SOAP usage has been through HTTP. This is through the roundabout retrieval of the underlying SOAP endpoint servlet's HttpSession object. He asks for people to respond, partly in context of what he calls the "serialized Handle hack:"
- Posted by: Jack Vaughan
- Posted on: May 01 2007 10:40 EDT
- Re: Stateful SOAP and beans blog from TSS Interop by Konstantin Ignatyev on May 01 2007 11:08 EDT
- Re: Stateful SOAP and beans blog from TSS Interop by Rogerio Rondini on May 02 2007 09:56 EDT
- SOAP Conversation being pushed by BEA by vijai furtado on May 02 2007 10:07 EDT
How do you turn an inherently stateless protocol into a stateful one?Well, just turn it off :) use that was designed to support all sorts of distributed interactions: CORBA
Checkout ICE from zeroc.com too. Anyway, all this reinventing the wheel that is able to produce only oval shaped artifacts is really annoying. Guido.
How do you turn an inherently stateless protocol into a stateful one?
Well, just turn it off :)
use that was designed to support all sorts of distributed interactions: CORBA
Well, you can find more about statefull webservices in OASIS website http://www.oasis-open.org OASIS crated a new specification called WSRF (Web Service Resource Framework). "The purpose of the OASIS WSRF TC is to define a generic and open framework for modeling and accessing stateful resources using Web services. This includes mechanisms to describe views on the state, to support management of the state through properties associated with the Web service, and to describe how these mechanisms are extensible to groups of Web services." http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsrf
There is also a parallel effort at BEA called SOAP Conversation. that tries to address this issue... http://dev2dev.bea.com/pub/a/2002/06/SOAPConversation.html