[jbossws-dev] Re: JBWS-1515 and information

Thomas Diesler thomas.diesler at jboss.com
Thu Apr 5 09:15:22 EDT 2007


Ok, this reading. How is the cookie supposed to get set on the server
side?

Our test case shows that a client handler can read the cookie when a
server handler actually sets one.

We did an optimization where the server component does not create a new
HttpSession for every request, because this is an expensive operation.
Hence, when the server component does not access the HttpSession and no
other component expicitly sets a cookie there will be no cookie for the
client to read.

cheers
-thomas

On Wed, 2007-04-04 at 09:23 -0400, Chris Laprun wrote:
> On Apr 4, 2007, at 3:28 AM, Thomas Diesler wrote:
> 
> > please study the testcase associated with the the jira issue. It shows
> > how to work with cookies.
> 
> I did. Here's a code sample that I use in my handler:
> 
> public boolean handleResponse(MessageContext msgContext)
>     {
>        SOAPMessageContext smc = (SOAPMessageContext)msgContext;
>        SOAPMessage message = smc.getMessage();
>        MimeHeaders mimeHeaders = message.getMimeHeaders();
>        String[] cookieValues = mimeHeaders.getHeader("Set-Cookie");
> 
>        if (cookieValues != null)
>        {
>           // deal with cookies...
>        }
> 
>        return super.handleResponse(msgContext);
>     }
> 
> The problem is that with 1.0.4.GA and up, the Set-Cookie header is  
> not present anymore. My code works fine with 1.0.3.sp1 and below and  
> when I step debug it, I can see the Set-Cookie header present in the  
> MimeHeaders. With 1.0.4.GA and above (that includes 1.2.1 that I  
> compiled yesterday), the Set-Cookie header is not present anymore  
> when I step debug the code. I looked at the test case configuration  
> to see if I was missing anything but it doesn't look like it  
> either... so I'm not quite sure what's going on.
> 
> Best,
> Chris
> 
> ==
> JBoss Portal Developer / WSRP Lead
> JBoss, a division of Red Hat
> 
> 
-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
Web Service Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx





More information about the jbossws-dev mailing list