You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Brandon Richins <Br...@imail.org> on 2010/10/01 16:56:55 UTC
hostname and port determination for JAX-WS
I recently discovered that the ports used for the WSDL and service listing produced by CXF seems effected when running behind an Apache load balancer. I'm running WebLogic in clustered mode and specifying a frontend-http-port of 80. Each backend server is bound to a different port. When I develop and deploy locally, without the cluster portion of WL enabled and without a load balancer, the CXF service list web page displays the port normally (7001). But when I run the same war on a clustered server the port changes to the load balanced port (80). For example the endpoint changes from http://foo:7001/simpleservice/myservice to http://foo:80/simpleservice/myservice. Likewise the WSDL reflects the different ports.
Could someone point me to the CXF code that controls what ports are displayed in the WSDL urls and service listing? I'm very curious how CXF knew to use the load balanced port. It seems to be the correct behavior but I'd like to understand it better.
Thanks,
Brandon Richins
Re: hostname and port determination for JAX-WS
Posted by Daniel Kulp <dk...@apache.org>.
In AbstractServletController, there is a getBaseURL call that uses the
HttpServletRequest to reconstruct the URL. Most likely, weblogic is using
information provided by the load balancer to get the "real" port and such.
(Or from the Host header).
Dan
On Friday 01 October 2010 10:56:55 am Brandon Richins wrote:
> I recently discovered that the ports used for the WSDL and service listing
> produced by CXF seems effected when running behind an Apache load
> balancer. I'm running WebLogic in clustered mode and specifying a
> frontend-http-port of 80. Each backend server is bound to a different
> port. When I develop and deploy locally, without the cluster portion of
> WL enabled and without a load balancer, the CXF service list web page
> displays the port normally (7001). But when I run the same war on a
> clustered server the port changes to the load balanced port (80). For
> example the endpoint changes from http://foo:7001/simpleservice/myservice
> to http://foo:80/simpleservice/myservice. Likewise the WSDL reflects the
> different ports.
>
> Could someone point me to the CXF code that controls what ports are
> displayed in the WSDL urls and service listing? I'm very curious how CXF
> knew to use the load balanced port. It seems to be the correct behavior
> but I'd like to understand it better.
>
> Thanks,
>
> Brandon Richins
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog