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.1.2. Running the Demonstrations
Building the demonstrations Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Use Apache Maven to build the demonstrations. Open a new command prompt, change directory to
DemoDir/src/fuse-webinars/cxf-webinars, and enter the following command:
mvn install
mvn install
This command builds all of the demonstrations under the
cxf-webinars directory (where the demonstrations are defined to be submodules of the cxf-webinars/pom.xml project). While Maven is building the demonstration code, it downloads whatever dependencies it needs from the Internet and installs them in the local Maven repository.
Starting and configuring the Red Hat JBoss Fuse container Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Start and configure the Red Hat JBoss Fuse container as follows:
- (Optional) If your local Maven repository is in a non-standard location, you might need to edit the JBoss Fuse configuration to specify your custom location. Edit the
InstallDir/etc/org.ops4j.pax.url.mvn.cfgfile and set theorg.ops4j.pax.url.mvn.localRepositoryproperty to the location of your local Maven repository:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Launch the JBoss Fuse container. Open a new command prompt, change directory to
InstallDir/bin, and enter the following command:./fuse
./fuseCopy to Clipboard Copied! Toggle word wrap Toggle overflow - For convenience, each of the demonstrations can be deployed into the JBoss Fuse container as an Apache Karaf feature (which automatically installs any required dependencies along with the demonstration bundle). But first, you must specify the location of the features repository, by entering the following console command:
JBossFuse:karaf@root> features:addUrl mvn:org.fusesource.sparks.fuse-webinars.cxf-webinars/customer-features/Version/xml
JBossFuse:karaf@root> features:addUrl mvn:org.fusesource.sparks.fuse-webinars.cxf-webinars/customer-features/Version/xmlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Where Version is the current version of the demonstration package (see the value of theproject/versionelement in theDemoDir/src/pom.xmlfile).
Demonstration features Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
The following features are now available from the JBoss Fuse console (where you can enter the command,
features:list | grep customer to check the status of these features):
customer-ws customer-ws-client customer-ws-cxf-payload customer-ws-cxf-pojo customer-ws-cxf-provider
customer-ws
customer-ws-client
customer-ws-cxf-payload
customer-ws-cxf-pojo
customer-ws-cxf-provider
Running the customer-ws-osgi-bundle demonstration Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
It is now a relatively straightforward task to run each of the demonstrations by installing the relevant features.
For example, to start up the WSDL-first Web service (discussed in Chapter 3, WSDL-First Service Implementation), enter the following console command:
JBossFuse:karaf@root> features:install customer-ws
JBossFuse:karaf@root> features:install customer-ws
To see the Web service in action, start up the sample Web service client (discussed in Chapter 4, Implementing a WS Client), by entering the following console command:
JBossFuse:karaf@root> features:install customer-ws-client
JBossFuse:karaf@root> features:install customer-ws-client
The bundle creates a thread that invokes the Web service once a second and logs the response. View the log by entering the following console command:
JBossFuse:karaf@root> log:tail -n 4
JBossFuse:karaf@root> log:tail -n 4
You should see log output like the following:
To stop viewing the log, type the interrupt character (usually Ctrl-C).
To stop the client, first discover the client's bundle ID using the
osgi:list console command. For example:
JBossFuse:karaf@root> list | grep customer-ws-client [ 219] [Active ] [ ] [Started] [ 60] customer-ws-client (1.1.4)
JBossFuse:karaf@root> list | grep customer-ws-client
[ 219] [Active ] [ ] [Started] [ 60] customer-ws-client (1.1.4)
You can then stop the client using the
osgi:stop console command. For example:
JBossFuse:karaf@root> stop 219
JBossFuse:karaf@root> stop 219
To shut down the container completely, enter the following console command:
JBossFuse:karaf@root> shutdown -f
JBossFuse:karaf@root> shutdown -f