users@jax-rpc.java.net

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

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

Bobby,
see my reply inline below...

> -----Original Message-----
> From: Bobby Bissett - Javasoft [mailto:robert.bissett_at_sun.com]
> Sent: Friday, October 24, 2003 11:14 AM
> To: users_at_jax-rpc.dev.java.net
> 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: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net