Re: Calling setHeader() after to()

2009-10-15 Thread Dragisa Krsmanovic
On Thu, 2009-10-15 at 08:37 +0200, Claus Ibsen wrote: > On Wed, Oct 14, 2009 at 11:07 PM, Dragisa Krsmanovic > wrote: > > 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

Re: Calling setHeader() after to()

2009-10-14 Thread Claus Ibsen
On Wed, Oct 14, 2009 at 11:07 PM, Dragisa Krsmanovic wrote: > 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 >>    .

Re: Calling setHeader() after to()

2009-10-14 Thread Dragisa Krsmanovic
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) > >

Re: Calling setHeader() after to()

2009-10-13 Thread Claus Ibsen
On Tue, Oct 13, 2009 at 6:54 PM, Dragisa Krsmanovic wrote: > On Tue, 2009-10-13 at 06:13 +0200, Claus Ibsen wrote: >> On Mon, Oct 12, 2009 at 10:39 PM, Dragisa Krsmanovic >> wrote: >> > I am trying to do something like: >> > >> >  from("activemq:plos.pmc") >> >    .to("rnc:pmc-message.rnc") >> >

Re: Calling setHeader() after to()

2009-10-13 Thread Dragisa Krsmanovic
On Tue, 2009-10-13 at 06:13 +0200, Claus Ibsen wrote: > On Mon, Oct 12, 2009 at 10:39 PM, Dragisa Krsmanovic > 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) >

Re: Calling setHeader() after to()

2009-10-12 Thread Claus Ibsen
On Mon, Oct 12, 2009 at 10:39 PM, Dragisa Krsmanovic 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/te

Calling setHeader() after to()

2009-10-12 Thread Dragisa Krsmanovic
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