The Maven POM file in the basic Camel CXF proxy demonstration is already
configured to generate an OSGi bundle. Hence, after building the demonstration using
Maven, the demonstration bundle (which contains the Fuse Mediation Router route and the
RealWebServicesBean
bean) is ready for deployment into the OSGi
container.
Before deploying the Fuse Mediation Router route into the OSGi container, you must configure the proxy Web service to use SSL/TLS security, as described in the previous section, Securing the Web Services Proxy.
To deploy the Web services proxy demonstration into the OSGi container, perform the following steps:
Use Maven to build and install the demonstration as an OSGi bundle. Open a command
prompt, switch the current directory to
,
and enter the following command:CamelInstallDir
/examples/camel-example-cxf-proxy
mvn install -Dmaven.test.skip=true
If you have not already done so, start up the Apache ServiceMix console (and container instance) by entering the following command in a new command prompt:
servicemix
The camel-cxf
feature, which defines the bundles required for the
Camel/CXF component, is not installed by default. To install
the camel-cxf
feature, enter the following console command:
karaf@root> features:install camel-cxf
You also need the camel-http
feature, which defines the bundles
required for the Camel/HTTP component. To install the camel-http
feature, enter the following console command:
karaf@root> features:install camel-http
Deploy the camel-example-cxf-proxy
bundle, by entering the following
console command:
karaf@root> install -s mvn:org.apache.camel/camel-example-cxf-proxy/2.8.0-fuse-00-08
![]() | Note |
---|---|
In this case, it is preferable to deploy the bundle directly using
If you have any difficulty using the |