[jboss-user] [JBoss Web Services CXF] - How to share session between web service calls?

Anand Jayaraman do-not-reply at jboss.com
Thu Aug 12 04:45:25 EDT 2010

Anand Jayaraman [http://community.jboss.org/people/anand201301] created the discussion

"How to share session between web service calls?"

To view the discussion, visit: http://community.jboss.org/message/557040#557040

Hi ,

I am using Jboss CXF for development.

I would like to maintain session state across web service calls.

>From CXF client stubs you can maintain session state but it holds only for calls made from that specific client proxy(say CP1). If i want to maintain the same session state across client proxies there is no straight forward way in CXF.

I was able to use HttpConduit and get cookies from it and copy it before next invocation. Something like:

HTTPConduit conduit1 = (HTTPConduit)ClientProxy.getClient(p1).getConduit(); HTTPConduit conduit2 = (HTTPConduit)ClientProxy.getClient(p2).getConduit(); conduit2.getCookies().putAll(conduit1.getCookies());

Can some one tell me if there is a better way of acheiving this using a configuration change than using copying cookies?



Reply to this message by going to Community

Start a new discussion in JBoss Web Services CXF at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100812/d14ba3d7/attachment.html 

More information about the jboss-user mailing list