Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

The following example describes the configuration of a simple file transfer with basic - i.e. password - authentication is described on this page.

A simple FTP protocol file transfer example is used and the transfer involves copying files in which files are transferred from a remote server to the local file system.

The configuration of this example is described in detail in our YADE - Configuration - XML Editor Usage for compatible .ini and .xml configuration files page.

On this page the more general aspects of the configuration procedure will be described.

Example Configuration File

...

  • -based configuration introduced with Release 1.11 of

...

  • YADE. A similar example using the Settings parameters configuration that

...

  • was implemented for releases before 1.11 can be found our YADE Tutorials along with a configuration download file.

Configuration Tool

We recommend using the XML Editor to generate the XML configuration file. This editor uses the YADE XSD schema as a guide through each stage of the process. The schema is used to control and then validate the elements that can be specified in the configuration.

Using the XML Editor will significantly reduce the possibility of configuration errors.

Alternatively, a text editor can be used to write the configuration file manuallyAn configuration example that copies files from the SOS Demo server to the local file system is described in detail on our JADE - XML Configuration - Sample Files page. The XML configuration file for this example can be downloaded and used to get JADE up and running as quickly as possible.

Configuration Steps

The configuration described in this example is the simplest realistic file transfer scenario held as simple as possible. More complex file transfer scenarios will be described later.

The configuration procedure involves 3 the following steps:

  1. Configuration of the Fragments - specifying i.e. the protocol, connection and authentication methods to be used for the source and target parts of the operation.
  2. Configuration of the Profile, which involves definition of the Profile - i.e.
    • the operation to be carried out (e.g. copy or move),
    • the fragments specified in Step 1 that are to be used for the source and target
    fragments
    • parts of the transfer and
    • any specific directories that are to be used
    as well as
    • .
    • Note that the Profile can also be used to specify other elements such as any notifications to be made or preprocessing that is to be carried out. These will be described in other parts of this manual.
  3. Calling the Configuration configuration and Profile profile from the command line, a batch file or via the JADE API

We recommend using our XML Editor to generate the configuration file. This editor uses the JADE XSD schema as a guide through each stage of the process to control the elements that can be be specified and validate the configuration.

This means that the possibility of configuration errors is greatly reduced.

1) Configuration of the Fragment

  1. YADE API.

Step 1: Fragment Configuration Considerations

...

The Remote Source Fragment

The first step in the configuration is to configure the ProtocolFragments to be used for the transfer from the source. Other fragments are not required for this example.

Fragments are XML elements that specify how transfers are This is an XML element that specifies how the transfer is to be carried out. Protocol fragments are protocol-specific and can be thought of as predefined connection specifications.  They are protocol-specific - the FTP protocol, for example, brings a different set of features and constraints than WebDAV protocol.

Fragments are not operation-specific - a fragment could be used as the target for one operation and then as a source for a subsequent one or in a Copy operation and then in a Remove.

Any number of Fragments fragments can be predefined in an XML Configuration. These are then called from the profile element branch as required. a configuration.

Fragments are required to be given name attributes, with which they will be referenced from the file transfer Protocol profile as shown in the next step.

The fragment that is to be used for a particular part of the transfer operation is then specified in a profile element.

For the current example a fragment only has to be configured for the source part of the transfer as the transfer target is the local file system.

The XML hierarchy for the FTPFragment for this exercise is identexample is structured as follows:

  • ProtocolFragments (parent element)
    • FTPFragment (with name attribute)
      • BasicConnection
        • Hostname
        • Port number (optional)
      • BasicAuthentication
        • Account
        • Password (optional)

Note that in the XML hierarchy shown above has been simplified through the omission of optional elements that are not directly relevant

The configuration file for this

2) Configuration of the Profile

FTP Transfer Properties

The XML hierarchy shown above reflects key properties of FTP file transfer:

  • Only a BasicConnection element with a Hostname and optional Port is possible - URL connections are not possible.
  • Only BasicAuthentication with an Account (i.e. user name) and optional Password is possible: SSH authentication, for example, requires that the SFTP protocol is used.

The Remote Target Fragment

It is not necessary to define a fragment for the target part of the operation as this takes place locally and the target directory is specified as part of the transfer profile.

Step 2: Profile Configuration Considerations

The second configuration The second step is to define the Profile, which is operation-specific. For example, a Profile for a Move Operation requires source and target to be specified where as a Remove operation only requires a source.

The operation in the current example is copy Copy for which a source and a target Fragment elements (CopySource and CopyTarget respectively) have to be specified.

Fragments are specified using a reference that is specified as an attribute for the CopySourceFragmentRef and the CopyTargetFragmentRef elements.

The type of fragment to be used for the source part of the transfer - here an FTPFragmentRef element - is specified in the CopySourceFragmentRef element.

The FTP fragment itself is then specified in the FTPFragmentRef element's ref attribute.

In this example, the CopyTargetFragmentRef is used to specify that the target is to be local. The target directory is specified in the Directory element, which is a sibling of the CopyTargetFragmentRef reference element.

The XML for the copy operation from remote to local is structured as follows:

  • Profile
    • Operation
      • Copy
        • CopySource
          • CopySourceFragmentRef
            • FTPFragmentRef (with ref attribute for FTPFragment)
        • CopyTarget
          • CopyTargetFragmentRef
            • LocalTarget
          • Directory

The CopySourceFragmentRef element calls the FTPFragment defined in step 1.

The CopyTargetFragmentRef specifies that the target is local and the target directory is specified in a sibling element of the fragment reference element.

Note that once again the XML hierarchy shown above is simplified through the omission of the majority of optional elements.

Step 3: Calling the Configuration Profile

...

The configuration profile is specified with two parameters when JADE YADE is called from the command line:

  • the name of the XML configuration file and
  • the Profile to be used.

Example calls for Windows and Unix systems can be found in the

 

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

The main restrictions of FTP file transfer are:

  • only basic authentication can be carried out - i.e. authentication with an account name and optionally a password.

As with all file transfer protocols, any number of FTP file transfer configurations in the form of ProtocolFragments can be pre-configured and selected as required.

Operations around FTP file transfer

In addition, JADE can carry out the following operations in conjunction with FTP file transfer:

  • pre- and post-processing operations, both for the source part of the transfer (i.e. pickup) and the target part (i.e. put down)
  • file renaming

The configuration of these operations is described in detail on this page.

FTP-specific transfer features

FTP provides a number of protocol-specific features:

  • passive mode
  • a choice of transfer modes

The configuration of these features is described in detail on our FTP-only Parameters page.

Specification of FTP File Transfer Elements

1. What is added to the Fragments branch

FTPFragment

The key element in the JADE XML schema for the specification of a file transfer by FTP is the FTPFragment

  • This includes parameters for a connection to a host and authentication parameters accordingly.
  • Such fragments can be defined once and can be re-used by any number of Profiles

Specify an FTPFragment for the source of your transfer.

2. What is added to the Profiles branch

a) Add a Source This element is part of the Profiles branch of the schema and a direct descendant of operation source or target elements such as CopySource . Add the FTPFragmentRef

In order to use your FTPFragment in a Profile add the FTPFragmentRef element.

b) Add a target 

use a local target

For a complete configuration see the "Getting Started" sample from our article JADE - XML Configuration - Sample Files

 

This element is part of the Profiles branch of the schema and a direct descendant of operation source or target elements such as CopySource or MoveTarget.

 

The FTPFragmentRef element can be specified for the source and/or target parts of the operation.

The FTPFragmentRef element itself contains a reference to the FTPFragment to be used for this part of the transfer. FTPFragment elements are specified in the Fragments branch of the schema and may not be specific to the current transfer operation - i.e. more than one configuration can be defined.
Note that the FTPFragment reference, which is specified as a name attribute of the FTPFragmentRef element, is not shown in the XSD schema hierarchy diagram below.

In addition, as shown in the first diagram below, the FTPFragmentRef element has child elements that are but define aspects of the operation that are FTP-specific: FTPPreProcessing, FTPPostProcessing and Rename. These elements are described in detail below.

The FTPFragmentRef Element

xxx JADE Parameter Reference - FTPFragmentRef

A Simple FTP File Transfer Example Configuration

The configuration for a simple FTP file transfer is shown in the Example JADE Configuration for Simple FTP File Transfer article.

Further Information

on our Configuring File Transfers with the YADE Client page.

Further Information

...