On further analysis - it appears the sFTP server is expecting ONLY the
following sequence of operations to GET a file



(1) Change to DTCC-assigned directory           cd //artdialu.d3346
(2) List contents of directory                          ls //artdialu.d3346 
(3) Set transfer mode & file characteristics            ls
/+recfm=fb,mode=text,lrecl=300
(4) GET input SYSID (file) to directory         get
//artdialu.d3346.p0298.p0211.d120311.c01 c:/myfile

i guess steps 2 and 3 are optional - but I need to traverse to a specific
directory and only then access a file from it.

is this something achievable?

I have tried the below route (I can confirm that directory DTS4.UP.G2TLR is
present with some files in it)

                <route>
                        <from
uri="sftp://F7DGTLRW@207.45.41.162:22//DTS4.UP.G2TLR?password=lomb456&amp;noop=true&amp;binary=true&amp;delay=60000&amp;stepwise=false"/>
                        <to uri="file:/opt/share/SFTP_OUT"/>
                </route>


I can see that the route tries to extract the file but see the subsequent
exception (this repeats for all the available files in that directory)

[2013-08-12 15:52:41,393 Camel (camel) thread #2 -
sftp://F7DGTLRW@207.45.41.162:22///DTS4.UP.G2TLR] SftpConsumer                  
ERROR Caused by:
[org.apache.camel.component.file.GenericFileOperationFailedException -
Cannot retrieve file: /DTS4.UP.G2TLR/BOOK1.CSV.D0713.T2213966]
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
retrieve file: /DTS4.UP.G2TLR/BOOK1.CSV.D0713.T2213966
        at
org.apache.camel.component.file.remote.SftpOperations.retrieveFileToStreamInBody(SftpOperations.java:516)[camel-ftp-2.9.0.jar:2.9.0]
 



--
View this message in context: 
http://camel.465427.n5.nabble.com/SFTP-Support-to-execute-GET-PUT-commands-tp5736198p5737163.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to