You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Naveen Raj <na...@gmail.com> on 2012/09/04 05:10:29 UTC

Camel enrichment

hi,
    The camel enrich processor needs an aggregation strategy to be
implemented,where I need to implemented  my own bean to enrich.The scenario
that I want to implement is where an xml is inserted an element for which
the data is from the database.

This data from the database is queried based on the few attributes from the
xml message.


How can I perform this using the aggregation strategy?

I had a way in mind which is ..

1.Take the data from the the xml message with which I query from the db
2.send this result as an endpoint 
3.The same endpoint is made as the resource for the enrich 
4.The parse the xml message and insert the values using dom parser


I would like to know if this is the only way or there can be a better way?

Does camel provide any way of parsing the xml and insert data into a new
element?

Can camel be used to create new element in an xml message?

how it is different from the  aggregation ??

what is the type of the data returned from an query using sql component?

thanks,
Naveen



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-enrichment-tp5718573.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel enrichment

Posted by Taariq Levack <ta...@gmail.com>.
That sounds like too much effort.
I liked the simpler solution you got yesterday a whole lot better.

On 04 Sep 2012, at 5:10, Naveen Raj <na...@gmail.com> wrote:

> hi,
>    The camel enrich processor needs an aggregation strategy to be
> implemented,where I need to implemented  my own bean to enrich.The scenario
> that I want to implement is where an xml is inserted an element for which
> the data is from the database.
> 
> This data from the database is queried based on the few attributes from the
> xml message.
> 
> 
> How can I perform this using the aggregation strategy?
> 
> I had a way in mind which is ..
> 
> 1.Take the data from the the xml message with which I query from the db
> 2.send this result as an endpoint 
> 3.The same endpoint is made as the resource for the enrich 
> 4.The parse the xml message and insert the values using dom parser
> 
> 
> I would like to know if this is the only way or there can be a better way?
> 
> Does camel provide any way of parsing the xml and insert data into a new
> element?
> 
> Can camel be used to create new element in an xml message?
> 
> how it is different from the  aggregation ??
> 
> what is the type of the data returned from an query using sql component?
> 
> thanks,
> Naveen
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-enrichment-tp5718573.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel enrichment

Posted by Naveen Raj <na...@gmail.com>.
Hi all,


got an answer which i am working on....

http://camel.465427.n5.nabble.com/HELP-required-Camel-XML-Message-Enrichment-tt5718525.html#a5718577
http://camel.465427.n5.nabble.com/HELP-required-Camel-XML-Message-Enrichment-tt5718525.html#a5718577 

it was answered in my previous post regarding the same...

thanks,
Naveen Raj Balasubramaniam 



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-enrichment-tp5718573p5718578.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel enrichment

Posted by Naveen Raj <na...@gmail.com>.
Created a simple use case for enrichment

http://camel.465427.n5.nabble.com/HELP-required-Camel-XML-Message-Enrichment-td5718525.html 

Thanks all,
Naveen Raj Balasubramaniam 



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-enrichment-tp5718573p5719073.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel enrichment

Posted by Charles Moulliard <ch...@gmail.com>.
Hi Naveen,

Please consider to implement a simple use case and use the EIP enrich which
allows you to use an aggregator on the response

http://camel.apache.org/content-enricher.html

.enrich("direct:resource", aggregationStrategy)


Regards,




On Tue, Sep 4, 2012 at 5:10 AM, Naveen Raj <na...@gmail.com> wrote:

> hi,
>     The camel enrich processor needs an aggregation strategy to be
> implemented,where I need to implemented  my own bean to enrich.The scenario
> that I want to implement is where an xml is inserted an element for which
> the data is from the database.
>
> This data from the database is queried based on the few attributes from the
> xml message.
>
>
> How can I perform this using the aggregation strategy?
>
> I had a way in mind which is ..
>
> 1.Take the data from the the xml message with which I query from the db
> 2.send this result as an endpoint
> 3.The same endpoint is made as the resource for the enrich
> 4.The parse the xml message and insert the values using dom parser
>
>
> I would like to know if this is the only way or there can be a better way?
>
> Does camel provide any way of parsing the xml and insert data into a new
> element?
>
> Can camel be used to create new element in an xml message?
>
> how it is different from the  aggregation ??
>
> what is the type of the data returned from an query using sql component?
>
> thanks,
> Naveen
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-enrichment-tp5718573.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Charles Moulliard
Apache Committer / Sr. Pr. Consultant at FuseSource.com
Twitter : @cmoulliard
Blog : http://cmoulliard.blogspot.com