On Tue, Mar 2, 2010 at 4:25 PM, Leen Toelen <[email protected]> wrote:
> Hi,
>
> I am trying to run this route:
>
>                <route id="RestToTopic">
>                        <from uri="jetty:http://0.0.0.0:8162/meucci/assembly"; 
> />
>                        <doTry>
>                                <to uri="xslt:XSLT.xml" />
>                                <to uri="validator:XSD.xsd" />
>                                <inOnly uri="activemq:topic:Topic" />
>                                <setBody><constant></constant></setBody> <!-- 
> Return empty body when OK -->
>                                <doCatch>
>                                
> <exception>org.apache.camel.ValidationException</exception>
>                                        
> <handled><constant>false</constant></handled>
>                                        <!-- TODO: Return exception message on 
> ValidationException -->
>                            </doCatch>
>                        </doTry>
>                </route>
>
> but I would like to get the validation exception message as the result
> body. Is this possible?
>

Yeah from the simple language etc.
http://camel.apache.org/simple.html

<setBody><simple>${exception.message}</simple></setBody>

> Regards,
> Leen
>



-- 
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

Reply via email to