Skip to main content
Foums
Participant
Apr 27, 2015 1:29 PM UTC
Question

ftp action:getFile - Attribute validation error

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,port,proxybypass,proxyserver,result,retrycount,secure,stoponerror,timeout,transfermode'. <li>Required attributes: 'action,connection,localfile,remotefile'. Optional attributes: 'agentname,asciiextensionlist,attributes,buffersize,failifexists,fingerprint,passive,password,port,proxybypass,proxyserver,result,retrycount,secure,server,stoponerror,timeout,transfermode,username'.


I turn around to this problem since this morning without finding any valid track. Anyone have an idea?

Thanks you

This topic is closed to new replies. Start a new post to keep the conversation going.

8 replies

Participant
Aug 6, 2015 4:31 PM UTC

Having the same exact issue. I submitted a bug to Adobe : Bug#4032599 - Cannot putFile or getFile when using key instead of password within FTP service

Translate
BKBK
Community Expert
Community Expert
May 2, 2015 9:52 AM UTC

You've set the username. Set the password as well.

Translate
Foums
FoumsAuthor
Participant
May 2, 2015 11:39 PM UTC

In this SFTP there is no password. just a user and a private key. And in this configuration, if we refer to the doc, my params are good. I can connect to the sftp and I can check if the file exists. So the issue cannot be a password problem.

Translate
BKBK
Community Expert
Community Expert
May 3, 2015 6:54 AM UTC

I understand. OK, use password="", and let's see what happens.

Translate