Luca Burgazzoli created CAMEL-18370:
---------------------------------------
Summary: Bidning properties to route template local beans do not
honor RAW()
Key: CAMEL-18370
URL: https://issues.apache.org/jira/browse/CAMEL-18370
Project: Camel
Issue Type: Improvement
Components: camel-core, camel-kamelet
Reporter: Luca Burgazzoli
Assuming we have a kamelet where the route template is defined as:
{code:yaml}
template:
beans:
- name: local-salesforce
type: "#class:org.apache.camel.component.salesforce.SalesforceComponent"
properties:
clientId: "{{clientId}}"
clientSecret: "{{clientSecret}}"
userName: "{{userName}}"
password: "{{password}}"
loginUrl: "{{loginUrl}}"
from:
uri: kamelet:source
steps:
- to:
uri: "{{local-salesforce}}:createSObject"
parameters:
sObjectName: "{{sObjectName}}"
rawPayload: "true"
format: "JSON"
{code}
Where we define the _userName_ as something like [email protected]_.
With such parameter, the login would fail as the parameter would become _foo
[email protected]_ in the component (as the parameter is taken from the kamelet uri
hence, it gets decoded).
An attempt to fix that is to use RAW, as example _userName: "RAW{{userName}}"_
but this also would fail the login as the parameter would become _RAW(foo
[email protected])_ in the component.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)