We're using JAXWS endpoints that are configured like:

    <jaxws:endpoint
        id="someservice"
        address="/someservice"
        implementor="#someserviceProvider" />

CXF servlet is mapped to /ws/*

  <servlet-mapping>
      <servlet-name>CXFServlet</servlet-name>
      <url-pattern>/ws/*</url-pattern>
  </servlet-mapping>


In dev environment this works nicely, http://devserver/app/ws/ lists the
different ports nicely and the links take to the wsdl which has the correct
soap:address inside wsdl:port.

In prod we have Apache load balancer at http://prod/app/ws/ which moves the
requests to the actual prod servers at http://prod1:8080/app/ws and
http://prod2:8080/app/ws.

When I go to http://prod/app/ws the links point to
http://localhost:8080/app/ws/someservice?wsdl and naturally do not work. If
I manually go to http://prod/app/ws/someservice?wsdl I get the wsdl, but the
soap:address has the localhost -address.

I tried to configure CXF to use a given address for my end point as in:

    <jaxws:endpoint
        id="someservice"
        address="http://server/app/ws/someservice";
        implementor="#someserviceProvider" />

I can't get this working even at my local env (no load balancers or
anything, just trying to make it work on localhost). The end point listing
at http://server/app/ws/ looks fine but the link
http://server/app/ws/someservice?wsdl just results in "No service was
found."

When I try to deploy service like this (using a static, non-relative
address) the log looks like it would go ok:

24.6.2008 10:43:44
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service {http://www.some.com/some/schemas}SomeService from
WSDL: wsdl/someservice.wsdl
24.6.2008 10:43:44 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be
http://localhost:8080/app/ws/service3

But when I go to http://localhost:8080/app/ws/service3?wsdl

24.6.2008 11:08:04 org.apache.cxf.transport.servlet.ServletController invoke
WARNING: Can't find the the request for
http://localhost:8080/app/ws/service3's Observer
-- 
View this message in context: 
http://www.nabble.com/cxf-behind-load-balancer%2C-services-point-to-localhost%3A8080-instead-of-server%3A80-tp18086037p18086037.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to