Any exceptions reported? Here is a very simple Camel route just in case.
<?xml version="1.0" encoding="UTF-8" standalone="no"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <camelContext xmlns="http://camel.apache.org/schema/spring" trace="false"> <route id="myRoute"> <from uri="file:/Users/Marcelo/src/data?noop=true"/> <choice id="choice1"> <when id="whenLondon"> <language language="xpath">/person/city='London'</language> <to uri="file:/Users/Marcelo/target/messages/uk"/> </when> <when id="whenTampa"> <language language="xpath">/person/city='Tampa'</language> <to uri="file:/Users/Marcelo/target/messages/us"/> </when> <otherwise id="Otherwise"> <to uri="file:/Users/Marcelo/target/messages/others?fileName=otherwise.xml"/> </otherwise> </choice> </route> </camelContext> </beans> You specify the directory name in the URI. Something like this: file:directoryName[?options] file://directoryName[?options Hope this helps, -Marcelo On Jul 5, 2011, at 11:18 PM, Gnanaguru S wrote: > Hi > > Thanks. > > I tried this: <to uri="file:target?fileName=output.xml"/> > > Its not showing any expection also its not creating the file, > by the way can we specify the directory where it should get generated ? > > Like , <to uri="file:target?fileName=/outputdirectory/output.xml"/> > > ----- > Cheers > Guru > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/File-reading-and-writing-issue-tp4553223p4555851.html > Sent from the ServiceMix - User mailing list archive at Nabble.com. -- Marcelo Jabali Sr. Solutions Consultant FuseSource M: 978 729 6239 O: 619 464 2595 Web: fusesource.com Skype/Twitter: mjabali Blog: http://marcelojabali.blogspot.com
