users@jax-ws.java.net

Re: cookie tracking across multiple services?

From: Dima Gutzeit <dima_at_mailvision.com>
Date: Mon, 23 Oct 2006 21:51:50 +0200

Hi,

Every service biniding is a different http connection hence a different cookie. You can login to each service separately or you can copy one cookie between different services.

You should extract the CookieJar object from one service and add it to another. If you need I will post code snippets tomorrow morning.

Regards,
Dima Gutzeit.
  ----- Original Message -----
  From: Levi Purvis
  To: users_at_jax-ws.dev.java.net
  Sent: Monday, October 23, 2006 9:07 PM
  Subject: cookie tracking across multiple services?


  I'm using the javax.xml.ws.Service API to generate dynamic clients based on shared Java interfaces and WSDL. Is there a way to track cookies across multiple service instances returned from the getPort() method? I tried setting javax.xml.ws.BindingProvider.SESSION_MAINTAIN_PROPERTY on the service instance (by casting to javax.xml.ws.BindingProvider), but that only tracks cookies separately on a per-service basis. I would like all services from any given client process to share the same cookies.

  The root of the problem is that I'm trying to secure multiple web services by requiring a "login" and then using state in the HttpSession to authenticate & authorize subsequent requests. Is there a recommended way to do this with the RI rather than the typical HttpSession cookie tracking used in web apps?