pp108 : multipleupload

multipleupload

This Web service operation is used to upload multiple files.

SOAP Request

<multipleUpload xmlns="http://schemas.cordys.com/1.0/ftp">
    <server>ftpserver</server>
    <user>anonymous</user>
    <password>[email protected]</password>
    <portno>21</portno>
    <synchronous>true</synchronous>
    <notification-subject>FTP</notification-subject>
    <files>
        <path type="ascii">
            <source>C:\remove.log</source>
            <target>\remove.log</target>
        </path>
        <path type="ascii">
            <source>C:\installation.txt</source>
            <target>\installation.txt</target>
        </path>
    </files>
</multipleUpload>

Request Parameters

Tags

Description

server

Name of the FTP server to which the files are to be uploaded.

user

Name of the FTP user.

password

Password for 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.

files

The files to be uploaded.

path

The path of a file or directory on the FTP server. The type attribute here specifies the type of files to upload (ascii or binary).

  • If you want to specify the binary file type in the request, set the value as bin.
  • If you want to specify the ASCII file type in the request, set the value as ascii.

type

The mode of transfer (ASCII or binary).

source

The source path of file or a directory.

target

The target path to which the <source> file or directory is to 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

<multipleUploadResponse 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/">ftpserver</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>C:\remove.log</source>
            <target>\remove.log</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="ascii" xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
            <source>C:\installation.txt</source>
            <target>\installation.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>
    </files>
</multipleUploadResponse>

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

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