I have a program in which I need to remember the session Id for the requests that pass through the same SOAP Handler. If I use static variable it gets altered to the the last modification. So I decided on cookies.
But if I add a cookie to the response message to the servlet I am not getting the cookie in the following reuest message.
Note that JAX-WS web service clients must be configured to maintain session information (such as cookies), using the javax.xml.ws.session.maintain property.
Other web service stacks may have similar mechanisms.