synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruwan Linton <ruwan.lin...@gmail.com>
Subject Re: Synapse ignores registered fault handler if an exception thrown in out sequence of a proxy
Date Wed, 28 Apr 2010 16:57:28 GMT
Rajika,

This patch has an issue, where it pops the fault handler from the fault
stack, ideally you should get the proxy from the synapse configuration and
get the fault sequence from that and push into the fault stack of inMsgCtx.

Otherwise, if there has been some other fault handler pushed, it will be set
as the fault handler which is wrong.

Thanks,
Ruwan

On Wed, Apr 28, 2010 at 7:29 PM, Rajika Kumarasiri <rajika@wso2.com> wrote:

> Assume the following synapse configuration.
>
> <proxy name="StockQuoteProxy">
>         <target faultSequence="myFaultHandler">
>             <inSequence>
>                <!-- in sequence goes here -->
>             </inSequence>
>             <outSequence>
>                <!-- out sequence goes here -->
>             </outSequence>
>         </target>
>         <publishWSDL
> uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/>
>  </proxy>
>
> <sequence name="myFaultHandler">
>     <!-- fault sequence -->
> </sequence>
>
> It seems that the synapse ignores executing the fault handler
> 'myFaultHandler' when an exception is thrown in outSequence of the proxy
> definition.
> By looking at the code I can see that the registered fault handler only
> take effect in inSequence, reason is the registered fault handler only added
> only into out message context. But when we define a fault handler for the
> proxy it should handle both exceptions occurs in in sequence and out
> sequence.
> I fixed the problem by sharing the defined fault handler in, in message
> context as well ( I have attached the diff). If you agree with the solution
> I can provide this as patch.
>
>
> Rajika
> --
> http://rajikak.blogspot.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>



-- 
Ruwan Linton
Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: ruwan@wso2.com; cell: +94 77 341 3097
blog: http://ruwansblog.blogspot.com

Mime
View raw message