Hi Daniel,

That's how I solved the problem.  I had two connectors and needed to copy the 
cookies from one to another.  I couldn't help thinking there should be a 
better way - perhaps even a set method, as this:

fc.getCookies().putAll(cookiesFromOtherConnector);

is adequate, but not obvious.

I would recommend that session cookies can be set before the call is made via 
a setCookies method.


john

On Monday 22 June 2009 20:11:56 you wrote:
> John,
>
> Will this be a single "client proxy" that will be doing all the
> communication with the soap server?    If so, it's probably  just easier to
> enable the session support on the proxy:
>
> ((BindingProvider)proxy).getRequestContext()
>        .put(BindingProvider.SESSION_MAINTAIN_PROPERTY, Boolean.TRUE);
>
> The next option (if you are using a recent version of CXF, if not, please
> upgrade) would be to grab the cookies map directly from the HTTPConduit.
>
> HTTPConduit hc = (HTTPConduit)(c.getConduit());
> Map<String, Cookie> cookies  = hc.getCookies()
>
> That can also be easily used to copy  session cookies from one proxy object
> to another.
>
> Dan
>
> On Sat June 20 2009 7:07:32 am John Baker wrote:
> > Hello,
> >
> > Can someone point me at an example of session support in CXF?  I'm not
> > configuring with Spring, so some code would be handy.  The SOAP server to
> > which my CXF client connects is using a session cookie and that needs to
> > be presented across all calls after an initial "login" call.
> >
> > Also, how does one get the response headers after a call?
> >
> > Thanks,
> >
> >

Reply via email to