On Mon, Oct 12, 2009 at 10:39 PM, Dragisa Krsmanovic
<dkrsmano...@plos.org> wrote:
> I am trying to do something like:
>
>  from("activemq:plos.pmc")
>    .to("rnc:pmc-message.rnc")
>    .setHeader(DOI).xpath("/ambraMessage/doi/text()", String.class)
>    
> .setHeader(Exchange.FILE_NAME).xpath("/ambraMessage/archive/text()",String.class)
>  ...
>
> But it doesn't allow me to add any setHeader methods
> after .to("rnc:...") I want to validate a message before I try to
> extract Xpath and I have an onException handler to catch
> ValidationException.
>
> What am I doing wrong ?
>

What do you mean by doesnt allow me to?

You should be able to do that. Are you sure an exception is not occurring?
You can use the tracer to see how the message is routed
http://camel.apache.org/tracer

>
> --
> Dragisa Krsmanovic
> Java Developer
> Public Library of Science
> http://www.plos.org
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to