Starting with 2.2.4 it is also possible to configure an alias for the CXF 
servlet.
Example :

For the most part, in the spring config, instead of importing
META-INF/cxf/cxf-extension-http-jetty.xml
you would import
META-INF/cxf/osgi/cxf-extension-osgi.xml

The "address" used on jaxws:endpoint and such would just be:

/blah

with no http://host:port type thing.

would result in http://host:8181/cxf/blah URI being support but a given jaxws 
or jaxrs endpoint.

Port '8181' can be changed in the etc/config.properties. You can add an org.apache.cxf.osgi.cfg to /etc directory and set the 'org.apache.cxf.servlet.context' property to say '/' or '/custom' and it will be used instead of 'cxf'. This property can also be configured using shell config commands and indeed the changes can be persisted and restored after the restart with the latest Karaf fix from Guilluame.

cheers, Sergey

On Mon October 19 2009 4:57:30 pm Oliver Wulff wrote:
Hi there

When a customer deploys several applications into an osgi container
 (servicemix 4.x) each bundle configures/(instantiates) a jetty engine with
 security configurations etc. An idea is to re-use the osgi http service.
 Is this possible? Somehow, the osgi http service must know under which
 circumstances the request should be dispatched to cxf.

Yes.   Wit CXF less than 2.2.4, you would need the osgi http transport for cxf
thing that smx 4 has in their svn repo someplace.   With 2.2.4, we moved that
code into cxf where we can maintain it better.

For the most part, in the spring config, instead of importing
META-INF/cxf/cxf-extension-http-jetty.xml
you would import
META-INF/cxf/osgi/cxf-extension-osgi.xml

The "address" used on jaxws:endpoint and such would just be:

/blah

with no http://host:port type thing.


--
Daniel Kulp
dk...@apache.org
http://www.dankulp.com/blog

Reply via email to