Santhosh Did you ever read about scope="soapsession" ? this in contrast to ="application", ="transport" ="session". In scope="soapsession" the server issues a ServiceGroupId with the response to the initial request. The server has a init() and destroy() method in addition to business oriented methods (called implicit on initial request). The client has to send this ServicegroupId with each consecutive request in its addressing-headers. And this makes hitting the same service-providing-object (an instance of the class) with each request. Also Jaxws supports annotations for state full service providers. (I have not used that yet, but it's on my scope and wish list). BUT - I cannot say if and what role SESSIONID cookies play. This just a hint. Josef
-----Ursprüngliche Nachricht----- Von: santhoshs123 [mailto:santhoshs...@gmail.com] Gesendet: Mittwoch, 6. März 2013 23:41 An: java-dev@axis.apache.org Betreff: Cookie getting overwritten when client connects to multiple servers. We have client-server deployment implemented using Axis2 where multiple clients can connect to a single server and also a single client can connect to multiple servers(many - many), all connections are statefull. Since many clients can connect to a single server and each connection is statefull, we are internally maintaining stateful sessions in the server. In the initial login call from client, we create a new internal session in the server and assign Cookie "SESSIONID" to http response, so that for further requests from the client internal session will be identified using the cookie "SESSIONID" attached to the request. Problem: when client connects to two servers, cookie set in the first server gets overwritten by cookie set in the second server. 1. Client connects to Server1. 2. Server1 creates and attaches Cookie "SESSIONID" with value 1. 3. Further requests from Client to Server1 are successful as it uses cookie with value 1. 4. Client connects to Server2. 5. Server2 creates and attaches Cookie "SESSIONID" with value 2. 6. Further requests from Client to Server2 are successful as it uses cookie with value 2. 7. From now on any requests to Server1 is having cookie with value 2, looks like cookies value got overwritten in client side. 8. Since the cookie value 2 is not recognized in Server1, it rejects. Please let me know how we can avoid overwriting of cookie? Is there any settings available? Or in client, do I need to manually persist cookie information for each server connection and set the corresponding cookie information to MessageContext property before calling any request? Thanks in advance. -Santhosh -- View this message in context: http://axis.8716.n7.nabble.com/Cookie-getting-overwritten-when-client-connects-to-multiple-servers-tp111918.html Sent from the Axis Java - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org For additional commands, e-mail: java-dev-h...@axis.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org For additional commands, e-mail: java-dev-h...@axis.apache.org