OK, I undestand that Axis can manage sessions and pass
the ID in SOAP headers.

But I don't see from a programmer point of view how I
can read / write from/to the session.

None of the provided examples saves any user
information in the session object.  I don't see how
they could easily do it, cause Axis does not pass to
the service any session or message handler.

My idea is to have 2 kinds of services :

A - User independant services, which do not need to
read/write in any session object. For example (stock
quotation consultation)

B - User dependant service, here are examples of 2
services which require user session management :
    1 - an application level authentification service,
which stores user information (first name, last name,
bank account number, specific rights) in a session
object
    2 - an bank statement consultation service which
gets the bank account number from the user session
object

'A' types services are easy to implement with Axis.
My feeling for 'B' type services is that it is not
trivial with Axis. 

I have the feeling that there is some Axis extensions
to developp, like extendedRPCprovider or
extendedJavaProvider with session management
capabilities.

We could imagine that services which want to use the
Session object are required to implement a
SessionAccess interface (setSession, getSession). The
generic extendedRPCProvider or extendedJavaProvider
would successively invoke the setSession method, then
the service methode requested by the client.

I guess there are much nicer solutions from a
conceptual point of view.

I don't know if I am being clear.

Apart from getting an answer to this problem, I would
like to kown if anybody has the same need ? or has
another way seeing things.

Thanks in advance,

Thierry.




--- "Adam.Leggett" <[EMAIL PROTECTED]> wrote:
> You can always use the SOAP Header to maintain
> state. Check out
> org.apache.axis.handlers.SimpleSessionHandler
> 
> Cheers
> 
> Adam
> 
> -----Original Message-----
> From: Thierry Dupont [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, February 18, 2002 8:34 PM
> To: [EMAIL PROTECTED]
> Subject: How to write a web service which updates
> the servlet session object
> ?
> 
> 
> Hello,
> 
> I find Axis very interesting. 
> Amazing how easy it is to publish a web service,
> especially stateless service, like getting stock
> quotation as show in the example.
> 
> However, I think that web applications very often
> have
> to handle user session information.
> 
> Axis can run on top of a servlet engine, and most
> servlet engines handle efficently sessions objects
> (fetch, expiration)
> 
> My question is : how can write an Axis web service
> which can update the servlet session object ?
> 
> Does anybody have a sample source code ?
> 
> Thanks in advance,
> 
> Thierry.
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

Reply via email to