title: Obtaining HTTP session from a webservice
body: <p>We have a web application built on a <a href="http://en.wikipedia.org/wiki/Apache_Tomcat" rel="nofollow noreferrer">Tomcat</a> 6/<a href="http://en.wikipedia.org/wiki/WebWork" rel="nofollow noreferrer">WebWork</a>/<a href="http://en.wikipedia.org/wiki/Hibernate_%28Java%29" rel="nofollow noreferrer">Hibernate</a>/SQL Server stack.</p>
  
  <p>One part of the web application is a network map built using 
  the <a href="http://flare.prefuse.org/" rel="nofollow noreferrer">Flare</a> toolkit (the predecessor to Flare was <a href="http://en.wikipedia.org/wiki/Prefuse" rel="nofollow noreferrer">Prefuse</a>). The network map data is retrieved via a webservice call, say getData(). This call is made by the Flare application to retrieve XML data it needs to display. The webservice itself has been developed using <a href="http://en.wikipedia.org/wiki/Apache_CXF" rel="nofollow noreferrer">Apache CXF</a>.</p>
  
  <p>I am trying to figure out how I can obtain the HTTP session within the method designated as a webservice. I need this because I need to maintain server side data across client (Flare application) webservice requests.</p>
  
  <p>Do I need to get the HTTP session using the basic servlet APIs (knowing that the CXF servlet is being used)? Or is there API support at the CXF level? </p>
  
  <p>The webservice itself runs within Tomcat 6.</p>