camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J- <jmand...@hotmail.com>
Subject problem Settting camel header value to java enum value
Date Thu, 09 Jun 2016 02:27:22 GMT
Trying to set the header to to an enum value but seem like it's only setting it to a string
using camel 2.17.1:


<setHeader headerName="TestHeader">
  <simple>${type:org.apache.camel.Exchange.FILE_NAME}</simple>
</setHeader>


But the value in the header is a string that equals: "org.apache.camel.Exchange.FILE_NAME"


What am i doing wrong??


Also tried with an enum from the simple page:


public enum Customer {
 
    GOLD, SILVER, BRONZE
}

<setHeader headerName="TestHeader">
  <simple>${type:org.apache.camel.processor.Customer.SILVER}</simple>
</setHeader>


Thanks.

Mime
View raw message