users@jax-rpc.java.net

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

From: Jeremy Suriel <jeremy.suriel_at_eassist.com>
Date: Tue, 21 Oct 2003 08:45:19 -0700

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