axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Algirdas P. Veitas" <avei...@allesta.com>
Subject Issue w/ JAXRPC Handler Compliance....
Date Wed, 14 Apr 2004 00:58:34 GMT
Hi Folks,

We have a run into an issue with the handler chain flow with respect to processing faults.
 We just tried using Axis 1.2 beta and the problem still appears exist.

The following is our deployment definition for a particular service:

<service name="MyService" provider="Handler">
     <handlerInfoChain>
         <handlerInfo classname="x.y.AAAHandler"/>
         <handlerInfo classname="x.y.BBBHandler"/>
         <handlerInfo classname="x.y.CCCHandler"/>
         <handlerInfo classname="x.y.DDDHandler"/>
         <handlerInfo classname="x.y.EEEHandler"/>
    </handlerInfoChain>
  <parameter name="handlerClass" value="x.y.ServiceHandler"/>
</service>

During testing, we throw a SOAPFaultException during a call to x.y.DDDHandler.handleRequest(MessageContext
ctx)

public void handleRequest(MessageContext ctx)
{
    throw new SOAPFaultException(....);
}

but only x.y.DDDHandler's handleFault(...) is invoked.  We are expecting that each handler
configured previous to DDDHandler in the
<handlerInfoChain> would have their respective handleFault(...) called.

Below shows in more detail the expected course of action (according to the JAXRPC1.1 specification)
,  the Axis 1.2 behavior in more detail and the relevant section from the specification.

Can someone let me know if this a known-issue?  Willing to roll up my sleeves and patch this........

Thanks,
    Al


Expected Course of Action:

    -- start of chain ---
    AAAHandler.handleRequest()
    BBBHandler.handleRequest()
    CCCHandler.handleRequest()
    DDDHandler.handleRequest() throws SOAPFaultException
    DDDHandler.handleFault() 
    CCCHandler.handleFault() 
    BBBHandler.handleFault() 
    AAAHandler.handleFault() 
    -- end of chain ---

Axis 1.2 Behavior
    -- start of chain --
    AAAHandler.handleRequest()
    BBBHandler.handleRequest()
    CCCHandler.handleRequest()
    DDDHandler.handleRequest() throws SOAPFaultException
    DDDHandler.handleFault() 
    -- end of chain --

Quoting from the specification:

"Throw the javax.xml.rpc.soap.SOAPFaultException to indicate a SOAP fault.
The Handler implementation class has the responsibility of setting the SOAP fault in
the SOAP message in either handleRequest and/or handleFault method. If
SOAPFaultException is thrown by a server-side request handler's handleRequest
method, the HandlerChain terminates the further processing of the request handlers
in this handler chain and invokes the handleFault method on the HandlerChain
with the SOAP message context. Next, the HandlerChain invokes the handleFault
method on handlers registered in the handler chain, beginning with the Handler
instance that threw the exception and going backward in execution. The client-side
request handler's handleRequest method should not throw the SOAPFault-
Exception. Refer to the SOAP specification for details on the various SOAP
faultcode values and corresponding specification."





Mime
View raw message