Hello I am new here, I have a case where I want to listen and pull files from sftp server and split the returned content (| separated values). the content comes clean at first "1|123456S|OMR|vaccTyp|vsolID|A|C|1607|1557" then it changes to "-rw-rw-rw 1 root root 43 Dec 5 10:46 AccountExtract_Date - Copy.txt" after calling <split> to split the lines.
I checked out the sftp server log and found that the caller is changing the path like follows: /////////////////////////////////// is listing /rops (C:\Program Files (x86)\freeFTPd\sftproot\test1\rops\) 12-05-2012 12:10:22 HOST PC246.Progressoft.com SFTP test1 is listing /rops (C:\Program Files (x86)\freeFTPd\sftproot\test1\rops\AccountExtract_Date - Copy.txt) 12-05-2012 12:10:22 HOST PC246.Progressoft.com SFTP test1 is downloading /rops/AccountExtract_Date - Copy.txt (C:\Program Files (x86)\freeFTPd\sftproot\test1\rops\AccountExtract_Date - Copy.txt) 12-05-2012 12:10:22 HOST PC246.Progressoft.com SFTP test1 transfer complete 12-05-2012 12:10:22 HOST PC246.Progressoft.com SFTP test1 is changing dir to / (C:\Program Files (x86)\freeFTPd\sftproot\test1\) 12-05-2012 12:10:22 HOST PC246.Progressoft.com SFTP test1 is listing / (C:\Program Files (x86)\freeFTPd\sftproot\test1\) /////////////////////////////////// here is the spring route <camelContext xmlns="http://camel.apache.org/schema/spring"> <onException> <exception>java.lang.Exception</exception> <handled> <constant>true</constant> </handled> <log message="CustAccountsFinishedWithErrors: ${body}"/> <to uri="file:c:/sftp/error/" /> </onException> <route> <from uri="sftp://127.0.0.1//rops?username=test1&password=test1"/> <camel:log message="***********************${body}"/> <camel:choice> <when> <simple>${file:name} contains 'AccountExtract'</simple> <camel:to uri="direct:CustAccounts" /> </when> </camel:choice> </route> <route> <from uri="direct:CustAccounts" /> <split> <tokenize token="\n"/> <camel:setHeader headerName="csvLine"><simple>${body}</simple></camel:setHeader> <camel:convertBodyTo type="com.progressoft.jfw.integration.camel.message.ExecuteSaveActionMessage"/> <camel:setHeader headerName="actionId"><camel:constant>102</camel:constant></camel:setHeader> <camel:to uri="jfw:executeSaveAction?viewName=RopsCorporationAccounts&username=service_user&tenantId=ROPS"/> <camel:choice> <camel:when> <camel:simple>${header.successCount} == 0</camel:simple> <camel:setBody><camel:simple>${in.headers.csvLine}</camel:simple></camel:setBody> <camel:convertBodyTo type="com.progressoft.jfw.model.rops.bussinessobject.administration.RopsCorporationAccount"/> <camel:to uri="jfw:createEntity?viewName=RopsCorporationAccounts&username=service_user&tenantId=ROPS"></camel:to> </camel:when> </camel:choice> </split> <to uri="direct:CustAccountsFinish" /> </route> <route> <from uri="direct:CustAccountsFinish" /> <camel:log message="CustAccountsFinish"/> </route> </camelContext> /////////////////////////////////// thanks in advance, ur prompt reply is appreciated -- View this message in context: http://camel.465427.n5.nabble.com/sftp-component-with-split-problem-tp5723660.html Sent from the Camel - Users mailing list archive at Nabble.com.