Wiki Markup |
---|
{scrollbar} |
Anchor | ||||
---|---|---|---|---|
|
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
- #Maven configuration
- #JBI packaging
- #Static configuration using Maven
- #Static configuration using Ant
- #Web application
- 4. Examples
- 4. Examples
- 4. Examples
- 4. Examples
- 4. Examples
Here are the examples shipped with ServiceMix:
- Basic
- Bridge
- Camel for Enterprise Integration Pattern routing
- Cluster
- File Binding
- Loan Broker
- Loan Broker BPEL
- RSS Binding
- VFS Binding
- WSDL First
- WS-Notification Clustered
- WS-Notification HTTP Binding
- WSDL First
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:
...
lang | xml |
---|
...
|
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
|
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.
JBI packaging using Ant
This distribution includes example showing how to build a Service Assembly using Ant.
Static configuration using Ant
There are also a few examples that use Ant to build the example.
Web application
Wiki Markup |
---|
{scrollbar} |