Also, theres some test code here http://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterMethodCallTest.java http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringSplitterMethodCallTest.java http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/splitterMethodCallTest.xml
On Fri, Jan 30, 2009 at 12:33 PM, James Strachan <[email protected]>wrote: > 2009/1/30 mta38 <[email protected]>: > > > > Hi all, > > I want to test splitter processor and i have implemented my own Splitter > > expression in java code: > > > > Public class MySplitter extends Expression{ > > > > public Object evaluate(Exchange arg0) { > > //my code > > } > > } > > > > <bean id="mySplitter" > > > class="com.francetelecom.apt.orange.camel.expressions.SplitterExpression"> > > <property name="size" value="3"/> > > </bean> > > > > > > <route> > > <from uri="wsadapter" /> > > <splitter> > > <expression> > > <bean ref="mySplitter"/> > > </expression> > > <to uri="seda:b" /> > > </splitter> > > </route> > > > > My problem now is to create a route that use a splitter, in an xml config > > file. > > I think this should work.... > > > <route> > <from uri="wsadapter" /> > <splitter> > <methodCall bean="mySplitter" method="foo"/> > <to uri="seda:b" /> > </splitter> > </route> > > In camel 2.0 this would look like this > > <route> > <from uri="wsadapter" /> > <split> > <method bean="mySplitter" method="foo"/> > <to uri="seda:b" /> > </split> > </route> > > -- > James > ------- > http://macstrac.blogspot.com/ > > Open Source Integration > http://fusesource.com/ > -- Cheers, Jon http://janstey.blogspot.com/
