You can easily output the routes as XML as we do in the Karaf commands. http://camel.apache.org/karaf.html
Though mind this questions belongs to the user mailing list / user forum. So please move there. On Tue, Oct 8, 2013 at 10:20 AM, matriv <mat...@gmail.com> wrote: > Hello, > > It's not so easy to get the "to" as it is to get the "from" for a camel > route. I have a similar webapp that you use to manage some specific camel > routes and here is an example of a code that reads the existing routes from > camel context and show them in a nice data grid interface: > > // Fetch destination endpoint > String[] toSplitted; > if (route.getRouteContext().getRoute().getOutputs().get(0) instanceof > FilterDefinition) { > transformer = > route.getRouteContext().getRoute().getOutputs().get(0).getOutputs().get(0).getLabel(); > if > (route.getRouteContext().getRoute().getOutputs().get(0).getOutputs().get(1).getOutputs().get(0).getOutputs().get(0).getLabel().startsWith("log")) > { > toSplitted = null; > } else { > toSplitted = > route.getRouteContext().getRoute().getOutputs().get(0).getOutputs().get(1).getOutputs().get(0).getOutputs().get(0).getLabel().split(":"); > } > } else { > transformer = > route.getRouteContext().getRoute().getOutputs().get(1).getLabel(); > if > (route.getRouteContext().getRoute().getOutputs().get(1).getOutputs().get(0).getOutputs().get(0).getLabel().startsWith("log")) > { > toSplitted = null; > } else { > toSplitted = > route.getRouteContext().getRoute().getOutputs().get(1).getOutputs().get(0).getOutputs().get(0).getLabel().split(":"); > } > } > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Getting-route-info-problems-tp5741035p5741099.html > Sent from the Camel Development mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen