Versions Compared

Key

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

...

Of course, it won't work if you deploy it and we now need to fill the holes.

HTTP SU

We need to define a simple HTTP consumer endpoint in the http SU. As we do not use the request / response pattern, we will use an InOnly mep.

Code Block
langxml

<?xml version="1.0"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
       xmlns:b="http://servicemix.apache.org/samples/bridge">

  <http:endpoint service="b:http"
                 endpoint="endpoint"
                 targetService="b:pipeline"
                 role="consumer" 
                 locationURI="http://localhost:8192/bridge/"
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-only" />

</beans>

EIP SU

Code Block
langxml

<?xml version="1.0"?>
<beans xmlns:eip="http://servicemix.apache.org/eip/1.0"
       xmlns:b="http://servicemix.apache.org/samples/bridge">

  <eip:pipeline service="b:pipeline" endpoint="endpoint">
    <eip:transformer>
      <eip:exchange-target service="b:xslt" />
    </eip:transformer>
    <eip:target>
      <eip:exchange-target service="b:jms" />
    </eip:target>
  </eip:pipeline>

</beans>

XSLT SU

Code Block
langxml

<?xml version="1.0"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
       xmlns:b="http://servicemix.apache.org/samples/bridge">

  <classpath>
    <location>.</location>
    <location>lib/servicemix-components-3.0-incubating-SNAPSHOT.jar</location>
  </classpath>

  <sm:serviceunit id="jbi">
    <sm:activationSpecs>
      <sm:activationSpec service="b:xslt" endpoint="endpoint">
        <sm:component>
          <bean class="org.apache.servicemix.components.xslt.XsltComponent">
            <property name="xsltResource" value="classpath:bridge.xslt" />
          </bean>
        </sm:component>
      </sm:activationSpec>
    </sm:activationSpecs>
  </sm:serviceunit>

</beans>

JMS SU

Code Block
langxml

<?xml version="1.0"?>
<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
       xmlns:b="http://servicemix.apache.org/samples/bridge">

  <jms:endpoint service="b:jms"
                endpoint="endpoint"
                role="provider" 
                destinationStyle="queue"
                jmsProviderDestinationName="bridge.output"
                connectionFactory="#connectionFactory" />
                
  <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="vm://localhost" />
  </bean>
  				   
</beans>