John Walker wrote:
Is it possible to get and set cookies on the HTTP transport from the *client* side of Axis?


I tried using the MessageContext to get the HttpRequest object, and
then set cookies there, but it seemed that when doing this from the
AXIS client side, when the HTTP message got to the receiver, my
cookies had been clobbered.

I know this isnt an affirmation, but a warning about cookies and
inconsistency. I think it may be an easier thing to utilize the
standard AXIS APIs to transfer data about the client to the server. For example, there is a way to set the username and password for
authentication.


What data are you trying to hold onto that SOAP/AXIS doesnt handle natively?


I have multiple module that I am thinking of deploying as individual web services running in the same web app rather than create a big interface and have one big monolithic service with 200+ methods in it. One of the modules is a SessionModule that the client needs to call to authenticate before using the other modules, so I need some sort of session tracking across the modules.


I know I could use SOAP headers which would probably work OK across the modules, but I need to do the session tracking via cookies because there's another servlet in the same web app that needs to use the same session (complicated, I know).

So I was thinking if it's possible to do something like this:

1. From the client call the SessionModule with the MAINTAIN_SESSION property or whatever it is which will establish a session (HttpSession) on the server and send a cookie back to the client which Axis will store.

2. From the client before calling another module, set the session cookie from #1 before making the call so that the same HttpSession as in #1 is recovered and used on the server side (this other module requires that the user is authenticated).

3. Continue doing #2 for all modules when they are needed.

Maybe I'm complicating my life, is there an easier way to achieve this? Basically session tracking across a set of web services deployed in the same web app.

Thanks for your help.

Tim



Reply via email to