Willem Jiang wrote:
S. Ali Tokmen wrote:
Hello

On 05/08/2010 05:47, Willem Jiang wrote:
CXF FaultOutInterceptor will take care of it if you just throw the Fault message out from CxfConsumer.

Well, let's assume the route is configured like:

   from("cxf:...")
   .process(new FirstProcessor())
   .process(new SecondProcessor())
   .process(new ThirdProcessor())

In this case, if the first processor is the one to return the fault, and that it only returns a fault, then the second and third processor will be executed.

Whereas, if the processor throws the exception (generated by CXF and containing all @WebFault annotations, remember) then the second and third processor won't be executed.

Do you think my use case is wrong?

I got it, you don't want to throws the exception in FirstProcessor to keep the exchange being processed by Second and ThirdProcessor.

I just checked the CxfConsumer code of the camel trunk, it will check the fault message if the exchange is failed.

So please just set the exchange to be failed, then CxfConsumer will throw the exception for your.

Just have a second thought, we should let CxfConsumer check if the exchange out message is the fault message first, if you set the Exchange to failed, it will trigger the ErrorHandler and the other two processor will not be processed.


Willem
----------------------------------
Apache Camel, Apache CXF committer
Open Source Integration http://www.fusesource.com
Blog http://willemjiang.blogspot.com
Tiwtter http://twitter.com/willemjiang

Cheers

S. Ali Tokmen
[email protected]

Office: +33 4 76 29 76 19
GSM:    +33 66 43 00 555

Bull, Architect of an Open World TM
http://www.bull.com





Reply via email to