cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Freeman Fang <freeman.f...@gmail.com>
Subject Re: base-address for CXF
Date Wed, 30 Nov 2011 09:03:15 GMT
Hi,

I'm not sure what you exactly mean here, could you elaborate?

Per your server configuration, the webservice address is
http://your_host_address:8181/cxf/myservice

The 8181 is default osgi http service listening port, you can change it.
Also you can change the cxf part in the address, it's  called  
org.apache.cxf.servlet.context, so you can
add/edit org.apache.cxf.osgi.cfg in etc folder
add
org.apache.cxf.servlet.context=/myserver
so the address could be
http://your_host_address:8181/myserver/myservice

You can also edit this property from console or webconsole, they  
actually use same mechanism, they leverage OSGi configAdmin service  
underlying.

Freeman

On 2011-11-30, at 下午4:33, rickthemick wrote:

> Hi!
>
> Because of our network setup (I guess), CXF is generating a correct  
> (based
> on the server IP) but not desired URL for our services when listing  
> them at
> http://server/cxf.
>
> For this reason I want to force the base address for our services.  
> We are
> running CXF on a OSGi runtime and uses Spring to configure the  
> services,
> like this:
>
>
>  <import resource="classpath:META-INF/cxf/cxf.xml" />
>  <import resource="classpath:META-INF/cxf/osgi/cxf-extension- 
> osgi.xml" />
>
>
>  <jaxws:endpoint id="MyServiceEndpoint" implementor="#myService"
>    address="/myservice" />
>
> I have found fragments of information about a config property called
> "base-address" but I fail to apply it to our services. I cant find any
> information about it on the cxf.apache.org pages.
>
> Can somebody please direct me how to use this property? Or is there  
> some
> other way to do this?
>
> What I have done so far is to have the property set in the OSGi  
> config admin
> services (by following the example for changing the alias "/cxf" here
> http://fusesource.com/issues/browse/ESB-813), from Apache Felix web  
> console:
> PID = org.apache.cxf.osgi.cfg
>  BundleLocation = Unbound
>  base-address = myserver
>  org.apache.cxf.servlet.base-address = myserver
>  service.pid = org.apache.cxf.osgi.cfg
>
> ... but this doesnt seem to help me!
>
> Hope for you help, thanks Rickard!
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/base-address-for-CXF-tp5034937p5034937.html
> Sent from the cxf-user mailing list archive at Nabble.com.

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

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com










Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message