Hi,
First, the code :
LOCAL.fileName = lsDateFormat(now(), 'yyyymmdd') & '.csv';
LOCAL.filePath = "example_file";
LOCAL.ftpService = new FTP();
LOCAL.ftpService.setServer('sftpr.emv2.com');
LOCAL.ftpService.setPort('22');
LOCAL.ftpService.setUserName('example_user');
LOCAL.ftpService.setSecure('true');
LOCAL.ftpService.setKey(example_key.ppk");
LOCAL.ftpService.setStopOnError(true);
LOCAL.ftpService.setRemoteFile('example_remote_file');
LOCAL.ret = LOCAL.ftpService.open();
writeDump(LOCAL.ret);
LOCAL.doInsert = 0;
if(LOCAL.ret.getPrefix().succeeded){
LOCAL.testExists = LOCAL.ftpService.existsFile();
writeDump(LOCAL.testExists);
if(LOCAL.testExists.getPrefix().returnValue){
LOCAL.doInsert = 1;
LOCAL.ftpService.setLocalFile(LOCAL.filePath);
LOCAL.ftpService.setFailIfExists(false);
LOCAL.resp = LOCAL.ftpService.getFile();
writeDump(LOCAL.resp); abort;
}
}
LOCAL.ftpService.close();
Open Connection : OK
Test file exists : OK
getFile : KO
I fire this message every time :
Attribute validation error for tag CFFTP.It has an invalid attribute combination: action,failifexists,key,localfile,port,remotefile,server,stoponerror,username. Possible combinations are:<li>Required attributes: 'action,localfile,password,remotefile,server,username'. Optional attributes: 'agentname,asciiextensionlist,attributes,buffersize,failifexists,fingerprint,passive,port ,proxybypass,proxyserver,result,retrycount,secure,stoponerror,timeout,transfermode'. <li>Required attributes: 'action,localfile,key,remotefile,server,username'. Optional attributes: 'agentname,asciiextensionlist,attributes,buffersize,failifexists,fingerprint,passphrase,p ort,proxybypass,proxyserver,result,retrycount,secure,stoponerror,timeout,transfermode'. <li>Required attributes: 'action,connection,localfile,remotefile'. Optional attributes: 'agentname,asciiextensionlist,attributes,buffersize,failifexists,fingerprint,passive,pass word,port,proxybypass,proxyserver,result,retrycount,secure,server,stoponerror,timeout,tran sfermode,username'.
I turn around to this problem since this morning without finding any valid track. Anyone have an idea?
Thanks you