camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "simple.sethia" <simple.set...@gmail.com>
Subject Header Parameters not available in pipeline after using the enrich element
Date Mon, 21 Dec 2015 12:45:47 GMT
I am trying to aggregate response from two or more rest services. The rest
service URLs are mentioned in the header parameter (called as URIS) as a
comma separated list. Also, once I have aggregated the response, I then want
the response from the aggregation strategy to be passed to another endpoint
and this endpoint needs the other two header parameters which were passed in
the request, but the challenge is that the header parameters param1 and
param2 are not available in the bean method - 
Extract from camel config - 
                        <rest>
                                    <description>AGGREGATION INTEGRATION
PATTERN</description>
                                    <get uri="/Integration"
produces="application/json">
                                                <description>Aggregate the
response from two or more rest services</description>
                                                <route>
                                                            <removeHeaders
pattern="CamelHttp*"></removeHeaders>
                                                            <enrich
uri="direct:serviceAggregate" />
                                                            <to
                                                                       
uri="bean:Integration?method=replacePatternOnExchange(${body},
${header.param1}, ${header.param2})" />
                                                </route>
                                    </get>
                        </rest>

<route>
                                    <from uri="direct:serviceAggregate" />
                                    <recipientList delimiter=","
strategyRef="aggregationStrategy"
                                                parallelProcessing="true">
                                                <header>URIS</header>
                                    </recipientList>
                        </route>

Can someone please help?



--
View this message in context: http://camel.465427.n5.nabble.com/Header-Parameters-not-available-in-pipeline-after-using-the-enrich-element-tp5775321.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message