listDirectories |
This Web service operation is used to list files or folders from different directories on the FTP Server.
SOAP Request
<listDirectories xmlns="http://schemas.cordys.com/1.0/ftp"> <server>ftp.microsoft.com</server> <user>anonymous</user> <password>[email protected]</password> <portno>21</portno> <notification-subject>FTP</notification-subject> <directory> <path>\</path> </directory> </listDirectories>
Request Parameters
Tags |
Description |
---|---|
server |
Name of the FTP server from which the list of files must be retrieved. |
user |
Name of the FTP user. |
password |
Password of the FTP user. |
portno |
The port number used by the FTP server. This tag is optional. |
notification-subject |
Notification subject on which the user has to subscribe to the Event service, to obtain the status of the request. |
directory |
Contains the paths of the directories from where the files are to be listed. |
path |
The path of a directory on the FTP server. |
SOAP Response
<listDirectoriesResponse xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> <server xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">ftp.microsoft.com</server> <user xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">anonymous</user> <portno xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">21</portno> <notification-subject xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">FTP</notification-subject> <directory xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> <path>\ <listOfFiles xmlns="http://schemas.cordys.com/1.0/ftp"> <file>bussys</file> <file>deskapps</file> <file>developr</file> <file>KBHelp</file> <file>MISC</file> <file>MISC1</file> <file>peropsys</file> <file>Products</file> <file>PSS</file> <file>ResKit</file> <file>Services</file> <file>Softlib</file> <statuscode>226</statuscode> <status>Transfer complete. </status> </listOfFiles> </path> </directory> </listDirectoriesResponse>
Note: For each path specified in the SOAP request, a listOfFiles tag is present in the SOAP response, which contains the list of files in the path (each file name is contained in the file tag). The status of the listDirectories command is given in the status tag.