Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ServiceMix requires a Java 5 environment to run. Refer to http://java.sun.com for details on how to download and install J2SE 1.5 . If you already have a Java 5, 6 or 7 environment installed, you can just use that oneor greater.

Download binaries

Depending on the platform you plan to install and run Apache ServiceMix you will select the appropriate installation image. Open a Web browser and access the following URL, there you will find the available packages for download (binaries and source code).

...

While you will learn in the remainder of this guide how to create and package a JBI applicationuse and leverage Apache ServiceMix Runtime, we will just use the pre-built packaging for now.

Note: This requires ServiceMix 3.0 and does not work with 3.0M2 or prior. 

Open another command line console in the <servicemix_home> directory and In the console, run the following commands in Windows:

Code Block
copy components\servicemix-shared-*.zip install
copy components\servicemix-http-*.zip install
copy components\servicemix-jsr181-*.zip install
copy examples\wsdl-first\wsdl-first-sa-*.zip deploy

respectively Linux:

Code Block

cp components/servicemix-shared-*.zip install
cp components/servicemix-http-*.zip install
cp components/servicemix-jsr181-*.zip install
cp examples/wsdl-first/wsdl-first-sa-*.zip deploy

These commands will:

  • install the servicemix-shared Shared Library
  • install the servicemix-http and servicemix-jsr181 JBI components
  • deploy a JBI Service Assembly which exposes a service over HTTP/SOAP
Warning
titleLaunch directory

ServiceMix deploy and install directories are relative to the directory where ServiceMix was started. Be sure to start it from the root dir using the bin/servicemix command. If you run it from the bin dir, the previous commands will fail and you would have to copy the components to the bin/install and bin/deploy folders.

You should see the following on the command line console:

...

obr start org.apache.servicemix.bundles.jaxb-impl camel-spring camel-example-osgi

This commands will download, install and start the specified jars and their dependencies.

No Format
bgColor#000000
borderStylesolid

...

gnodet@Guillaume-Nodets-MacPro.local:/> obr start org.apache.servicemix.bundles.jaxb-impl camel-spring camel-example-osgi
Target resource(s):
-------------------
   camel-example-osgi (1.3.0.SNAPSHOT)
   ServiceMix OSGI Common Bundles: jaxb-impl (2.0.3.SNAPSHOT)
   camel-spring (1.3.0.SNAPSHOT)

Required resource(s):
---------------------
   ServiceMix OSGI Common Bundles: jaxws-api (2.0.0.SNAPSHOT)
   ServiceMix OSGI Common Bundles: jaxb-api (2.0.0.SNAPSHOT)
   geronimo-jta_1.1_spec (1.1.1.SNAPSHOT)
   camel-core (1.3.0.SNAPSHOT)
   ServiceMix OSGI Common Bundles: aopalliance (1.0.0.SNAPSHOT)
   geronimo-ejb_3.0_spec (1.0.1.SNAPSHOT)
   geronimo-jpa_3.0_spec (1.1.1.SNAPSHOT)
   geronimo-jms_1.1_spec (1.1.1.SNAPSHOT)
   ServiceMix OSGI Common Bundles: cglib (2.1.0.SNAPSHOT)
   geronimo-annotation_1.0_spec (1.1.1.SNAPSHOT)
   geronimo-j2ee-connector_1.5_spec (2.0.0.SNAPSHOT)
   spring-tx (2.5.0)
   geronimo-saaj_1.3_spec (1.0.0.SNAPSHOT)
   ServiceMix OSGI Common Bundles: ant (1.7.0.SNAPSHOT)
   geronimo-activation_1.1_spec (1.0.1.SNAPSHOT)

Deploying...done.

The example installed is using Camel to start a timer every 2 seconds and output a message on the console.

Stopping and uninstalling the sample application

TODO ... using: osgi listBundles, osgi stop xx, osgi uninstall xx

Summary

This document

Now, open a web browser to the following location:

http://localhost:8192/PersonService/main.wsdl

You should see the WSDL of the web service that has just deployed!

Wiki Markup
Now, open a web browser and point it to the following location: {{\[servicemix_home\]/examples/wsdl-first/client.html}}.  Then, click on the {{SEND}} button to see the web service response.

Warning
titleIE users

If your version of ServiceMix is older than 3.0.1, and you are using Internet Explorer, you will have to comment out the following line in the client.html web page.

No Format

/* netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead UniversalBrowserWrite"); */

This has been be fixed in the 3.1 release.

#top

Summary

This article showed you how simple it is to have Apache ServiceMix up and running. The overall time for getting the server running should be less than five minutes if you have the prerequisite (Java 1.5) already installed. Additionally, this article also showed you how to deploy and test a simple Web Service in less than five minutes.

...