You can add JAX-RPC handlers by configuring the WSDD  using the handlerInfo and handlerInfoChain elements. Here is a link to some docs
 
http://www.osmoticweb.com/axis-wsdd/handlerInfo.htm
 
Programmatically, you can add handlerInfo and handlerInfo chain to a WSDDService. Here is a sample code snippet:
 
WSDDService service = <initialized after reading a WSDD doc from somewhere>
 
// if handlers are specified add it to the wsdd
String[] handlers = <init list of JAX-RPC handler class names>
  if (handlers != null && handlers.length > 0) {
        WSDDJAXRPCHandlerInfoChain handlerInfoChain =
            new WSDDJAXRPCHandlerInfoChain();
        ArrayList listOfHandlers = new ArrayList();
        for (int i = 0; i < handlers.length; i++) {
            WSDDJAXRPCHandlerInfo handlerInfo = new WSDDJAXRPCHandlerInfo();
            handlerInfo.setHandlerClassName(handlers[i]);
            listOfHandlers.add(handlerInfo);
        }
        handlerInfoChain.setHandlerInfoList(listOfHandlers);
        service.setHandlerInfoChain(handlerInfoChain);
    }
 
Note that JAX-RPC handler has some bugs in the 1.1 release - the behavior is not consistent with the JAX-RPC spec regarding handlers. The bugs have been fixed in Axis 1.2 RC1 and the latest cvs tree.
 
Shantanu

Paul Jungwirth <[EMAIL PROTECTED]> wrote:
Hello,

I am using Axis 1.1. I can see how to register an
org.apache.axis.hander.Handler, but is there any way to register a
javax.xml.rpc.handler.Handler?

I ask because the Axis version seems to have this problematic behavior:
If a service method throws an exception, onFault is not called. The docs
suggest that this is actually correct: it should only get called when
another *Handler* throws a fault. Instead, if a service method throws an
exception, invoke gets called again. But then getPastPivot still returns
false. That means I cannot tell from within invoke whether I'm in the
requestFlow or the responseFlow. Besides digging into the soap message,
is there another way to figure this out? What kind of state can I use in
an Axis Handler?

Thanks,
Paul
--
_______________________________
Pulchritudo splendor veritatis.

Reply via email to