Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-5332

Support spring expression language for jaxws:client address attribute

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.2
    • 2.7.8, 2.6.11
    • None
    • None
    • Unknown

    Description

      I am using a value from another spring bean as the address for my jaxws:client.

      Ideally I would like to use Spring expression language in the address attribute of the jaxws:client tag. e.g.

      <jaxws:client address="#{addresses.primaryAddress}" />
      

      but currently CXF tries to lookup a bean with id {addresses.primaryAddress}.

      As a workaround I can use a MethodInvokingFactoryBean e.g.

      <bean id="primaryAddress" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
        <property name="targetObject" ref="addresses" />
        <property name="targetMethod"><value>getPrimaryAddress</value></property>
      </bean>
      
      <jaxws:client address="#primaryAddress" />
      

      but being able to use Spring expression language would be cleaner.

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            manderson23@gmail.com Mark Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: