On Wed, 2009-10-14 at 05:58 +0200, Claus Ibsen wrote:
> Ah the reason is that the javac and generics is limited in terms of DSL wise.
>
> What you need to do is to pass in the xpath as a 2nd parameter to setHeader.
>
> This
> .setHeader(DOI).xpath("/ambraMessage/doi/text()", String.class)
>
> Should be
> .setHeader(DOI, xpath("/ambraMessage/doi/text()", String.class))
>
I don't seem to have luck with this. This doesn't compile:
from("activemq:plos.pmc")
.setHeader(DOI, xpath("/ambraMessage/doi/text()", String.class))
.to("mock:end");
xpath() is not defined in RouteBuilder.
--
Dragisa Krsmanovic
Java Developer
Public Library of Science
http://www.plos.org