You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by J- <jm...@hotmail.com> on 2016/06/09 02:27:22 UTC

problem Settting camel header value to java enum value

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.