Hi Jochen, Tony, Appreciate u guys ideas.
yes, in the client-config.wsdd also we have to specify the SimpleSessionHandler in both request flows and response flows for the corresponding services, in order for the session management to work. this is similar to the server-config.wsdd file. using HTTP sessions is different from using SOAP sessions. By using SOAP sessions, the session can be maintained and managed regardless of the transport protocol, since whatever is the transport, the session id will be contained in the SOAP envelope (or rather a SOAP header) , which is part of the payload of the transport data. Joschen>> can u tell me how ur invoking the two services from the client side. R u using Call objects? or WSDL2Java generated proxy? AFAIK, the session id that the service side sends is stored in the Axis Client Engine as a variable and since the same Axis Client instance is used consequently by the same user, when sending the session id back to the service side, the session id will be taken from this variable. take a look at the code of the SimpleSessionHandler Class ,,, this elaborates the logic (see the comments),, may be afetr understanding the code, u can write ur own SessionHandler, which provided the functionality u need. However, AFAIK, the current implementation will provide what u want I guess, Mahen ----- Original Message ----- From: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: Wed, 8 Sep 2004 11:01:34 +0100 Subject: Re: Sessions across different services To: [EMAIL PROTECTED] Hi Jochen, >From the little I've read, you need to deploy the session handler on the client side also. I've never done this but I believe you can use a WSDD file on the client side to specify request and reponse handlers, so I guess this is where you need to do it. If it already works for one service, check out how the client is configured for that service. Alternatively, use HTTP sessions for all services. The HTTP session is available from the message context and the client needs to setMaintainSession(true) on the Call or Service object. I guess the Axis framework has to store the session cookie (which would normally be stored by a browser) and send it with each request, so the framework has to be told about this on the client side, somehow. Tony Hi Tony, yes, I did define the handler "session". Sessions are working for *one* service without problems. But I want to get the same session from another service. I think there must be some configuration on the client side to tell the axis engine to use the same sessionID for all services. Jochen [EMAIL PROTECTED] wrote: > Jochen, > > I've only read a little about sessions but I think you have to deploy the > SimpleSessionHandler on the client's request and response flows. I don't > know if you need to do this on the server. Also, did you define the > handler type "session" before refering to it in your <requestflow>? > > I think you can simply use the HTTP sessions instead, without deploying > any handlers. > > Tony > > > > Hi Mahen, > > my configuration on the server side looks like this for both services: > <service name="SomeService" provider="java:RPC" style="wrapped"> > ... > <requestflow> > <handler type="session"/> > </requestflow> > <responseflow> > <handler type="session"/> > </responseflow> > </service> > > > When watching the request/responses with TcpMon, I see that when I query > the 2nd service for the first time, the client does not pass the > previous received sessionID. > > Any further ideas? > > Jochen > > > Mahen Perera wrote: > > >>Hi Jochen >> >>Have u put the SimpleSessionHandler in both request flows and response >>flows in both the services? >> >>If this is so , there will not be a problem I guess. >> >>And see whether ur sending the same session id from the client side >>when invoking both services , using tcpmon. >> >>Mahen >> >> >>On Wed, 08 Sep 2004 09:36:27 +0200, Jochen Schwörer <[EMAIL PROTECTED]> > > wrote: > >>>Hi, >>> >>>I have successfully configured sessions for one service with the >>>SimpleSessionHandler. >>> >>>Now I've noticed that the session is only valid for one service. Ie if I >>>connect to one service (eg. AuthenticationService) which stores some >>>objects in the session, these objects are not visible from the other >>>service (eg. WorkerService). >>> >>>Is there any possibility to maintain one session per client for all >>>services? And if yes, which configuration is necessary? >>> >>>regards >>>Jochen Schwoerer >>> >> >> > > >