I use SaajBinding component.

Configuration file : 

<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2006 rel. 3 U (http://www.altova.com) by Fradin
(Apis) -->
<beans xmlns:sm="http://servicemix.apache.org/config/1.0";
xmlns:foo="http://servicemix.org/demo/";
xmlns:eip="http://servicemix.apache.org/eip/1.0";>
        <!-- the JBI container -->
        <sm:container id="jbi" useMBeanServer="true" createMBeanServer="true"
dumpStats="true" statsInterval="10">
                <sm:activationSpecs>
                        <!-- Create a http server binding on port 8912  and 
have it forward to
the foo:stockQuote -->
                        <sm:activationSpec componentName="httpReceiver" 
service="foo:httpBinding"
endpoint="httpReceiver" destinationService="test:wireTap">
                                <sm:component>
                                        <bean 
class="org.apache.servicemix.components.http.HttpConnector">
                                                <property name="host" 
value="localhost"/>
                                                <property name="port" 
value="8912"/>
                                        </bean>
                                </sm:component>
                        </sm:activationSpec>
                        <sm:activationSpec componentName="trace" 
service="foo:trace">
                                <sm:component>
                                        <bean 
xmlns="http://xbean.org/schemas/spring/1.0";
class="org.apache.servicemix.components.util.TraceComponent"/>
                                </sm:component>
                        </sm:activationSpec>
                        <!-- This just invokes another service -->
                        <sm:activationSpec componentName="stockQuote" 
service="foo:stockQuote"
endpoint="stockQuote" destinationService="">
                                <sm:component>
                                        <bean 
class="org.apache.servicemix.components.saaj.SaajBinding">
                                                <property name="soapEndpoint">
                                                        <bean 
class="javax.xml.messaging.URLEndpoint">
                                                                <constructor-arg
value="http://localhost/Application%20exemple/services/WorkflowStatistics"/>
                                                        </bean>
                                                </property>
                                        </bean>
                                </sm:component>
                        </sm:activationSpec>
                        <sm:activationSpec componentName="wireTrap">
                                <sm:component>
                                        <eip:component>
                                                <eip:endpoints>
                                                        <eip:wire-tap 
service="test:wireTap" endpoint="endpoint">
                                                                <eip:target>
                                                                        
<eip:exchange-target service="test:xpathSplitter"/>
                                                                </eip:target>
                                                                <eip:inListener>
                                                                        
<eip:exchange-target service="foo:trace"/>
                                                                
</eip:inListener>
                                                        </eip:wire-tap>
                                                </eip:endpoints>
                                        </eip:component>
                                </sm:component>
                        </sm:activationSpec>
                        <sm:activationSpec componentName="XpathSplitter">
                                <sm:component>
                                        <eip:component>
                                                <eip:endpoints>
                                                        <eip:xpath-splitter 
service="test:xpathSplitter" endpoint="endpoint"
xpath="/*/*">
                                                                <eip:target>
                                                                        
<eip:exchange-target service="test:pipeline"/>
                                                                </eip:target>
                                                        </eip:xpath-splitter>
                                                </eip:endpoints>
                                        </eip:component>
                                </sm:component>
                        </sm:activationSpec>
                        <sm:activationSpec componentName="Aggregator">
                                <sm:component>
                                        <eip:component>
                                                <eip:endpoints>
                                                        <eip:split-aggregator 
service="test:aggregator" endpoint="endpoint">
                                                                <eip:target>
                                                                        
<eip:exchange-target service="foo:trace"/>
                                                                </eip:target>
                                                        </eip:split-aggregator>
                                                </eip:endpoints>
                                        </eip:component>
                                </sm:component>
                        </sm:activationSpec>
                        <sm:activationSpec componentName="RoutingSlip">
                                <sm:component>
                                        <eip:component>
                                                <eip:endpoints>
                                                        
<eip:static-routing-slip service="test:routingSlip"
endpoint="endpoint">
                                                                <eip:targets>
                                                                        
<eip:exchange-target service="foo:transformer"/>
                                                                        
<eip:exchange-target service="foo:stockQuote"/>
                                                                </eip:targets>
                                                        
</eip:static-routing-slip>
                                                </eip:endpoints>
                                        </eip:component>
                                </sm:component>
                        </sm:activationSpec>
                        <sm:activationSpec componentName="Pipeline">
                                <sm:component>
                                        <eip:component>
                                                <eip:endpoints>
                                                        <eip:pipeline 
service="test:pipeline" endpoint="endpoint">
                                                                
<eip:transformer>
                                                                        
<eip:exchange-target service="foo:stockQuote"/>
                                                                
</eip:transformer>
                                                                <eip:target>
                                                                        <!-- 
replace  by foo:trace to trace messages-->
                                                                        
<eip:exchange-target service="test:aggregator"/>
                                                                </eip:target>
                                                        </eip:pipeline>
                                                </eip:endpoints>
                                        </eip:component>
                                </sm:component>
                        </sm:activationSpec>
                        <sm:activationSpec componentName="transformer" 
service="foo:transformer"
destinationService="test:xpathSplitter">
                                <sm:component>
                                        <bean 
class="org.apache.servicemix.components.xslt.XsltComponent">
                                                <property name="xsltResource" 
value="xmlAgent.xsl"/>
                                                <property name="disableOutput" 
value="false"/>
                                        </bean>
                                </sm:component>
                        </sm:activationSpec>
                        <sm:activationSpec componentName="timer" 
service="my:timer"
destinationService="foo:transformer">
                                <sm:component>
                                        <bean 
class="org.apache.servicemix.components.quartz.QuartzComponent">
                                                <property name="triggers">
                                                        <map>
                                                                <entry>
                                                                        <key>
                                                                                
<bean class="org.quartz.SimpleTrigger">
                                                                                
        <property name="repeatInterval" value="5000"/>
                                                                                
        <property name="repeatCount" value="-1"/>
                                                                                
</bean>
                                                                        </key>
                                                                        <bean 
class="org.quartz.JobDetail">
                                                                                
<property name="name" value="My Example Job"/>
                                                                                
<property name="group" value="ServiceMix"/>
                                                                        </bean>
                                                                </entry>
                                                        </map>
                                                </property>
                                        </bean>
                                </sm:component>
                        </sm:activationSpec>
                </sm:activationSpecs>
        </sm:container>
</beans>

Thanks for your help.
-- 
View this message in context: 
http://www.nabble.com/In-out-exchange---XPath-Splitter-%28eip%29-tf1860742.html#a5098967
Sent from the ServiceMix - User forum at Nabble.com.

Reply via email to