4 Replies Latest reply on Jun 22, 2011 3:37 AM by Mikael Sundell

    CXF endpoint + publishedEndpointUrl

    Mikael Sundell Newbie

      We're using a CXF endpoint which is listening on a private host behind a firewall, as a result the URL generated for the CXF does NOT reflect the URL the external clients needs to use when using the service.


      We've done some experiments with the publishedEndpointUrl without much of success:


      The endpoint for the service:






      We then publish the server with "install -m mvn:..." from our local Archiva.


      We've added the "publishedEndpointUrl" property but for some reason it is ignored when listing the service under http://host:8090/cxf.


      Output "Available SOAP services:" from the cxf page:


      Endpoint address:

      WSDL : AnnotationWSService

      Target namespace: http://service.flow...com/


      (I've removed some company sensitive information from the WSDL and serviceClass)


      We expected the "listering/private IP" 172... to change to "http://www.example.com/services/test"


      Can anyone point us in the right direction?








        • 1. Re: CXF endpoint + publishedEndpointUrl
          Freeman(Yue) Fang Master



          Could you check the soap:address in the wsdl to see if your publishedEndpointUrl take effect?


          I think the purpose of publishedEndpointUrl is change the soap:address in the wsdl only.



          • 2. Re: CXF endpoint + publishedEndpointUrl
            Willem Jiang Master

            Just as Freeman said, the publishedEndpointUrl only take effects on the WSDL which is generated by CXF. In this way, your service's WSDL will not expose your internal address which your service is listening.

            • 3. Re: CXF endpoint + publishedEndpointUrl
              Mikael Sundell Newbie

              OK - Thanks for your replies, will provide you with some more details and describe what I want to achieve instead:


              The setup:


              1. Tomcat Annotation service

              It's published on the localhost and therefore has the address:

              "Address: http://localhost:8080/testDs/AnnotationWSService"


              - The services are defined in-code as:



              - This service is not exposed to clients.


              - Observation: If we access the server using the domain name localhost is used in the listed Address, if used with the private IP that IP is used instead!


              2. CXF API for Annotation service(s)

              In the POM it's basically a cxf-codegen-plugin configuration with different wsdl's pointing to the Tomcat services. The result is the generated classes as an API.







              3. The service bundle installed in FuseESB


              The external clients are supposed to access the webservices through the FuseESB service that is exposed on a api.* domain name therefore we would like the published address to reflect the "external" domain name. Clients will use the api.* domain that will then use localhost internally to get back with a response.


              Puuh, did you get that?




              Edited by: ms82 on Jun 22, 2011 7:15 AM


              Edited by: ms82 on Jun 22, 2011 7:16 AM

              • 4. Re: CXF endpoint + publishedEndpointUrl
                Mikael Sundell Newbie

                Hi again!

                Here's an update, just removed the Apache Proxy Frontend and made FuseESB listen directly to port 80 on the domain (instead of being passed through apache), now we have the expected behaviour.