-
1. Re: JBOSS-WS Client not sending COOKIE after 2 calls
fredash Jul 9, 2007 8:34 AM (in response to fredash)Hi,
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 ?
Thanks,
Fred. -
2. Re: JBOSS-WS Client not sending COOKIE after 2 calls
thomas.diesler Jul 9, 2007 1:08 PM (in response to fredash)I'll look into it
-
4. Re: JBOSS-WS Client not sending COOKIE after 2 calls
thomas.diesler Jul 10, 2007 10:44 AM (in response to fredash)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 -
5. Re: JBOSS-WS Client not sending COOKIE after 2 calls
fredash Jul 10, 2007 11:00 AM (in response to fredash)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 ? -
6. Re: JBOSS-WS Client not sending COOKIE after 2 calls
lowecg2004 Jul 29, 2007 8:56 PM (in response to fredash)Hello,
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:
https://jax-ws.dev.java.net/guide/HTTP_compression.html
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?
Cheers,
Chris.
Clients were generated using wsconsume
JBossWS 2.0.0.GA
JBossAS 4.2.0.GA
JBoss Seam 2.0.0.b1
Java 1.6.0_02 client and server -
7. Re: JBOSS-WS Client not sending COOKIE after 2 calls
lowecg2004 Jul 31, 2007 8:19 AM (in response to fredash)Hello All,
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.
Kind Regards,
Chris. -
8. Re: JBOSS-WS Client not sending COOKIE after 2 calls
richard_opalka Aug 10, 2007 6:20 AM (in response to fredash)The issue was fixed and fix will be available in next release of JBossWS
-
9. Re: JBOSS-WS Client not sending COOKIE after 2 calls
thoism Jun 1, 2010 4:31 AM (in response to lowecg2004)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