users@jax-rpc.java.net

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

From: Nan Xiong <Nan.Xiong_at_viewstar.com>
Date: Tue, 21 Oct 2003 09:43:08 -0700

Thanks Jeremy. I got to that far too, I understand that messagecontext allow share data for
different handlers along the chain for one service call invocation, but how do i share data
between 2 subsequent service call invocations?

in my case,

handleResponse(mc) call for the first service call will retrieve the id/token from soap header
and would like to save it "somewhere" on the client, then handleRequest(ms) call for the next
service call will add id/token back to the soap header. my question is where is "somewhere"
in a standard jaxrpc implementation????

Thanks again
Nan

> -----Original Message-----
> From: Jeremy Suriel [mailto:jeremy.suriel_at_eassist.com]
> Sent: Tuesday, October 21, 2003 8:45 AM
> To: 'users_at_jax-rpc.dev.java.net'
> Subject: RE: MessageContext->Stub and Stub->MessageContext?
>
>
> You can implement javax.xml.rpc.handler.Handler and get and
> set data on the
> "handleResponse(MessageContext context)" and
> "handleRequest(MessageContext
> context)" methods.
>
> To do this, you will have to add the handler to the handler
> chain like this:
>
>
> ServiceFactory factory = ServiceFactory.newInstance();
> Service service = factory.createService(new
> QName(qnameService));
>
> QName port = new QName(qnamePort);
>
> HandlerRegistry handlerRegistry =
> service.getHandlerRegistry();
>
> List handlerChain = handlerRegistry.getHandlerChain(port);
> HandlerInfo handlerInfo = new
> HandlerInfo(YourHandlerClass.class, null, new QName[0]);
>
> handlerChain.add(handlerInfo);
>
> Hope this helps.
>
>
> -----Original Message-----
> From: Nan Xiong [mailto:Nan.Xiong_at_viewstar.com]
> Sent: Monday, October 20, 2003 9:41 PM
> To: users_at_jax-rpc.dev.java.net
> Subject: MessageContext->Stub and Stub->MessageContext?
>
> Hello,
> Does jaxrpc standard supports accessing MessageContext from
> client stub, =
> or vice versa? Lets say a web service passes a token/id from
> the response header, and then a client handler retrieve the
> token/id =
> from the header, the next service invocation from the client, the =
> token/id=20
> needs to passes back from the request header to the service.
> How do i =
> do this in a standard jaxrpc soap handler? i dont seem to find
> a way to share data bwtn different invocation calls from
> client. Can a =
> stub instance can be obtained from a messageContext, or vice versa?
> Thanks
> Nan
>
>
> ---------------------------------------------------------------------
> 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
>
>

---------------------------------------------------------------------
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