Looking at the code, this MAY be a bug in the HTTPConduit on the client 
side.    Is there anyway you could use wireshark or tcpdump to get the 
very low level raw wire transfer captured?

In the Conduit, I see:
String cookieStr = connection.getHeaderField("Set-Cookie");

which according to the javadocs, says:
"If called on a connection that sets the same header multiple times with 
possibly different values, only the last value is returned."


Thus, I'd like to know if JBoss/Tomcat is sending it on the wire on one 
line (one Set-Cookie header) or two.   If it's sending it as two, there 
definitely is an issue.  The client would only be getting the second 
one.

The code around line 1940 of HTTPConduit probably needs some updating to 
call getHeaderFields() and then process the full list for Set-Cookie.  
Please log a JIRA if you get a chance.


Dan




On Friday 15 February 2008, Landslide wrote:
> I am testing the latest release of CXF 2.0.4 and I got some unexpected
> results. On the client side, I got the following from the server side
> response and I have received the “JSESSIONID” in the cookie
> “Set-Cookie”.
>
> Headers: {Content-Length=[329], X-Powered-By=[Servlet 2.4;
> JBoss-4.0.5.GA (build: CVSTag=Branch_4_0
> date=200610162339)/Tomcat-5.5],
> Set-Cookie=[LSCookie=AA38FF4D7AD8E693942E95BB1AFAD5D8$$$,
> JSESSIONID=AA38FF4D7AD8E693942E95BB1AFAD5D8; Path=/], Date=[Fri, 15
> Feb 2008 00:22:18 GMT], SOAPAction=["urn:RetrieveContact"],
> Server=[Apache-Coyote/1.1], content-type=[text/xml;charset=UTF-8]}
>
> I call the following on the client side to pass the header info back
> to the server side for all subsequent requests:
> BindingProvider bp = (BindingProvider)port;
> bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY,
> true);
>
> On the server side, I could not see the “JSESSIONID” in the cookie
> when I use an interceptor of “Phase.PRE_PROTOCOL” or “Phase.READ”.
>
> 19:22:19,140 INFO  [STDOUT] Headers: {connection=[keep-alive],
> cache-control=[no-cache], host=[localhost:8888],
> user-agent=[Java/1.5.0_12], transfer-encoding=[chunked],
> pragma=[no-cache], content-type=[text/xml; charset=UTF-8],
> cookie=[$Version="1";
> LSCookie=AA38FF4D7AD8E693942E95BB1AFAD5D8$$$], accept=[*],
> soapaction=["urn:RetrieveContact"]}
>
> Please help me to understand how to retrieve the values of all cookies
> in an interceptor on the server side? Why would I get a null value of
> “httpSession” in my interceptor of “Phase.PRE_PROTOCOL” or
> “Phase.READ” which extends AbstractPhaseInterceptor<Message> for all
> subsequent requests? HttpServletRequest request =
> (HttpServletRequest)message.getContextualProperty(HTTP_REQUEST);
>                             HttpSession httpSession =
> request.getSession(false);
>
> I would just like to add one more piece of info for this thread. When
> I switch to Axis2 on my SOAP client by calling:
> Options options = new Options();
> options.setManageSession(true);
> client.setOptions(options);
>
> I got the following header info on the server side using the same CXF
> implementation:
> 07:33:10,078 INFO  [STDOUT] Headers: {host=[localhost:8888],
> user-agent=[Axis2], transfer-encoding=[chunked],
> cookie=[JSESSIONID=D4485D75748F657BA06C7A2E67F5323F; Path=/],
> content-type=[text/xml; charset=UTF-8],
> soapaction=["urn:anonOutInOp"]}
>
> I got the value of “JSESSIONID” cookie on the server side, but
> unfortunately, also lost the value of the other cookie “LSCookie”, a
> similar bug of CXF which has been fixed. The real world is never
> perfect ………………..



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to