Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
{scrollbar}

Anchor
top
top

4. Examples

The ServiceMix distribution comes with several examples categories. The following sections of this document will help you understanding the differences between these examples and explain alternative methods to start them

Here are the examples shipped with ServiceMix:

#top4. Examples

Maven configuration

ServiceMix release is not available on public maven repositories, so you need to either:

...

Include Page

...

The last point can be done by modifying your ~/.m2/settings.xml configuration file to include the following informations:

...

langxml

...

Configuring Maven
Configuring Maven

JBI packaging using Maven

The following examples use the standard JBI packaging:

Deployment using maven

You will need a ServiceMix server running to deploy this assembly. From the distribution root directory, launch:

Code Block
cd [SM30UG:servicemix_install_dir]
bin/servicemix

Using maven, you can launch the following command to build the Service Assembly:

Code Block
cd [SM30UG:servicemix_install_dir]/examples/wsdl-first
mvn install

...

First, start a ServiceMix server:

Code Block
cd [SM30UG:servicemix_install_dir]
bin/servicemix

Install the needed components and shared libraries:

Code Block
cd [SM30UG:servicemix_install_dir]/components
cp servicemix-shared* ../install
cp xxx* ../install

...

From another console, launch the following commands:

Code Block
cd [SM30UG:servicemix_install_dir]/examples/wsdl-first/wsdl-first-sa
cp xxx-sa-3.0-incubating.zip [SM30UG:servicemix_install_dir]/deploy

...

You can also use the ant tasks to deploy the JBI artifacts:

Code Block
cd [SM30UG:servicemix_install_dir]/components

ant -f ../ant/servicemix-ant-task.xml \
    -Dsm.username=smx \
    -Dsm.password=smx \
    -Dsm.install.file=servicemix-shared-3.0-incubating.zip
    install-shared-library

ant -f ../ant/servicemix-ant-task.xml \
    -Dsm.username=smx \
    -Dsm.password=smx \
    -Dsm.install.file=servicemix-http-3.0-incubating.zip
    install-component

ant -f ../ant/servicemix-ant-task.xml \
    -Dsm.username=smx \
    -Dsm.password=smx \
    -Dsm.component.name=servicemix-http \
    start-component

...

Then, you can deploy the service assembly:

Code Block
cd [SM30UG:servicemix_install_dir]/examples/wsdl-first/

ant -f ../../ant/servicemix-ant-task.xml \
    -Dsm.username=smx \
    -Dsm.password=smx \
    -Dsm.deploy.file=wsdl-first-sa-3.0-incubating.zip
    deploy-service-assembly

4. Examples#top

Static configuration using Maven

These examples use Maven and the jbi-maven-plugin from ServiceMix to start a new ServiceMix instance using a static ServiceMix configuration file.

4. Examples#top

JBI packaging using Ant

This distribution includes example showing how to build a Service Assembly using Ant.

4. Examples#top

Static configuration using Ant

There are also a few examples that use Ant to build the example.

4. Examples#top

Web application

4. Examples#top

Wiki Markup
{scrollbar}