On 2011-11-30, at 下午8:41, rickthemick wrote:

Hi!

Actually not, the myserver DNS name is routed through a reverse proxy I believe, this causes CXF to generate service URLs with the IP address of the
machine instead of the DNS name "myserver" that the client uses.

For example., a client browser browse to "http://myserver/cxf"; but the
services he founds in the service listing there has address like:
http://10.0.0.23:8080/cxf/myservice

And because of the network setup he cant reach
http://10.0.0.23:8080/cxf/myservice since that request is not ruoted through
the reverse proxy, and thus, it works if he uses
http://myserver/cxf/myservice.

This is the reason why I want to force the "base-address" used by CXF when generating the service URLs. And I want to do it outside the service code (that is, outside the spring configuration). Thats why the config admin is very attractive to me to use to set "base-address". But I dont know if its
the correct way to do it.

The publishedEndpointUrl affects the endpoint URL to the service within the WSDL not the URL to the WSDL itself listed by CXF. The optimal situtation would be if "base-address" affects both the service listing URLs and the
endpoint URLs within the WSDLs.


Hi,

Actually it's exactly what publishedEndpointUrl can offer you, the correct behavior is that it's not only affect the soap:address within the wsdl, but also affect the WSDL URL in SerivceList.

You may use some old version CXF which has some bugs with publishedEndpointUrl, after CXF 2.4.0 several bugs with publishedEndpointUrl get fixed, could you try with more recent version?

Also, the configuration in org.apache.cxf.osgi.cfg only affect the real address the service published, change it can't help for your case.

Freeman

BR
/Rickard

--
View this message in context: 
http://cxf.547215.n5.nabble.com/base-address-for-CXF-tp5034937p5035389.html
Sent from the cxf-user mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com









Reply via email to