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

Jim Ma do-not-reply at jboss.com
Fri Aug 13 02:43:17 EDT 2010


Jim Ma [http://community.jboss.org/people/jim.ma] replied to the discussion

"How to share session between web service calls?"

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

--------------------------------------------------------------
> The headers set in the first BindingProvider may not be same as the  headers in the second binding provider because CXF would create a  different cookie for the second BindingProvider instance.
 Yes. The second headers will be different from the first one .  You need to get the headers form RequestContext again .

> So  is the solution to keep the header, cookie information in a local data  structure in the client side and keep copying it back to all new  BindingProvider instances created from client side so that the same  cookie information is relayed back to the server?
Please note this is just a sample and test code from CXF code base. It just demonstrate how 
can you use the BindingProvider stuff to do this job .

> But this way it would not be too different from the HttpConduit approach i had mentioned earlier.
Well , technically speaking they are same. You have to locally maintain the cookie.  But the big different is this uses jaxws standard api . Your code is portable and can run on jbossws native or  other soap stack .  And I also do not think simply change the configuraiton can do this job .
> Are there any changes on the server that also needs to be done?
Your current server code can work with this approach.

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/557217#557217]

Start a new discussion in JBoss Web Services CXF at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2046]

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


More information about the jboss-user mailing list