Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: INS further explanation/help

...

Code Block
mvn archetype:create \
        -DarchetypeGroupId=org.apache.servicemix.tooling \
        -DarchetypeArtifactId=servicemix-http-consumer-service-unit \
        -DarchetypeVersion=3.0-incubating-SNAPSHOT \
        -DgroupId=org.apache.servicemix.samples.bridge \
        -DartifactId=bridge-http-su

mvn archetype:create \
        -DarchetypeGroupId=org.apache.servicemix.tooling \
        -DarchetypeArtifactId=servicemix-jms-provider-service-unit \
        -DarchetypeVersion=3.0-incubating-SNAPSHOT \
        -DgroupId=org.apache.servicemix.samples.bridge \
        -DartifactId=bridge-jms-su

mvn archetype:create \
        -DarchetypeGroupId=org.apache.servicemix.tooling \
        -DarchetypeArtifactId=servicemix-eip-service-unit \
        -DarchetypeVersion=3.0-incubating-SNAPSHOT \
        -DgroupId=org.apache.servicemix.samples.bridge \
        -DartifactId=bridge-eip-su

mvn archetype:create \
        -DarchetypeGroupId=org.apache.servicemix.tooling \
        -DarchetypeArtifactId=servicemix-lwcontainer-service-unit \
        -DarchetypeVersion=3.0-incubating-SNAPSHOT \
        -DgroupId=org.apache.servicemix.samples.bridge \
        -DartifactId=bridge-xslt-su

mvn archetype:create \
        -DarchetypeGroupId=org.apache.servicemix.tooling \
        -DarchetypeArtifactId=servicemix-service-assembly \
        -DarchetypeVersion=3.0-incubating-SNAPSHOT \
        -DgroupId=org.apache.servicemix.samples.bridge \
        -DartifactId=bridge-sa

The version information may have to be changed from 3.0-incubating-SNAPSHOT to your used version (e.g. 3.0-incubating).

Main pom

Now that we have created the SUs and SA structure, let's write the main pom.xml (in the bridge directory):

Code Block
langxml
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.servicemix.samples</groupId>
  <artifactId>bridge</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>pom</packaging>
  <modules>
    <module>bridge-http-su</module>
    <module>bridge-eip-su</module>
    <module>bridge-xslt-su</module>
    <module>bridge-jms-su</module>
    <module>bridge-sa</module>
  </modules>
</project>

The content of <version> may have to be changed from 1.0-SNAPSHOT to your used version (e.g. 3.0-incubating).

Configure the Service Assembly

...

Of course, this example is not very useful as is, especially with an identity XSLT sheet. However, adding an xpath router as the target of the pipeline, could be usefull useful to normalize different requests to the same format, because the XSD changed between versions of the service, or because different clients use different XSDs which can be services by the same service.