camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "anirban.gupta4" <anirban.gup...@gmail.com>
Subject Exception handling in camel
Date Wed, 29 Mar 2017 09:57:36 GMT
Hi,

I have a Camel route like this

from("cxf:bean:middlewareCustomerEndpoint")
		.choice()
			.when(header("SOAPAction").isEqualTo("action"))
				.doTry()
					.process(new Processor1())
					.setHeader(CxfConstants.OPERATION_NAME, constant("op1"))
					.setHeader(CxfConstants.OPERATION_NAMESPACE, constant("ns1"))
					.to("cxf:bean:targetEndpoint")
					.process(new Processor2())
				.endDoTry()
				.doCatch(Exception.class)
					.process(new ExceptionProcessor())
				.endDoTry()
			.endChoice()

In ExceptionProcessor() which is called from doCatch((), I want to get the
exception object as well as the  original message bean when the message
enters the flow. Say it is Bean1.

Is it possible to get these two object from inside doCatch()? Please
suggest.



--
View this message in context: http://camel.465427.n5.nabble.com/Exception-handling-in-camel-tp5796686.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message