This is a typical Content Enricher EIP scenario. Have a look at [1]. At [2]
you can find some tests which show how to use it.
For the Java - XML - Mapping I recommend to have a look at the Camel
JAXBDataFormat [3].

If you are new, you should start at [4].
And I really recommend to Camel in Action book [5].

[1] http://camel.apache.org/content-enricher.html
[2]
https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/
[3] http://camel.apache.org/jaxb.html
[4] http://camel.apache.org/getting-started.html
[5] http://www.manning.com/ibsen/

Best,
Christian

On Mon, Sep 3, 2012 at 8:24 AM, Naveen Raj <[email protected]> wrote:

> Hi all,
>         I am new to camel and I am trying a POC for enriching where a data
> from sql database is to be inserted into the xml message that is received.
>
> I would like to use this xml and the input message---> from a file
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <catalog>
>   <cd>
>     <title>Empire Burlesque</title>
>     <artist>Bob Dylan</artist>
>     <country>USA</country>
>     <company>Columbia</company>
>
>     <year>1985</year>
>   </cd>
> </catalog>
>
> where as the resulting xml that goes to the outbound endpoint should result
> like
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <catalog>
>   <cd>
>     <title>Empire Burlesque</title>
>     <artist>Bob Dylan</artist>
>     <country>USA</country>
>     <company>Columbia</company>
>     <price>10.90</price>
>     <year>1985</year>
>   </cd>
> </catalog>
>
> the price is taken from the database...
>
> right now I don't want any logic to take the price from the data base.My
> priority is to insert the data in the xml message.
>
> Thanks,
>
> Naveen Raj Balasubramaniam
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-XML-Message-Enrichment-tp5718525.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--

Reply via email to