You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by bharath thippireddy <bh...@oracle.com> on 2009/04/15 23:56:39 UTC

Session Management does not work with CXF 2.2 Client

We were using the code below on the client to maintain sessions with CXF 2.1.2 which worked fine.But it doesn't work anymore after migrating to the CXF 2.2.The client doesn't send the cookie back.

 

    bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);

 

      Map<String, List<String>> headers = (Map<String, List<String>>)bp.getRequestContext().get("javax.xml.ws.http.request.headers");

 

      if (headers == null)

      {

          headers = new HashMap<String, List<String>>();

          bp.getRequestContext().put("javax.xml.ws.http.request.headers", headers);

      }

 

      headers.put("cookie", cookieHeaders);

 

Can you please let me know if there are changes to the way this is handled in the 2.2 release.

 

Thanks,

bharath


RE: Session Management does not work with CXF 2.2 Client

Posted by bharath thippireddy <bh...@oracle.com>.
Thanks for the quick fix Dan.

Thanks and regards,
Bharath 
-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Friday, April 17, 2009 1:00 PM
To: users@cxf.apache.org
Cc: bharath thippireddy
Subject: Re: Session Management does not work with CXF 2.2 Client


I committed a fix for this (along with a system test) a short while ago.
Tonight's snapshots should be fine.


Dan


On Fri April 17 2009 11:47:00 am bharath thippireddy wrote:
> Thanks for the update Dan. Looks like the setCookie on the HTTPClientProxy
> object works fine though.
>
> policy.setCookie(m_cookieHeaders.get(0));
>
> thanks and regards,
> Bharath
>
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Thursday, April 16, 2009 10:44 PM
> To: users@cxf.apache.org
> Cc: bharath thippireddy
> Subject: Re: Session Management does not work with CXF 2.2 Client
>
>
> Just to let you know, I can reproduce this here.   I'll try and debug into
> it tomorrow.
>
> Dan
>
> On Wed April 15 2009 5:56:39 pm bharath thippireddy wrote:
> > We were using the code below on the client to maintain sessions with CXF
> > 2.1.2 which worked fine.But it doesn't work anymore after migrating to
> > the CXF 2.2.The client doesn't send the cookie back.
> >
> >
> >
> >     bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY,
> > true);
> >
> >
> >
> >       Map<String, List<String>> headers = (Map<String,
> > List<String>>)bp.getRequestContext().get("javax.xml.ws.http.request.heade
> >rs ");
> >
> >
> >
> >       if (headers == null)
> >
> >       {
> >
> >           headers = new HashMap<String, List<String>>();
> >
> >           bp.getRequestContext().put("javax.xml.ws.http.request.headers",
> > headers);
> >
> >       }
> >
> >
> >
> >       headers.put("cookie", cookieHeaders);
> >
> >
> >
> > Can you please let me know if there are changes to the way this is
> > handled in the 2.2 release.
> >
> >
> >
> > Thanks,
> >
> > bharath
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog

--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog


Re: Session Management does not work with CXF 2.2 Client

Posted by Daniel Kulp <dk...@apache.org>.
I committed a fix for this (along with a system test) a short while ago.  
Tonight's snapshots should be fine.


Dan


On Fri April 17 2009 11:47:00 am bharath thippireddy wrote:
> Thanks for the update Dan. Looks like the setCookie on the HTTPClientProxy
> object works fine though.
>
> policy.setCookie(m_cookieHeaders.get(0));
>
> thanks and regards,
> Bharath
>
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Thursday, April 16, 2009 10:44 PM
> To: users@cxf.apache.org
> Cc: bharath thippireddy
> Subject: Re: Session Management does not work with CXF 2.2 Client
>
>
> Just to let you know, I can reproduce this here.   I'll try and debug into
> it tomorrow.
>
> Dan
>
> On Wed April 15 2009 5:56:39 pm bharath thippireddy wrote:
> > We were using the code below on the client to maintain sessions with CXF
> > 2.1.2 which worked fine.But it doesn't work anymore after migrating to
> > the CXF 2.2.The client doesn't send the cookie back.
> >
> >
> >
> >     bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY,
> > true);
> >
> >
> >
> >       Map<String, List<String>> headers = (Map<String,
> > List<String>>)bp.getRequestContext().get("javax.xml.ws.http.request.heade
> >rs ");
> >
> >
> >
> >       if (headers == null)
> >
> >       {
> >
> >           headers = new HashMap<String, List<String>>();
> >
> >           bp.getRequestContext().put("javax.xml.ws.http.request.headers",
> > headers);
> >
> >       }
> >
> >
> >
> >       headers.put("cookie", cookieHeaders);
> >
> >
> >
> > Can you please let me know if there are changes to the way this is
> > handled in the 2.2 release.
> >
> >
> >
> > Thanks,
> >
> > bharath
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

RE: Session Management does not work with CXF 2.2 Client

Posted by bharath thippireddy <bh...@oracle.com>.
Thanks for the update Dan. Looks like the setCookie on the HTTPClientProxy object works fine though.

policy.setCookie(m_cookieHeaders.get(0));

thanks and regards,
Bharath

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Thursday, April 16, 2009 10:44 PM
To: users@cxf.apache.org
Cc: bharath thippireddy
Subject: Re: Session Management does not work with CXF 2.2 Client


Just to let you know, I can reproduce this here.   I'll try and debug into it
tomorrow.

Dan


On Wed April 15 2009 5:56:39 pm bharath thippireddy wrote:
> We were using the code below on the client to maintain sessions with CXF
> 2.1.2 which worked fine.But it doesn't work anymore after migrating to the
> CXF 2.2.The client doesn't send the cookie back.
>
>
>
>     bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY,
> true);
>
>
>
>       Map<String, List<String>> headers = (Map<String,
> List<String>>)bp.getRequestContext().get("javax.xml.ws.http.request.headers
>");
>
>
>
>       if (headers == null)
>
>       {
>
>           headers = new HashMap<String, List<String>>();
>
>           bp.getRequestContext().put("javax.xml.ws.http.request.headers",
> headers);
>
>       }
>
>
>
>       headers.put("cookie", cookieHeaders);
>
>
>
> Can you please let me know if there are changes to the way this is handled
> in the 2.2 release.
>
>
>
> Thanks,
>
> bharath

--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog


Re: Session Management does not work with CXF 2.2 Client

Posted by Daniel Kulp <dk...@apache.org>.
Just to let you know, I can reproduce this here.   I'll try and debug into it 
tomorrow.

Dan


On Wed April 15 2009 5:56:39 pm bharath thippireddy wrote:
> We were using the code below on the client to maintain sessions with CXF
> 2.1.2 which worked fine.But it doesn't work anymore after migrating to the
> CXF 2.2.The client doesn't send the cookie back.
>
>
>
>     bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY,
> true);
>
>
>
>       Map<String, List<String>> headers = (Map<String,
> List<String>>)bp.getRequestContext().get("javax.xml.ws.http.request.headers
>");
>
>
>
>       if (headers == null)
>
>       {
>
>           headers = new HashMap<String, List<String>>();
>
>           bp.getRequestContext().put("javax.xml.ws.http.request.headers",
> headers);
>
>       }
>
>
>
>       headers.put("cookie", cookieHeaders);
>
>
>
> Can you please let me know if there are changes to the way this is handled
> in the 2.2 release.
>
>
>
> Thanks,
>
> bharath

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog