CXF DOSGi in Apache Karaf

Using the descriptions below a working demo should be up in less than 10 minutes.

Download and unpack Apache Karaf

Installation of CXF-DOSGi

feature:repo-add aries-rsa 1.9.0
feature:repo-add cxf-dosgi 1.8.0
feature:install cxf-dosgi-provider-cxf

Test installation with greeter demo

install -s mvn:org.apache.cxf.dosgi.samples/cxf-dosgi-ri-samples-greeter-interface/1.8.0
install -s mvn:org.apache.cxf.dosgi.samples/cxf-dosgi-ri-samples-greeter-impl/1.8.0

endpoints should show the greeter service being exported:

Endpoints for framework 346376f5-ef56-4bda-b238-0a905ce99342
id                            | interfaces                                            | framework                            | comp name
http://localhost:9090/greeter | [org.apache.cxf.dosgi.samples.greeter.GreeterService] | 346376f5-ef56-4bda-b238-0a905ce99342 |    

Now try to access the service using


Access the service transparently from a second container

  • Unpack karaf in a second directory and also start it.
  • Do the installation steps from "Installation of CXF-DOSGi"
  • Install a client to a service that is published in the first container.
  • DOSGi will automatically install a proxy for you service that calls the published service remotely over CXF


  • No labels