Hi,

(Hope I understand what you are asking.)

 

We faced similar problem while designing system using CORBA. Here are my 2 cents on this.

 

Is your server going to entertain multiple connections? How complex the states are? You don’t seem to have Logout method. How you are going to reclaim the resources allocated for that connection?

 

A classic simplified way is to keep the object (server) stateless and allow the client to invoke any method by supplying a valid token. The token is presented to client during logon process. The server needs to do the task of session management. (A smart server could have table of user/tokens/ time etc to detect dead sessions.)

 

If you have less complex states and pretty straight forward tasks/methods, you could still follow same route. The table becomes a bit more complex with enumerated states or reference to “state” object. You need good session management to identify dead connections. You could live without it.

 

More complicated states require approach is to isolate session management and instance of objects to ‘serve that client’. Every new connection creates an object that keeps adding to the pool. Session manager needs to be smart here to “time out” dead connections.

 

I am not 100% sure how it works, but it should be possible to get hold of user information in Axis, when user is allowed to log in using  HTTP authentication and session is created. I know it works with PHP. This information could be used by session manager object in case you don’t want to deal with tokens.

 

Hope that helps.

Ranjeet

-----Original Message-----
From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]]
Sent
:
Wednesday, March 20, 2002 7:37 PM
To: [EMAIL PROTECTED]
Subject: How to do Stateful SOAP servers?

 

Hi,

Being somewhat new to SOAP (and having pored over several books/resources), I'm finding a lack of explanation out there on how to do "Stateful" SOAP servers (in the same way that it's trivial to do Stateful JSP's/Servlets).

I've seen mention in the Axis docs of having your SOAP server implementations being mapped to Application vs. Session vs. Request scopes.. Is that the key functionality I'm looking for?

Basicly I want to provide a SOAP API with methods like:

logon()
putItem()
getItem()
removeItem()

And I want for the SOAP client to be required to call logon() before calling any other method on my server... Any deviation throwing a "fault" or something.

Help would be appreciated!

Thanks,
Bryan



--------------------------------------------------------------
Wrox India Pvt Ltd, Mumbai, India

Reply via email to