This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
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.