I'd also tried that, but twas the same.


Claus Ibsen-2 wrote:
> 
> Hi
> 
> Are you sure your xpath expression works. You could just test with a
> constant for starters
> 
>  <setHeader headerName="routeId">
>         <constant>123</constant>
>  </setHeader>
> 
> And you may want to set a result type on the xpath as well to force it
> being evaluated as a String etc.
> 
> <xpath resultType="java.lang.String">xxxx</xpath>
> 
> And I think you can omit java.lang to make it shorter
> 
> <xpath resultType="String">xxxx</xpath>
> 
> 
> On Mon, Feb 22, 2010 at 11:35 AM, lekkie <[email protected]> wrote:
>>
>>
>> <setHeader headerName="routeId">
>>        <xpath>//myId</xpath>
>> </setHeader>
>> <bean ref="RecipientList" method="route"/>
>>
>> here is my recipient list:
>>  public String[] route(@Header("//routeId") String routeId)
>>        {
>>                LOG.info("Route id: " + routeId);
>>        }
>>
>> the code above returns null.
>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/How-to-set-an-exchange%27s-message-header-tp27685342p27685342.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://old.nabble.com/How-to-set-an-exchange%27s-message-header-tp27685342p27686084.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to