Pablo,
my suggestion looks like the one below:
from("direct:start")
.enrich("direct:enrich", myAggregationStrategie)
.to("bean://doWhatEverYouWantWithTheEnrichedXML");
from("direct:enrich")
.to("bean://transformMyXmlIntoAQuery")
.to("jdbc://xxx");
Give it a try...
Best,
Christian
On Wed, Jan 25, 2012 at 3:19 PM, Pablo Venini <[email protected]>wrote:
> Christian:
> as I see it, the problem would occur before the aggregation
> strategy; if I use a JDBC endpoint, the query would have to be placed into
> the body of the exchange, thus replacing the original body (the XML
> document, which I have to use later to merge with the nodes I create from
> the results of the query). The same I think would happen with the SQL
> endpoint, because even if I use a SQL statement with placeholders, the
> values for those placeholders would have to came from some properties of
> the nodes, so I would need to process the XML and replace the body.
>
> Pablo
>
> If you use the enrich EIP, you have to provide an Aggregation strategy to
>> "merge" the original exchange (which contains the xml document) and the
>> new
>> exchange (the result of your database call if you have on). Where is the
>> problem?
>>
>> Best,
>> Christian
>>
>
>
>