On Tue, Mar 23, 2010 at 8:16 AM, Kameltreiber <[email protected]> wrote: > > Hi, > i just try to write a xml result from a http request to a file. > I'd like to use Java DSL > at the moment it looks like this > > from("http://example.com/") > .setHeader(Exchange.FILE_NAME, constant("report.xml")) > .to("file:target/reports"); > > I alreday checked the result, and there is one, but the report.xml never > gets created. > What am i doing wrong? >
What do you want? is example.com a HTTP service you want to expose yourself? Or do you want to poll data from an external HTTP service every X time? If its the former then you gotta use Jetty in the from to let it be used as the HTTP server. http://camel.apache.org/jetty from("jetty:http://localhost:9080/") If the latter you have to use a scheduler such as Timer or Quartz to trigger the poll. > Regards... > > -- > View this message in context: > http://old.nabble.com/route-from-http-to-file%2C-with-Java-DSL%2C-howto--tp27997011p27997011.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
