You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "matt.u" <ma...@gmail.com> on 2013/05/17 07:55:17 UTC

Why the "handled" tag can't use in xml.

Hi all.The error handler can use in java dsl like this:
onException(Throwable.class)
    .to("file://errors")
    .process(errorProcessor)
    .handled(true)
.end();

But in xml, I write this, it can't working:
<camel:onException>
    <camel:exception>java.lang.Throwable</camel:exception>
    <camel:to uri="file://errors" />
    <camel:process ref="errorProcessor" />
    <camel:handled>
        <camel:constant>true</camel:constant>
    </camel:handled>
</camel:onException>

What's the right useage?
Thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/Why-the-handled-tag-can-t-use-in-xml-tp5732701.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Why the "handled" tag can't use in xml.

Posted by "matt.u" <ma...@gmail.com>.
Thanks.The problem is fix.



--
View this message in context: http://camel.465427.n5.nabble.com/Why-the-handled-tag-can-t-use-in-xml-tp5732701p5732729.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Why the "handled" tag can't use in xml.

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Just validate your xml against the schema and you can figure out why.

<handled> should be moved up, so it comes before the process

<camel:onException>
    <camel:exception>java.lang.Throwable</camel:exception>
    <camel:handled>
        <camel:constant>true</camel:constant>
    </camel:handled>
    ...


On Fri, May 17, 2013 at 7:55 AM, matt.u <ma...@gmail.com> wrote:
> Hi all.The error handler can use in java dsl like this:
> onException(Throwable.class)
>     .to("file://errors")
>     .process(errorProcessor)
>     .handled(true)
> .end();
>
> But in xml, I write this, it can't working:
> <camel:onException>
>     <camel:exception>java.lang.Throwable</camel:exception>
>     <camel:to uri="file://errors" />
>     <camel:process ref="errorProcessor" />
>     <camel:handled>
>         <camel:constant>true</camel:constant>
>     </camel:handled>
> </camel:onException>
>
> What's the right useage?
> Thanks.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Why-the-handled-tag-can-t-use-in-xml-tp5732701.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen