You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Thilina Gunarathne <cs...@gmail.com> on 2007/08/03 09:47:52 UTC

[Axis2] onError and onFault in the AxisCallback

Hi,
 /**
     * This gets called when a fault message is received.
     *
     * @param msgContext the MessageContext containing the fault.
     */
    void onFault(MessageContext msgContext);

    /**
     * This gets called ONLY when an internal processing exception occurs.
     *
     * @param e the Exception which caused the problem
     */
    void onError(Exception e);

Is it guaranteed that the onError will not receive AxisFaults...

thanks,
Thilina

-- 
Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis2] onError and onFault in the AxisCallback

Posted by Thilina Gunarathne <cs...@gmail.com>.
> Not at all. :)  It's guaranteed that onError() will not receive faults
> which came *on the wire*.  onError() is for internal problems only
> (which may certainly be AxisFaults), onFault() is for received faults only.
Thanks Glen.. That's exactly what I wanted to know..  Apologies for
bad phrasing of the question.

In other words we will receive a full SOAPFault structure only through
the onFault().. Please correct me if I'm worng..

Wonder how easy the life would have being if we had the AxisFault sub
classed to handle these cases seperately..

thanks,
Thilina
>
> --Glen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis2] onError and onFault in the AxisCallback

Posted by Glen Daniels <gl...@thoughtcraft.com>.
Hi Thilina!

Thilina Gunarathne wrote:
>     void onFault(MessageContext msgContext);
> 
>     void onError(Exception e);
> 
> Is it guaranteed that the onError will not receive AxisFaults...

Not at all. :)  It's guaranteed that onError() will not receive faults 
which came *on the wire*.  onError() is for internal problems only 
(which may certainly be AxisFaults), onFault() is for received faults only.

--Glen

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org