RE: Re: MessageContext->Stub and Stub->MessageContext?

From: Nan Xiong <>
Date: Fri, 24 Oct 2003 12:41:29 -0700

see my reply inline below...

> -----Original Message-----
> From: Bobby Bissett - Javasoft []
> Sent: Friday, October 24, 2003 11:14 AM
> To:
> Subject: Re: MessageContext->Stub and Stub->MessageContext?
> > Your suggestion of using singleton class for save/retrieve
> token works for simple java client, what if
> > the client is a web client?
> I'm not sure I understand this question -- the case I was
> talking about
> was a web client, and it was just a simple way that handlers and the
> client app can share information.

singleton does not work for a client that runs in a multi-thread enviornment because
the tokens need to be maintained for different http sessions. i now figured out using
ThreadLocal as the token holder in my jsp web service client, but I dont know
whether it is too much a hack?!

> > Do you have a suggestion on how to access HttpSession from
> a client soap
> > handler???
> The jaxrpc runtime takes care of handling the http work for
> you, so you
> can't access info in the http header (as opposed to SOAP
> header) in your
> client. If you want your client to maintain session using the http
> header session id, you don't have to do any work in the
> client for this.
> Just set the SESSION_MAINTAIN_PROPERTY on your stub before making rpc
> requests.

I was trying to find out a way to stash the session specific token on
the httpsession, but could not figure out a way to access httpsession
from a soap handler. My feeling is that soap handler only allow to access
MessageContext, which is pretty limited when wanting to share data for handlers
btwn different soap calls.

> Cheers,
> Bobby
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail: