I just installed JBoss-ws 2.0 GA and the problem is just the same :
the client doesn't send the JSESSIONID COOKIE after the second call, so a new HTTP session is created by the server.
Can someone confirm this problem please ?
I'll look into it
You can use this preinstalled AS5.0 tag
svn co https://svn.jboss.org/repos/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA
The AS5.0 trunk recently changed its deployer architecture. It can only be used with jbossws/trunk not jbossws-2.0.0.GA
Thank you for your support.
I am developping on Mac OS X 10.4.10 with Jboss AS 4.0.5, the AS 5.0 installer is not yet available for my platform.
How can i install that new version on Mac OS X ?
I'm using 2.0.0 web services in a similar way to the author but I'm getting some slightly different problems with sessions.
I call a web service method that creates a HttpSession and saves some state to that session using httpSession.setAttribute("userId", userId). At the client, I get JSESSIONID back from a HTTP cookie which I pass on to a subsequent call to a servlet that is part of the same JEE context. In the servlet I verify that httpSession.getId() matches the session ID created in the web service, however a call to httpSession.getAttribute("userId") is null.
Could this be part of the same problem? The web service is declared under Seam 2.0.0b1, so is it possible that this could also be part of the problem?
To try and see if I could work around the issue, I thought I would experiment and create a jsession in a separate servlet call and then make the web service call participate in the existing session (rather than rely on the web service creating the session). Now I cannot even get a cookie (or any other HTTP header value for that matter) to pass to the server.
After reading the following:
I thought that this code would work:
final DevelopmentService_Service service = new DevelopmentService_Service(); final DevelopmentService proxy = service.getDevelopmentServicePort(); ((BindingProvider)proxy).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true); final HttpCookie jSessionId = getJSessionId(); ((BindingProvider)proxy).getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS, Collections.singletonMap("Cookie",Collections.singletonList(jSessionId.toString())));
But no joy. Incidentally, the HTTP compression example given at the URL above doesn't work either.
Should I be able to pass HTTP parameters from the client to the server in this way?
Clients were generated using wsconsume
JBoss Seam 2.0.0.b1
Java 1.6.0_02 client and server
I really could use some help on this, I've exausted all my avenues of investigation and have become stuck. As I understand it, getting the client to pass on a JSESSIONID cookie to the server is the only way I can use the JBossWS clients with a Seam web service. I also believe it could offer a work around to the author's issue too.
The issue was fixed and fix will be available in next release of JBossWS
There is a workaround. Use the AXIS2 JAX-WS libraries.
I did not check which of the jars are the ones that make the difference but I just added the AXIS2 libraries in the class path of my client and the session works fine.
If I have time I will investigate further which jar(r) are responsible for making it work and I will post it here.
I also tested the client with Glassfish 2.0/3.0 and it works fine without the AXIS2 JAX-WS libraries.
Note that our JBoss version is 4.2.3