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

There is no way to specify autoRewriteSoapAddress from a spring context file.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2.7
    • 2.3.2
    • None
    • None

    Description

      I need to be able to use the autoRewriteSoapAddress facility in conjunction with CXF.

      This:
      <jaxws:endpoint id="wsServer" implementor="#server" address="http://0.0.0.0:8080/Maths" depends-on="jetty-factory" >
      <jaxws:properties>
      <entry key="autoRewriteSoapAddress" value="true"/>
      </jaxws:properties>
      </jaxws:endpoint>

      Queried as this: http://localhost:8080/Maths?wsdl
      Produces this: <soap:address location="*http://0.0.0.0:8080/Maths*" />

      It seems that the properties are only set on the endpoint (AbstractWSDLBasedEndpointFactory:176), but autoRewriteSoapAddress is looked for on the EndpointInfo (WSDLQueryHandler:278).
      It's not at all clear to me what the correct fix is - somehow we need to be able to specify properties on the EndpointInfo.

      This is a relatively minor problem for code that makes use of just CXF (because one can write code to iterate the endpoints, get the infos and set the property), but for projects that use CXF within something else it's a bigger problem - for example I want to use CXF with Camel, configured entirely with a spring context file.
      The code I use to walk the endpoints and set the property is, roughly:
      String[] serverRegistryNames = beanFactory.getBeanNamesForType( ServerRegistry.class );

      for ( String serverRegistryName : serverRegistryNames )
      {
      ServerRegistry serverRegistry = ( ServerRegistry ) beanFactory.getBean( serverRegistryName );
      List<Server> servers = serverRegistry.getServers();

      for ( Server server : servers )

      { server.getEndpoint().getEndpointInfo().setProperty( "autoRewriteSoapAddress", true ); }

      }

      Attachments

        Issue Links

          Activity

            People

              dkulp Daniel Kulp
              yaytay Yaytay
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: