On Mon, Nov 1, 2010 at 2:01 PM, servicemix-user <[email protected]> wrote: > > HI, > I tried to fetch the output using following code what u gave, > > from("http://localhost/testservice/resources/1") > .setHeader(FileComponent.HEADER_FILE_NAME, constant("output.txt")) > .to("file:/target/") > > > > But in Output.txt file have put the same record again and again ( its around > 30,000 line ) >
That is because you are consuming from http endpoint, which means it will invoke a GET on the http endpoint and send out a message with that response. If you want to expose a http server that other clients can invoke, use the jetty endpoint instead. http://camel.apache.org/jetty > > <?xml version="1.0" encoding="UTF-8" > standalone="yes"?><abc><xmlcontent><address>Chennai</address><name>Ramya</name><mobileno>987878</mobileno><phoneno>43423</phoneno><vehicle_colour>red</vehicle_colour><vehicle_no>TN1456</vehicle_no><vehicle_type>maruthi</vehicle_type></xmlcontent></abc><?xml > version="1.0" encoding="UTF-8" > standalone="yes"?><abc><xmlcontent><address>Chennai</address><name>Ramya</name><mobileno>987878</mobileno><phoneno>43423</phoneno><vehicle_colour>red</vehicle_colour><vehicle_no>TN1456</vehicle_no><vehicle_type>maruthi</vehicle_type></xmlcontent></abc><?xml > version="1.0" encoding="UTF-8" > standalone="yes"?><abc><xmlcontent><address>Chennai</address><name>Ramya</name><mobileno>987878</mobileno><phoneno>43423</phoneno><vehicle_colour>red</vehicle_colour><vehicle_no>TN1456</vehicle_no><vehicle_type>maruthi</vehicle_type></xmlcontent></abc><?xml > version="1.0" encoding="UTF-8" > standalone="yes"?><abc><xmlcontent><address>Chennai</address><name>Ramya</name><mobileno>987878</mobileno><phoneno>43423</phoneno><vehicle_colour>red</vehicle_colour><vehicle_no>TN1456</vehicle_no><vehicle_type>maruthi</vehicle_type></xmlcontent></abc> > > > > Pls give the sample code and give ur valuable feedback for this.. > > > > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/Camel-Route-How-to-avoid-Multiple-files-in-target-folder-tp3244637p3245001.html > Sent from the ServiceMix - User mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
