You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 23 Next »

Introduction

The following example describes the configuration of a simple file transfer with basic - i.e. password - authentication.

FTP protocol is used and the transfer involves copying files from a remote server to the local file system.

The transfer configuration described here uses the XML element based configuration introduced with Release 1.11 of JADE. See our JADE Tutorials for a description of the configuration of a similar example using the Settings parameters that could be applied for version before 1.11.

An 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 possible. More complex scenarios will be described later.

The procedure involves 3 steps:

  1. Configuration of the Fragments - specifying 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 source and target fragments to be used as well as
  3. Calling the Configuration and 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

a) The Remote Source Fragment

The first step in the configuration is to configure the ProtocolFragments to be used for the transfer.

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. 

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

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

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

The XML for the FTPFragment for this exercise is ident

  • ProtocolFragments
    • FTPFragment
      • 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. 

The configuration file for this

2) Configuration of the Profile

The second step is to define the Profile, which is operation-specific.

The operation is copy for which a source and a target Fragment have to be specified.

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

  • Profile
    • Operation
      • Copy
        • CopySource
          • CopySourceFragmentRef
        • CopyTarget
          • CopyTargetFragmentRef
          • 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.

3) Calling the ConfigurationProfile

The configuration profile is specified with two parameters when JADE 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

Pages


 
 

Navigation


 

  • No labels