I have been trying to maintain user session in a standalone JAX-WS client. The server code is as explained in https://weblogs.java.net/blog/ramapulavarthi/archive/2006/06/maintaining_ses.html.
My problem is with the client. The server does send the JSESSIONID with the response. But it looks like that the client's calls do not send the JSESSIONID with the request(I have tested this on TCPMon). Because of that the server creates a new session every time a request comes.
After some googling I found that I had to set BindingProvider.SESSION_MAINTAIN_PROPERTY = true in request conext in order to maintain user session in client. But sadly this also is NOT working for me.
I have tried generating the stub using AXIS and the session here is being properly maintained. The web service has been deployed in Tomcat.
Thanks.