ftpwso2wso2-enterprise-integratorballerinaintegrator

Issues in JSON to XML and Upload to FTP in Ballerina Integrator


I am trying samples given in Ballerina integrator tutorials, while running json to xml and then upload into ftp sample facing the issue:

error org.wso2.ei.b7a.ftp.core.util.BallerinaFTPException.

I knew the reason for this issue but don't know where i have to put that command. Please help me to sort out the issue.

Reason for the issue is: ftp credentials are mentioned in conf file, I put conf file under the root directory but it doesn't refer. Need to give

b7a.config.file=src/upload_to_ftp/resources/ballerina.conf

But I don't know where I have to give this?

Thanks in Advance.


Solution

  • I have passed credentials directly to ftpConfig then its working fine. Conversion happened and converted file has been uploaded into ftp location successfully

    ftp:ClientEndpointConfig ftpConfig = { protocol: ftp:SFTP, host: "corpsftp.dfaDFDA.com", port: 22, secureSocket: { basicAuth: { username: "DDFDS", password: "FADFHYFGJ" } } };

    Output { "Message": "Employee records uploaded successfully." }

    enter image description here