You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by koseki nonuyuki <ko...@gmail.com> on 2011/08/29 16:12:31 UTC

Re: Does onException not support multiple statements?

Hi,

I encountered the same trouble when I got SOAP fault.

The first processor in the onException route, I put
"exchange.getOut().setBody(null)" , then multiple process worked.

When onException route received SOAP fault, the outMessage already contains
Exception info, that cause another Exception at the next process and
rollback, I guess.


--
View this message in context: http://camel.465427.n5.nabble.com/Does-onException-not-support-multiple-statements-tp4381958p4746297.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Does onException not support multiple statements?

Posted by koseki nonuyuki <ko...@gmail.com>.
Jens wrote:
> 
> 
> Claus Ibsen-2 wrote:
>> 
>> On Thu, Sep 1, 2011 at 6:31 PM, Jens wrote:
>>> koseki nonuyuki wrote:
>>>> I encountered the same trouble when I got SOAP fault.
>>>>
>>>> The first processor in the onException route, I put
>>>> "exchange.getOut().setBody(null)" , then multiple
>>>> process worked.
>>>>
>>>> When onException route received SOAP fault, the outMessage already
>>>> contains Exception info, that
>>>> cause another Exception at the next process and rollback, I guess.
>>>
>>> I'm doing the same thing, plus
>>>
>>>      exchange.setProperty(Exchange.EXCEPTION_CAUGHT,
>>> exchange.getOut.getBody());
>>>
>>> before that so the exception remains accessible. It seems to me that's
>>> what
>>> the onException handler should do already, though.
>>>
>> 
>> SOAP Faults is not part of the Camel error handling by default.
>> 
>> There is a handle fault (interceptor) you can enable which turns a
>> SOAP Fault -> Exception,
>> which the Camel error handler will be abel to detect and react upon.
>> 
> 
> Hi Claus,
> 
> as I wrote previously, handleFault doesn't seem to work in this case
> (Camel 2.6.0).
> 
> Regards,
> Jens
> 

Hi,

handleFault doesn't seem to work on Camel 2.7.3 either.

When I intentionally generate Exception(not SOAP fault), onException route
works fine even if there are multiple statement. 
But When I return SOAP Fault, onException route stop at the first statement
and cause  another Exception.

--
View this message in context: http://camel.465427.n5.nabble.com/Does-onException-not-support-multiple-statements-tp4381958p4762392.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Does onException not support multiple statements?

Posted by Jens <sm...@dzbank.de>.
Claus Ibsen-2 wrote:
> 
> On Thu, Sep 1, 2011 at 6:31 PM, Jens wrote:
>> koseki nonuyuki wrote:
>>> I encountered the same trouble when I got SOAP fault.
>>>
>>> The first processor in the onException route, I put
>>> "exchange.getOut().setBody(null)" , then multiple
>>> process worked.
>>>
>>> When onException route received SOAP fault, the outMessage already
>>> contains Exception info, that
>>> cause another Exception at the next process and rollback, I guess.
>>
>> I'm doing the same thing, plus
>>
>>      exchange.setProperty(Exchange.EXCEPTION_CAUGHT,
>> exchange.getOut.getBody());
>>
>> before that so the exception remains accessible. It seems to me that's
>> what
>> the onException handler should do already, though.
>>
> 
> SOAP Faults is not part of the Camel error handling by default.
> 
> There is a handle fault (interceptor) you can enable which turns a
> SOAP Fault -> Exception,
> which the Camel error handler will be abel to detect and react upon.
> 

Hi Claus,

as I wrote previously, handleFault doesn't seem to work in this case (Camel
2.6.0).

Regards,
Jens

--
View this message in context: http://camel.465427.n5.nabble.com/Does-onException-not-support-multiple-statements-tp4381958p4762156.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Does onException not support multiple statements?

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Sep 1, 2011 at 6:31 PM, Jens <sm...@dzbank.de> wrote:
> koseki nonuyuki wrote:
>> I encountered the same trouble when I got SOAP fault.
>>
>> The first processor in the onException route, I put
>> "exchange.getOut().setBody(null)" , then multiple
>> process worked.
>>
>> When onException route received SOAP fault, the outMessage already
>> contains Exception info, that
>> cause another Exception at the next process and rollback, I guess.
>
> I'm doing the same thing, plus
>
>      exchange.setProperty(Exchange.EXCEPTION_CAUGHT,
> exchange.getOut.getBody());
>
> before that so the exception remains accessible. It seems to me that's what
> the onException handler should do already, though.
>

SOAP Faults is not part of the Camel error handling by default.

There is a handle fault (interceptor) you can enable which turns a
SOAP Fault -> Exception,
which the Camel error handler will be abel to detect and react upon.



> Jens
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Does-onException-not-support-multiple-statements-tp4381958p4759049.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Does onException not support multiple statements?

Posted by Jens <sm...@dzbank.de>.
koseki nonuyuki wrote:
> I encountered the same trouble when I got SOAP fault.
>
> The first processor in the onException route, I put
> "exchange.getOut().setBody(null)" , then multiple
> process worked.
>
> When onException route received SOAP fault, the outMessage already
> contains Exception info, that
> cause another Exception at the next process and rollback, I guess. 

I'm doing the same thing, plus

      exchange.setProperty(Exchange.EXCEPTION_CAUGHT,
exchange.getOut.getBody());

before that so the exception remains accessible. It seems to me that's what
the onException handler should do already, though.

Jens

--
View this message in context: http://camel.465427.n5.nabble.com/Does-onException-not-support-multiple-statements-tp4381958p4759049.html
Sent from the Camel - Users mailing list archive at Nabble.com.