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

From: Jeremy Suriel <>
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 port = new QName(qnamePort);

            HandlerRegistry handlerRegistry = service.getHandlerRegistry();

            List handlerChain = handlerRegistry.getHandlerChain(port);
            HandlerInfo handlerInfo = new
HandlerInfo(YourHandlerClass.class, null, new QName[0]);

Hope this helps.

-----Original Message-----
From: Nan Xiong []
Sent: Monday, October 20, 2003 9:41 PM
Subject: MessageContext->Stub and Stub->MessageContext?

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

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

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