You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Alberto Brosich <ab...@ogs.trieste.it> on 2016/02/22 16:05:04 UTC
Simple enrich of a pojo
Hello,
I have to enrich a pojo using the value of an header.
I'm using a Processor but I'm wondering if there is a simpler method.
using
.enrich.simple("${body.setAttribute(${header.HeaderName})}") obviously
doesn't work because the setter returns null, not the pojo.
Regards
Alberto
Re: Simple enrich of a pojo
Posted by Alberto Brosich <ab...@ogs.trieste.it>.
Thanks!
It's exactly what I'm looking for.
Regards
On Mon, 2016-02-22 at 16:51 +0100, Claus Ibsen wrote:
> The simple language wasn't really intended for this, though you can
> use the script dsl
> http://camel.apache.org/script
>
> Where you can use simple, groovy, mvel, etc for such an use-case.
>
>
>
>
> On Mon, Feb 22, 2016 at 4:05 PM, Alberto Brosich
> <ab...@ogs.trieste.it> wrote:
> >
> > Hello,
> >
> > I have to enrich a pojo using the value of an header.
> > I'm using a Processor but I'm wondering if there is a simpler
> > method.
> >
> > using
> >
> > .enrich.simple("${body.setAttribute(${header.HeaderName})}")
> > obviously
> > doesn't work because the setter returns null, not the pojo.
> >
> >
> > Regards
> >
> > Alberto
> >
> >
> >
> >
>
>
>
Re: Simple enrich of a pojo
Posted by Claus Ibsen <cl...@gmail.com>.
The simple language wasn't really intended for this, though you can
use the script dsl
http://camel.apache.org/script
Where you can use simple, groovy, mvel, etc for such an use-case.
On Mon, Feb 22, 2016 at 4:05 PM, Alberto Brosich
<ab...@ogs.trieste.it> wrote:
>
> Hello,
>
> I have to enrich a pojo using the value of an header.
> I'm using a Processor but I'm wondering if there is a simpler method.
>
> using
>
> .enrich.simple("${body.setAttribute(${header.HeaderName})}") obviously
> doesn't work because the setter returns null, not the pojo.
>
>
> Regards
>
> Alberto
>
>
>
>
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2