title: JAX-WS client: maintain session/cookies across multiple services
body: <p>I'm using Netbeans to automatically create webservice clients based off WSDL files. This works well, except the webservices I'm using require that I pass in a custom cookie in the HTTP header to every webservice in order to prove my identity. </p>
  
  <p>I use one webservice named <code>Utility</code> to get my authorization. This sets a cookie which needs to be provided in all subsequent calls to any webservice.</p>
  
  <p>This can be accomplished by setting <code>javax.xml.ws.session.maintain</code> to <code>true</code> on the BindingProvider of the port for the webservice. This works great for subsequent calls to the methods in the <code>Utility</code> webservice.
  The problem is that this only maintains the session/cookie for that single webservice. I need it across others as well.</p>
  
  <p>I need the cookie passed in to a <em>separate</em> webservice named <code>History</code>  How can I accomplish this?  Is it feasible to have a super Service class which both Utility and History could extend and share the same session state with?</p>