Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.此内容没有您所选择的语言版本。
6.3. Deploying the Apache Camel Route
Overview 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
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 Apache Camel route and the
RealWebServicesBean
bean) is ready for deployment into the OSGi container.
Prerequisites 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Before deploying the Apache Camel route into the OSGi container, you must configure the proxy Web service to use SSL/TLS security, as described in the previous section, Section 6.2, “Securing the Web Services Proxy”.
Steps to deploy the Camel route 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
To deploy the Web services proxy demonstration into the OSGi container, perform the following steps:
Build the demonstration 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Use Maven to build and install the demonstration as an OSGi bundle. Open a command prompt, switch the current directory to
CamelInstallDir/examples/camel-example-cxf-proxy
, and enter the following command:
mvn install -Dmaven.test.skip=true
mvn install -Dmaven.test.skip=true
Start the OSGi container 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
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:
./fuse
./fuse
Install the required features 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
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:
JBossFuse:karaf@root> features:install camel-cxf
JBossFuse: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:
JBossFuse:karaf@root> features:install camel-http
JBossFuse:karaf@root> features:install camel-http
Deploy the bundle 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Deploy the
camel-example-cxf-proxy
bundle, by entering the following console command:
JBossFuse:karaf@root> install -s mvn:org.apache.camel/camel-example-cxf-proxy/2.12.0.redhat-610379
JBossFuse:karaf@root> install -s mvn:org.apache.camel/camel-example-cxf-proxy/2.12.0.redhat-610379
Note
In this case, it is preferable to deploy the bundle directly using
install
, rather than using hot deploy, so that you can see the bundle output on the console screen.
If you have any difficulty using the
mvn
URL handler, see section "Mvn URL Handler" in "Deploying into the Container" for details of how to set it up.
Check the console output 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
After the bundle is successfully deployed, you should see output like the following in the console window:
JBossFuse:karaf@root> Starting real web service... Started real web service at: http://localhost:9081/real-webservice
JBossFuse:karaf@root> Starting real web service...
Started real web service at: http://localhost:9081/real-webservice