Re: How Do I Implicitly Maintain Web Services WOSessions?
Re: How Do I Implicitly Maintain Web Services WOSessions?
- Subject: Re: How Do I Implicitly Maintain Web Services WOSessions?
- From: Andrew Lindesay <email@hidden>
- Date: Fri, 14 Apr 2006 17:11:38 +1200
Hello;
I have to get the client to capture the SessionID from the response
to the first request and pass it back explicitly as a parameter on
each subsequent request to the server.
I have found this to be the best way to do it. I looked into other
options, but considered this to be the best approach given the lack
of features in some SOAP implementations that potential WS-clients
may be forced to use.
You can provide a login web service (WS) which returns the wosid of
the new session and a dictionary of other endpoint URL-s which are
constructed from the WOContext instance to be instance-fixed (or
sticky-sessioned in the case of a servlet deploy). Every other WS
method takes "wosid" as the first argument. Each WS can be
subclassed from some proprietary class which has a method
"restoreSession(...)" that throws a runtime if there's no session
present. Every WS method aside from login first calls
"super.restoreSession(...)". The WS client picks up the endpoints it
is given and uses them for future communications ensuring the WS
invocations end up at the right instance/container.
Please note that this approach has only had low-volume testing in a
production environment to date with me, but seems to be fairly
logical. I'd welcome any feedback regarding other approaches.
cheers.
___
Andrew Lindesay
www.lindesay.co.nz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden