You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Andrea Zoppello <zo...@tiscali.it> on 2007/03/30 12:21:47 UTC

Fault Handling in Validation Component??

Hi,

I'm looking at the Lw Validate Component, it works very well ant it fits 
my use case for
xsd validation.

But i've  a problem with fault handling.

Looking at the source code it seems that the "Fault" message is never 
settted in the exchange but
only contained in the Fault exception.

I've noticed this implementing a simple exchange listener that log only 
"error exchanges" and try to log
fault message.

I think that the problem can easily be resolved putting this line:

exchange.setFault(fault);

before throwing the FaultException.

Should i raise a jira and attach a patch???





Re: Fault Handling in Validation Component??

Posted by Andrea Zoppello <zo...@tiscali.it>.
Ok, you're rigth the problem is that i send an InOnly exchange
that does not support fault.

Andrea
Guillaume Nodet ha scritto:
> No, the fault is set in the parent class, if the exchange
> supports faults.  Else an ERROR status is set.
> Try sending a RobustInOnly or InOut exchange.
>
> On 3/30/07, Andrea Zoppello <zo...@tiscali.it> wrote:
>>
>> Hi,
>>
>> I'm looking at the Lw Validate Component, it works very well ant it fits
>> my use case for
>> xsd validation.
>>
>> But i've  a problem with fault handling.
>>
>> Looking at the source code it seems that the "Fault" message is never
>> settted in the exchange but
>> only contained in the Fault exception.
>>
>> I've noticed this implementing a simple exchange listener that log only
>> "error exchanges" and try to log
>> fault message.
>>
>> I think that the problem can easily be resolved putting this line:
>>
>> exchange.setFault(fault);
>>
>> before throwing the FaultException.
>>
>> Should i raise a jira and attach a patch???
>>
>>
>>
>>
>>
>
>


Re: Fault Handling in Validation Component??

Posted by Guillaume Nodet <gn...@gmail.com>.
No, the fault is set in the parent class, if the exchange
supports faults.  Else an ERROR status is set.
Try sending a RobustInOnly or InOut exchange.

On 3/30/07, Andrea Zoppello <zo...@tiscali.it> wrote:
>
> Hi,
>
> I'm looking at the Lw Validate Component, it works very well ant it fits
> my use case for
> xsd validation.
>
> But i've  a problem with fault handling.
>
> Looking at the source code it seems that the "Fault" message is never
> settted in the exchange but
> only contained in the Fault exception.
>
> I've noticed this implementing a simple exchange listener that log only
> "error exchanges" and try to log
> fault message.
>
> I think that the problem can easily be resolved putting this line:
>
> exchange.setFault(fault);
>
> before throwing the FaultException.
>
> Should i raise a jira and attach a patch???
>
>
>
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/