camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman Kalukiewicz" <>
Subject Re: How to enrich message with the result of other invocation
Date Mon, 05 Nov 2007 18:29:13 GMT
>  Thats a good idea. I have needed this myself. Its along the lines of
> ContentEnricher  .
> One way to do this would be to define ContentEnricherProcessor and the
> Resource would be replaced by an invocation of any Processor. The original
> message (before enrichment) could be saved of in either a header or could be
> appended with the new message (after enrichment) with the out response of
> the processor.

Anyway now it can easily be solved using such construct which is just
clear without any magic behind:

            setHeader("original", body()).
            setBody(constant("some other request")).
            setOutHeader("additionalData", body()).

Unfortunately two last lines doesn't work because of but I've already
send a patch for this problem.

Of course if we can find out an easy and natural way of expressing
ContentEnricherProcessor in DSL/XML it could be interesting


View raw message