I modified the codes(see below) as your suggestion. It throws different
exception as "org.apache.camel.component.bean.MethodNotFoundException:
Method with name: isWidget not found on bean: widget".
I don't define any bean named "widget". This example is run under osgi and
camel 2.6.0.
<route>
<from uri="direct:split2"/>
<bean ref="baselineMappingService" method="genreateOrderItems"/>
<split>
<simple>body</simple>
<choice>
<when>
<method ref="orderItemHelper" method="isWidget"/>
<log message="body isWidget " loggingLevel="INFO"/>
</when>
<otherwise>
<bean ref="myTransform" method="transform"/>
</otherwise>
</choice>
</split>
</route>
<bean id="orderItemHelper" class="demo.esb.OrderItemHelper"/>
public class OrderItemHelper{
public OrderItemHelper(){}
public boolean isWidget(@Body OrderItem orderItem) {
System.out.println("isWidget ? " + orderItem.type.equals("widget"));
return orderItem.type.equals("widget");
}
}
--
View this message in context:
http://camel.465427.n5.nabble.com/Composed-Message-Processor-example-Spring-XML-doesn-t-work-tp5551373p5557927.html
Sent from the Camel - Users mailing list archive at Nabble.com.