My code are as follows.
public void camelRedirect(String Rqvalue,String oprcode) {
final String urlOprn=oprcode;//
final CamelContext context = new DefaultCamelContext();
try {
context.start();
RouteBuilder builder=new RouteBuilder() {
@Override
public void configure() throws Exception {
Predicate isWidgets = simple("${oprcode} ==
'ATM'");
from(urlOprn)
.choice()
.when(isWidgets)
.process(new Processor() {
String recv="";
@Override
public void
process(Exchange data) throws Exception {
System.out.println("----");
}
})
.otherwise()
.process(new Processor() {
@Override
public void
process(Exchange data) throws Exception {}
});
}
};
context.addRoutes(builder);
}
catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
----------------------------------------------------------------------------------------------------
String value of oprcode="ATM".I am getting the following exceptions:-
Failed to create route route1: Route[[From[ATM]] ->
[Choice[[When[simple{${oprcode} == 'ATM... because of No endpoint could be
found for: ATM, please check your classpath contains the needed Camel
component jar.
I want to channel the requests through camel.
--
View this message in context:
http://camel.465427.n5.nabble.com/Camel-routing-using-Predicates-tp5749029.html
Sent from the Camel - Users mailing list archive at Nabble.com.
