Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Section
Column

In this example, we will only use two components:

Thus we will have to create two service units and a service assembly.

First, we need to create the root maven project which will hold our SUs and SA. Launch the following commands:

Code Block
mkdir citytime
cd citytime

And create a file named pom.xml with the following content:

Code Block
langxml
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.servicemix.samples</groupId>
  <artifactId>citytime</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>pom</packaging>
</project>
Column
Gliffy Diagram
sizeM
namecitytime-sa
pageSM:Orchestration with JSR181
alignleft
spaceSM

Then, we can use maven archetypes to create the two SUs and the SA. In the citytime directory, launch the following commands:

...

Code Block
langxml
titleHTTP xbean.xml
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
       xmlns:citytime="http://servicemix.apache.org/samples/citytime"
       xmlns:localtime="http://ripedev.com/xsd/ZipCodeResults.xsd"
       xmlns:uszip="http://www.webserviceX.NET">

  <http:endpoint service="citytime:CityTime"
                 endpoint="Soap"
                 role="consumer" 
                 locationURI="http://0.0.0.0:8192/citytime/"
                 soap="true" />             
  
  <http:endpoint service="localtime:LocalTime"
                 endpoint="LocalTimeSoap"
                 role="provider"
                 locationURI="http://www.ripedev.com/webservices/LocalTime.asmx"
                 soap="true" 
                 soapAction="http://ripedev.com/xsd/ZipCodeResults.xsd/LocalTimeByZipCode"
                 soapVersion="1.1"  />
  
  <http:endpoint service="uszip:USZip"
                 endpoint="USZipSoap"
                 role="provider"
                 locationURI="http://www.webservicex.com/uszip.asmx"
                 soap="true" 
                 soapAction="http://www.webserviceX.NET/GetInfoByCity"
                 soapVersion="1.1" />
</beans>

Hey !