Hi Babak explained this on another post today. So I am quoting his reply
Hi Invoking start on the CamelContext is a non-blocking call, check links below to see how to keep your standalone Camel application running: http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html http://stackoverflow.com/questions/1846791/camelcontext-start-doesnt-block Babak On Wed, Aug 14, 2013 at 12:00 PM, yiwang <imawan...@gmail.com> wrote: > hello everyboby,I ask a question. > I write the code: > public class TestHttpCamel { > public static void main(String args[]) throws Exception { > CamelContext context = new DefaultCamelContext(); > context.addRoutes(new RouteBuilder() { > public void configure() { > from("http://host:port/query_data_detail") > .to("file:d:/temp/outbox?fileName=data.txt"); > > } > }); > context.start(); > } > > } > > explain: > from("url") url---request service's url and the server returned in > json form > to("uri") uri--The local folder address > > Why not success from the server to store data in a file ? > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Why-can-not-get-the-data-tp5737243.html > Sent from the Camel - Users 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