camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Magnus Palmér <>
Subject Accessing an exchange header value in the Java DSL
Date Thu, 28 Apr 2011 20:47:11 GMT

I've spent several hours trying to find out what I suspect to be a trivial

I want to access the value of a header on the exchange to allow creation of
dynamic URI to my enrich.

This is how I set the header:

*.setHeader(Exchange.**HTTP_URI, simple(

This will override the URI and gives me a dynamic URI when using:


But now I would like to use:

*.enrich( "dynamic-uri-from-header", **new** SomeAggregationStrategy())*

I just can't seem to get how to access the headervalue as a String.

Trying for instance with header(Exchange.HTTP_URI). or with converting a
"simple" expression into a string value.

What am I missing?

Brgds, Magnus Palmér

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message