Hi Jari,
try using RAW[1], something like:

.to("bean:ProcessExcelFile?method=processExcel('RAW({{file.name.starts}}')")

zoran

[1] 
https://github.com/apache/camel/blob/master/docs/user-manual/en/faq/how-do-i-configure-endpoints.adoc#configuring-parameter-values-using-raw-values-eg-such-as-passwords

On Tue, Nov 13, 2018 at 11:05 AM, Pakarinen, Jari
<jari.pakari...@orion.fi> wrote:
> Hi,
>
> I have code that passes Java properties value that contains a + sign to Java 
> bean (as a string). The plus sign is replaced with a space when inspected in 
> the bean. But if I log the contents of the property inside from() ... .end() 
> the plus sign is shown.
>
> Example:
>
> from("file://..")
>     .to("bean:ProcessExcelFile?method=processExcel('{{file.name.starts}}')
>     .log("{{file.name.starts}}")
> .end();
>
> In the example {{file.name.starts}} is the property that contains the plus 
> sign. Line .log("{{file.name.starts}}") will show the plus sign in the log 
> correctly.
>
> But when reaching the processExcel method the plus sign has been replaced 
> with a space. Any idea why this is happening and what could be done to 
> prevent it ?
>
> I tried reading a properties file with just Java code and the + sign is 
> showing correctly.
>
> Camel 2.22.1
>
> King Regards,
> Jari
>



-- 
Zoran Regvart

Reply via email to