pp108 : multipleDownload

multipleDownload


This Web service operation is used to download multiple files.

SOAP Request

<multipleDownload xmlns="http://schemas.cordys.com/1.0/ftp">
    <server>ftp.microsoft.com</server>
    <user>anonymous</user>
    <password>[email protected]</password>
    <portno>21</portno>
    <synchronous>true</synchronous>
    <notification-subject>FTP</notification-subject>
    <files>
        <path type="ascii">
            <source>\developr\readme.txt</source>
            <target>C:\tempdocs\readme.txt</target>
        </path>
        <path type="bin">
            <source>\Products\Windows\Windows95\CDRomExtras\FunStuff\clouds.exe</source>
            <target>C:\tempdocs\clouds.exe</target>
        </path>
    </files>
</multipleDownload>

Request Parameters

Parameter

Description

server

Name of the FTP server from which the files must be downloaded.

user

Name of the FTP user.

password

Password for the FTP server.

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.

files

The files to be downloaded.

path

The path of a file or directory on the FTP server.

type

The mode of transfer (ASCII or binary).

source

The source path of a file or directory.

target

The target path to which the source file or directory must be transferred.

synchronous

Specifies if the response must be intimated to the client. This can hold the following values:

  • true - The process will continue without any interruption and the FTP client would wait for the response.
  • false - The event handler will handle the response.


SOAP Response

<multipleDownloadResponse 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>
    <files xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
        <path type="ascii" xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
            <source>\developr\readme.txt</source>
            <target>C:\tempdocs\readme.txt</target>
            <statuscode xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">226</statuscode>
            <status xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">Transfer complete. </status>
        </path>
        <path type="bin" xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
            <source>\Products\Windows\Windows95\CDRomExtras\FunStuff\clouds.exe</source>
            <target>C:\tempdocs\clouds.exe</target>
            <statuscode xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">226</statuscode>
            <status xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">Transfer complete. </status>
        </path>
    </files>
</multipleDownloadResponse>


Note:
The response message contains the files downloaded and the download status. If the path specified in the request is a file path, the response contains the source, target, and status tags for that path. If the path specified in the request is a directory path, the response contains path tags with details of the source, target, and status of download of all the files in that directory.

A similar message is sent to the Event Log Viewer on completion of the download, with all the status messages.