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

Compare with Current View Page History

« Previous Version 2 Next »

XML-based file transfer configuration from Version 1.11 onwards

The XML file transfer configuration introduced with version 1.11 of JADE allows parameter dependencies in JADE to be validated before the configuration file is transferred to an operating environment.

Dependencies and conflicts between configuration elements are avoided through the use of an XSD schema

An XML editor is available that will simplify the creation and validation of schema-compatible file transfer configurations.

The basic principles behind the organization of the schema and parameters will be described in this document. A detailed description of individual parameters can be found in our Parameter Reference.

The following screen shot shows the test host FTP file transfer example described in the previous section in the SOS XML Editor:

The following code block shows the XML configuration file for the test host FTP file transfer example shown in the XML Editor screen shot above in XML form:

A simple profile for transferring files by FTP from a test host to the local file system
<?xml version="1.0" encoding="UTF-8"?>
<Configurations>
  <Fragments>
    <ProtocolFragments>
      <FTPFragment name="demo@test.sos-berlin.com">
        <BasicAuthentication>
          <Account><![CDATA[demo]]></Account>
          <Password><![CDATA[demo]]></Password>
        </BasicAuthentication>
        <BasicConnection>
          <Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
          <Port><![CDATA[21]]></Port>
        </BasicConnection>
      </FTPFragment>
    </ProtocolFragments>
  </Fragments>
  <Profiles>
    <Profile profile_id="ftp_server_2_local">
      <Operation>
        <Copy>
          <CopySource>
            <CopySourceFragmentRef>
              <FTPFragmentRef ref="demo@test.sos-berlin.com" />
            </CopySourceFragmentRef>
            <SourceFileOptions>
              <Selection>
                <FilePathSelection>
                  <FilePath><![CDATA[/]]></FilePath>
                </FilePathSelection>
              </Selection>
            </SourceFileOptions>
          </CopySource>
          <CopyTarget>
            <CopyTargetFragmentRef>
              <LocalTarget />
            </CopyTargetFragmentRef>
            <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
          </CopyTarget>
        </Copy>
      </Operation>
    </Profile>
  </Profiles>
</Configurations>

Although longer and seemingly more complex than the settings file configuration version shown above, the XML code for this example was produced using the graphical editor and therefore has been validated against the JADE Client XSD Schema. It is error and conflict free and dependencies are correctly specified.

Running a file transfer profile

A file transfer is started by specifying an XML configuration file and the profile in that file that is to be used.

For example, the profile listed above is called using: CHECK SYNTAX (SETTINGS)

Calling a file transfer profile on a Windows system
jade.cmd -settings="%USERPROFILE%\jade_demo\jade_user_manual_configuration.xml" -profile="ftp_server_2_local"
Calling a file transfer profile on a Unix system
./jade.sh -settings="${HOME}/jade_demo/jade_user_manual_configuration.xml" -profile="ftp_server_2_local"

Moving from a Settings File to an XML Configuration

Comparison of the two approaches reveal a significant difference in the concept behind the two approaches to configuration:

  • Settings file configuration
    Parameters such as host, protocol, user, password and dir (directory) are usually grouped separately in the settings file configuration according to whether they apply to the transfer source or target. This usually has no functional meaning (the files are processed from top to bottom) and is partly simply for convenience (grouping parameters together makes them easier to find) and partly to allow their reuse in the form of so-called profile fragments if required.
  • XML configuration
    • Parameters are divided up between profile and fragment branches. (Note that these expressions are defined differently to elements in the settings file configuration with the same names.)
      • authentication and connection parameters (Account & Password and Hostname & Port respectively) and the protocol (defined through the use of FTP) are part of the Fragments branch of the configuration.
      • the operation (copy) and the source and target file paths (FilePath and LocalTarget respectively) are specified in the Profiles branch.
      • the CopySourceFragmentRef element refers to the FTPFragment specified in the Fragments branch
    • The division between Fragments and Profiles branches allows the reuse of elements whilst working within the strict hierarchical structure of XML.
      • The use of a reference in the Profiles branch (in the example, using the CopySourceFragmentRef element) to specify the authentication and connection parameters in the Profiles branch allows any number of Profiles elements to be defined and specified as required.

More Information

See JADE User Manual - XSD Schema  article for more detailed information about the XML configuration.

 

Pages


 
 

Navigation


 

  • No labels