You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "simple.sethia" <si...@gmail.com> on 2015/12/21 13:45:47 UTC

Header Parameters not available in pipeline after using the enrich element

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.