Camel route from does not substitute properties in Fuse Service Works

Solution Verified - Updated -

Issue

  • When defining the following camel route.
<?xml version="1.0" encoding="ASCII"?>
<routes xmlns="http://camel.apache.org/schema/spring">
    <route>
        <from uri="{{toScheme}}://ServiceBasic"></from>
        <log message="ServiceBasic - message received: ${body}" logName="Message"></log>
        <log message="ServiceBasic - property value for myProperty: ${properties:myProperty}, property value for myComponentProperty {{myComponentProperty}}" logName="Properties"></log>
        <choice>
            <when>
                <simple>${body} contains "hello"</simple>
                <log message="Detected 'hello' in message, modifying message to add 'World'"></log>
                <bean ref="org.jboss.switchyard.blueprint.basic.camel.processor.HelloProcessor"></bean>
                <to uri="{{toScheme}}://SYBean"></to>
            </when>
            <otherwise>
                <log message="'hello' not detected in message"></log>
                <to uri="{{toScheme}}://SYBean"></to>
            </otherwise>
        </choice>
    </route>
</routes>
  • The {{toSchema}} is correctly substituted in the <to ..> tags, but not substituted in the <from..> tag.

  • The following error is produced on deployment:

org.switchyard.SwitchYardException: Illegal character in scheme name at index 0: {{toScheme}}://ServiceBasic

Environment

  • Red Hat JBoss Fuse Service Works (FSW)
    • 6.0.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.