[
https://issues.apache.org/jira/browse/CAMEL-13758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16888191#comment-16888191
]
Rajiv edited comment on CAMEL-13758 at 9/5/19 6:38 PM:
-------------------------------------------------------
Hi Claus,
When I use the defaults \{{ }} it breaks something else. For example -
<setHeader headerName="CamelHttpUri">
<simple>{{{{webservice.url}}}}?criteria={"pst_num":[\\{"start":$simple{in.header.accountNumber}}],"max":{}}&userid=none&fields=secr_num,reg_cde&limit=100000000</simple>
</setHeader>
Caused by: java.lang.IllegalArgumentException: *Missing {{ from the text:*
[http://localhost:8585/app?criteria=\|http://localhost:8585/app?criteria=]{"pst_num":[\\\\\\{"start":$simple{in.header.accountNumber}}|file://%7B%22start%22:%24simple%7Bin.header.accountnumber%7D%7D/],"max":{}}&userid=none&fields=secr_num,reg_cde&limit=100000000
was (Author: troy smith):
Hi Claus,
When I use the defaults \{{ }} it breaks something else. For example -
<setHeader headerName="CamelHttpUri">
<simple>{{{{rpf.webservice.url}}}}?criteria={"pst_num":[\{"start":$simple{in.header.accountNumber}}],"max":{}}&userid=none&fields=secr_num,reg_cde&limit=100000000</simple>
</setHeader>
Caused by: java.lang.IllegalArgumentException: *Missing {{ from the text:*
[http://localhost:8585/app?criteria=\|http://localhost:8585/app?criteria=]{"pst_num":[\\\\\{"start":$simple{in.header.accountNumber}}|file://%7B%22start%22:%24simple%7Bin.header.accountnumber%7D%7D/],"max":{}}&userid=none&fields=secr_num,reg_cde&limit=100000000
> Unable to parse $simple{}, when you have prefixToken="${" suffixToken="}" in
> the propertyPlaceholder
> ----------------------------------------------------------------------------------------------------
>
> Key: CAMEL-13758
> URL: https://issues.apache.org/jira/browse/CAMEL-13758
> Project: Camel
> Issue Type: Bug
> Components: came-core
> Affects Versions: 2.16.4, 2.24.1
> Reporter: Rajiv
> Assignee: Claus Ibsen
> Priority: Minor
> Attachments: camel-test.zip, log.log
>
>
> Unable to parse $simple{}, when you have
> prefixToken={color:#14892c}"$\{"{color} suffixToken={color:#14892c}"}{color}"
> in the propertyPlaceholder.
> For example -
> {{<camelContext xmlns="http://camel.apache.org/schema/spring">
> <propertyPlaceholder id="ignoreId" location="classpath:props.properties"
> prefixToken="${" suffixToken="}"/> <route id="sendNotification"> <from
> uri="jms:queue:queue.sendNotification"/> <to
> uri="file:${OnDemand.output.url}?fileName=L2W.$simple\{in.header.accountNum}-${date:now:yyyyMMddHHmmssSSS}.csv"/>
> </route> </camelContext>}}
>
> In the above route ${OnDemand.output.url} {color:#333333}is a Spring property
> placeholders and $simple\{in.header.accountNum}{color} is a camel property
> placeholder.
> {{{color:#205081}Note:- This route configuration used to work till Camel
> 2.12{color}}}
> {{According to
> [https://github.com/apache/camel/blob/master/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc]-
> one should be able to refer to Camel's properties using $simple\{...} like
> this:}}
>
> {{<setHeader headerName="Exchange.FILE_NAME">
> <simple>{{file.rootdir}}{{/$simple\{in.header.CamelFileName}</simple
> </setHeader>}}
>
> {{Replication - camel-test.zip attached. Main class -
> CamelHelloWorldSpringExample.java}}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)