On Thu, Feb 4, 2010 at 11:52 AM, lekkie <[email protected]> wrote: > > Hi, > > I'd like to set a custom message body after handling an exception. > > I have handled an exception with the following, how do I set the body to a > desired message? > > <route> > <from uri="direct:route2"/> > <to uri="xslt:requestToSOAP.xsl"/> > <!-- do other things --> > <onException> > > <exception>org.apache.servicemix.cxfbc.interceptors.JbiFault</exception> > <redeliveryPolicy maximumRedeliveries="1" /> > <handled><constant>true</constant></handled> > <!-- set response message to client system here --> > </onException> > </route> >
Just do it anyhow you like it using a Processor, POJO etc. You can just continue routing the message from that point. If you did pickup the Camel in Action book yesterday which was on sale for 10$ you could see an example in chapter 5, listing 5.8. > > -- > View this message in context: > http://old.nabble.com/Setting-custom-response-message-after-handling-exception-tp27450868p27450868.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
