kapoor,

CamelContext.loadRoutesDefinition(…) receives a standard
java.io.InputStream - you don't have to obtain it from a classpath
resource.  it sounds like you want a java.io.FileInputStream.  try this:

InputStream is = new java.io.FileInputStream("E://cameltest.xml");
RoutesDefinition routes = context.loadRoutesDefinition(is);
context.addRouteDefinitions(routes.getRoutes());

note that the String argument to the FileInputStream constructor is
"system-dependent" - so if this is Windows, you might actually want:
new FileInputStream("E:\\cameltest.xml")

http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/CamelContext.html#loadRoutesDefinition%28java.io.InputStream%29
http://docs.oracle.com/javase/6/docs/api/java/io/FileInputStream.html

~ RNPG

Reply via email to