Uploaded image for project: 'Red Hat build of Apache Camel for Spring Boot'
  1. Red Hat build of Apache Camel for Spring Boot
  2. CSB-5648

jaxws:client's address placeholder is not getting resolved when configured in XML

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • CSB-4.next
    • CSB-4.4
    • CXF
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Very Likely
    • 0

      The address is not getting resolved in the following bean which throws an exception at runtime (when the route is executed, not when the application starts):

        <jaxws:client name="cxfClient" id="cxfClient"
                        serviceClass="org.example.MyService"
                        address="${my.address}" />
      
      Caused by: java.net.URISyntaxException: Illegal character in path at index 1: ${my.address}
      

      Workaround:

      Delegating the address resolution to a separate String bean fixes the issue.

      
        <jaxws:client name="cxfClient" id="cxfClient"
                        serviceClass="org.example.MyService"
                        address="#address" />
      
          <bean name="address" class="java.lang.String">
              <constructor-arg value="${my.address}"/>
          </bean>
      

              Unassigned Unassigned
              rhn-support-adongre Avinash Dongre
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: