Found out that servicemix 3.3.2 now supports camel 2.2 . so I changed the
namespace (see the post above) and also I had to change certain methods

Also POM changes

<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
 <version>2.2.0</version>
 <!-- <version>2.4.0 and 1.6.3 is the latest</version> -->
</dependency>



Here is the code snippet changes. Now I am able to deploy properly. But the
camel aggregator is not working as expected. The xpath expression seems to
be causing the problem, I guess there is change here  from camel 1.x

public class MyRouteBuilder extends RouteBuilder {
                
    public void configure() {

        // TODO create Camel routes here. For example:-
       
        System.out.println("In MyRouteBuilder------------------");
        Namespaces ns = new Namespaces("p",
"http://nsn.com/obs/mw/medfra/snmpbc";);
        
        from("jbi:service:http://servicemix.apache.org/test/camel-receiver";)
        .aggregate(new MyAggregationStrategy()) //camel 2.x signature
        //.aggregator(new MyAggregationStrategy()) //camel 1.6 signature
        .xpath("string(/p:snmp-getResponse/p:NE/@ipaddr)",String.class, ns)
        //.completedPredicate(header("completed").isEqualTo("true")) //camel
1.6 signature
        .completionPredicate(header("completed").isEqualTo("true")) //camel 2.x
signature

.to("jbi:endpoint:http://servicemix.apache.org/test/file_sender_getbulk/endpoint";);
 
/
        .to("log:tutorial");  
    

-- 
View this message in context: 
http://servicemix.396122.n5.nabble.com/servicemix-3-3-1-and-camel-core-2-3-0-tp1624310p2840078.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to