You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Smita1 <s_...@yahoo.co.in> on 2011/10/13 09:18:22 UTC

webservices/axis2: unable to retrieve cookies from org.apache.axis2.context.MessageContext instance

Hi,
we have a load balanced webservices set up, front ended by apache http
server. To manage the load balancing, http server adds a cookie to each soap
response sent by the webservices. This cookie is used to maintain a sticky
session between the susequent requests. The issue here is we are unable to
recieve this cookie value to reset it back to the next request. This is
breaking the sticky session.

Http server adds cookie using the following setting in its configuration:
Header add Set-Cookie "MYCOOKIE=SOMEVALUE.%{BALANCER_WORKER_ROUTE}e;
path=/;"
ProxyPass /test balancer://mycluster/test stickysession=MYCOOKIE
nofailover=On

We have already tried following:
1. org.apache.axis2.context.MessageContext _myMessageContext =
_operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.HTTP_HEADER);
org.apache.axiom.soap.SOAPEnvelope _myReturnEnv =
_myMessageContext.getEnvelope();
SOAPHeader header=_myReturnEnv.getHeader(); - returns nothing

2. org.apache.axis2.context.MessageContext myMessageContext=
_operationClient.getMessageContext(                                        
org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
myMessageContext.getProperties() - returns null

3. String incomingCookie = (String) 
myMessageContext.getServiceContext().getProperty(HTTPConstants.COOKIE_STRING);   

Any help would be much appreciated.

Thanks,
Smita






-- 
View this message in context: http://old.nabble.com/webservices-axis2%3A-unable-to-retrieve-cookies-from-org.apache.axis2.context.MessageContext-instance-tp32643320p32643320.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org