The Script Client Interface Requirements
Installation
Windows
UNIX
Configuration
Commandline arguments
XML
Example XML file
Further information
The Upload process
The Download process
Logging
Messages
Scripting up a batch of transfers can be done using operating system scripts containing multiple calls to startDMZ. This has the benefit of being very simple but has the drawback of requiring the startup of a JVM (Java Virtual Machine) and a new HTTPs connection for each call.
Installation
Windows
UNIX
Configuration
Commandline arguments
XML
Example XML file
Further information
The Upload process
The Download process
Logging
Messages
Starting a JVM is slow and the first HTTPs connection made within a JBM is slow, with subsequent ones running a lot faster. Since only one HTTPs connection is made when calling startDMZ, there are no subsequent connections to speedup.
To solve this, and provide a descriptive way of scripting DMZTransfer calls, uploading and downloading files can be done by specifying the necessary parameters in an XML file.
So instead of specifying the following commands to upload and download various files from various companies:
- startDMZ -cupload -jDailyJobToA -o"Org A" -dc:\files -l"a.txt b.txt"
- startDMZ -cupload -jImportantJobToA -o"Org A" -dc:\files -l"a.txt b.txt"
- startDMZ -cupload -jUploadJobToC -o"Org C" -dc:\files -l"a.txt b.txt"
- startDMZ -cdownload -jDownloadJobFromC -o"Org C" -dc:\files\downloads
- startDMZ -cxml -xc:\xml\allTransfers.xml
xmlns:dmztransfer="https://dmztransfer.dmzglobal.com"
xsi:schemaLocation="https://dmztransfer.dmzglobal.com c:/DMZTransferV2/conf/dmztransferSchedule.xsd"
Some of the advantages of this XML file are:
- It provides a structure to organise a list of transfers that is more descriptive than the commandline.
- It provides performance improvements by only requiring one startup and shutdown.
- It contains an optional defaults section that allows defaults to be set for many parameters making the transfers simpler.
XML documentation
This document describes the process for specifying a transfer using XML, specifically XML schemas.- For background information on XML schemas.
- Once you are familiar with XML Schemas, you may want to peruse the .XSD file that describes the format that the XML will take. This can be found in the application's conf directory.
- The easiest method to create a Transfer XML file is to copy an existing Transfer XML file. You will then not need to modify the header.
Overview of the elements in the XML file and what they mean.
- schedule: Overall element that contains the header information.
- default: Describes upload and download default settings, to be used by the transfer section when the parameter is not specified.
- uploadDefault: Default upload parameters.
- downloadDefault: Default download parameters.
- log: Default logging directory.
- verbose: Unused.
- retry: Groups the following two retry settings:
- interval: Retry interval in minutes.
- maxAttempts: Maximum number of retry attempts.
- keepDirectories: True/false indicating whether the directory path that was included with the filename in the upload should be used in the download. E.g If uploading with directory = temp and file=a.dat and then downloading with keepdirectories = true would have the file saved in the temp directory off the current directory.
- time: Time to use for the upload.
- pending: (Download) only jobs that have not been successfully downloaded are downloaded.
- transfers: Groups the transfers.
- uploads: Groups the uploads.
- otherOrganisation: Groups the uploads to a particular organisation.
- otherOrgName: Attribute that is the name of the uploading organisation.
- job: Groups the parameters for this upload.
- jobId: Id attribute describing the name of the job.
- log: Logging directory.
- retry: Groups the retry parameters.
- interval: Retry interval as a number (minutes).
- maxAttempts: Maximum number of retry attempts before giving up.
- data: Groups the details about the files to be uploaded.
- files: Groups the files to be uploaded.
- directory: Directory to find the files to upload.
- file: File that lists the names of other files to be uploaded.
- filedir Location to store the files.
- time: Date time to upload the files. Values are:
- date - dd/mm/yyyy HH:MM:SS
- now - is taken as the current day and time
- today - is taken as the start of the current day
- keepDirectories: Indicates whether the directories that are specified are stored to be used when downloading.
- downloads: Groups the downloads.