Import To List Via FTP
Imports the CSV list data with the auto import XML file to the user’s FTP directory.
Function
importToListViaFTP()
Parameters
- username:
String
- Account login name.
- password:
String
- Account password.
- csvFileName:
String
- filename used for import. Filename used for
.xml
and.go
file.
- filename used for import. Filename used for
- csvFileData:
byte[]
- CSV file content data
- xmlControlFileData:
byte[]
- XML control data.
- see Automated_Upload_Facility
- fieldNames:
String
- custom field names for the list. Maximum 25 fields allowed.
Return
int
:1
: success0
: failed
Exception
- Exception
Documentation
- Imports the CSV list data with the auto import XML file to the user’s FTP directory.
- Ensure the account’s FTP directory has been setup.
Examples
public void importToListViaFtpSample() throws java.lang.Exception {
String username = "XXX";
String password = "XXX";
String csvFileName = "theNameOfCsv.csv";
File csvFile = new File("csvFile.csv");
byte[] csvFileData = Files.readAllBytes(csvFile.toPath());
File xmlControlFile = new File("xmlControlFile.xml");
byte[] xmlControlFileData = Files.readAllBytes(xmlControlFile.toPath());
int result = port.importToListViaFTP(username, password, csvFileName, csvFileData, xmlControlFileData);
}
<?php
?>