- Created by Andreas Püschel, last modified on Aug 26, 2015
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 30 Next »
Scope
- The following examples have been created by use of the XML Editor
- Each sample file references the XSD schema from the JADE - Reference Documentation - XSD Schema Reference
- The XML Editor can be configured to
Configuring the XML Editor for use with JADE configuration files up to release 1.10
Activating the JADE Xml2Ini Converter Plugin
The XML Editor comes with a sub-folder plugins
in the installation directory.
- By default all Plugins that are deployed with this folder are available with the XML Editor. Therefore the Xml2Ini Converter is active by default.
- Should the sub-folder
plugins
not be available, e.g. should this folder have been renamed, then you cannot use the conversion feature. - If the Xml2Ini Converter is available then you can use the respective operation from the main menu and from the tab context menu.
- The XML Editor shows a file dialog and suggests an .ini export file with the same basename as the current .xml configuration file.
Configuring the XML Editor for automated Cconversion
The XML Editor comes with the feature to auto-save configuration files in the .ini format when saving to the .xml format, i.e. doing the conversion automatically.
- To activate this feature adjust the check-box "Autosave ini file" to be checked. We recommend to use this feature if you want to create compatible .xml and .ini configuration files for JADE releases 1.10 and 1.11.
- This allows to manage configurations for JADE 1.11 in XML format and to have a parallel .ini file being created for use with JADE 1.10. Keeping both .xml and .ini configuration files in sync will allow a smooth migration to JADE 1.11 - as long as you would not manually modify the .ini file.
- In autosave mode the .ini file will be overwritten whenever the .xml file is saved.
- In addition you can enable desktop notifications to be created if a .ini file is being saved.
Examples
- All examples are used for the JADE Configuration XSD schema http://www.sos-berlin.com/schema/jade/JADE_configuration_v1.0.xsd
- All examples are compatible for use with JADE 1.10 (.ini) and JADE 1.11 (.xml)
Getting Started
See tutorial The JADE Client Command Line Interface - Tutorial 1 - Getting Started
XML Configuration: getting_started.xml
XML Configuration File: getting_started.xml Expand source
<?xml version="1.0" encoding="utf-8"?> <Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/jade/JADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Fragments> <ProtocolFragments> <FTPFragment name="ftp_server_2_local"> <BasicConnection> <Hostname><![CDATA[test.sos-berlin.com]]></Hostname> <Port>21</Port> </BasicConnection> <BasicAuthentication> <Account><![CDATA[demo]]></Account> <Password><![CDATA[demo]]></Password> </BasicAuthentication> <PassiveMode>true</PassiveMode> </FTPFragment> <SFTPFragment name="sftp_server_2_local_pass"> <BasicConnection> <Hostname><![CDATA[test.sos-berlin.com]]></Hostname> <Port>22</Port> </BasicConnection> <SSHAuthentication> <Account><![CDATA[demo]]></Account> <AuthenticationMethodPassword> <Password><![CDATA[demo]]></Password> </AuthenticationMethodPassword> </SSHAuthentication> </SFTPFragment> </ProtocolFragments> </Fragments> <Profiles> <Profile profile_id="ftp_server_2_local"> <Operation> <Copy> <CopySource> <CopySourceFragmentRef> <FTPFragmentRef ref="ftp_server_2_local" /> </CopySourceFragmentRef> <SourceFileOptions> <Selection> <FileSpecSelection> <FileSpec><![CDATA[.*]]></FileSpec> <Directory><![CDATA[/]]></Directory> </FileSpecSelection> </Selection> </SourceFileOptions> </CopySource> <CopyTarget> <CopyTargetFragmentRef> <LocalTarget /> </CopyTargetFragmentRef> <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory> <TargetFileOptions> <DisableOverwriteFiles>false</DisableOverwriteFiles> </TargetFileOptions> </CopyTarget> <TransferOptions> <Transactional>true</Transactional> </TransferOptions> </Copy> </Operation> </Profile> <Profile profile_id="sftp_server_2_local_pass"> <Operation> <Copy> <CopySource> <CopySourceFragmentRef> <SFTPFragmentRef ref="sftp_server_2_local_pass" /> </CopySourceFragmentRef> <SourceFileOptions> <Selection> <FileSpecSelection> <FileSpec><![CDATA[.*]]></FileSpec> <Directory><![CDATA[/]]></Directory> </FileSpecSelection> </Selection> </SourceFileOptions> </CopySource> <CopyTarget> <CopyTargetFragmentRef> <LocalTarget /> </CopyTargetFragmentRef> <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory> <TargetFileOptions> <DisableOverwriteFiles>true</DisableOverwriteFiles> </TargetFileOptions> </CopyTarget> <TransferOptions> <Transactional>true</Transactional> </TransferOptions> </Copy> </Operation> </Profile> </Profiles> </Configurations>
- Flat File Configuration: getting_started.ini
Flat File Configuration: getting_started.ini Expand source
[protocol_fragment_ftp@ftp_server_2_local] protocol = ftp host = test.sos-berlin.com port = 21 user = demo password = demo passive_mode = true [protocol_fragment_sftp@sftp_server_2_local_pass] protocol = sftp host = test.sos-berlin.com port = 22 user = demo ssh_auth_method = password password = demo [profile@ftp_server_2_local] operation = copy source_include = protocol_fragment_ftp@ftp_server_2_local file_spec = .* source_dir = / target_protocol = local target_host = localhost target_dir = ${USERPROFILE}\jade_demo\a overwrite_files = true transactional = true [profile@sftp_server_2_local_pass] operation = copy source_include = protocol_fragment_sftp@sftp_server_2_local_pass file_spec = .* source_dir = / target_protocol = local target_host = localhost target_dir = ${USERPROFILE}\jade_demo\a overwrite_files = false transactional = true
Simple File Selection
- See tutorial The JADE Client Command Line Interface - Tutorial 2 - Simple File Selection
- XML Configuration: simple_file_selection.xml
XML Configuration: simple_file_selection.xml Expand source
<?xml version="1.0" encoding="utf-8"?> <Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/jade/JADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Fragments> <ProtocolFragments> <SFTPFragment name="sftp_test"> <BasicConnection> <Hostname><![CDATA[test.sos-berlin.com]]></Hostname> <Port><![CDATA[22]]></Port> </BasicConnection> <SSHAuthentication> <Account><![CDATA[demo]]></Account> <AuthenticationMethodPassword> <Password><![CDATA[demo]]></Password> </AuthenticationMethodPassword> </SSHAuthentication> </SFTPFragment> </ProtocolFragments> </Fragments> <Profiles> <Profile profile_id="sftp_server_2_local_select_recursive"> <Operation> <Copy> <CopySource> <CopySourceFragmentRef> <SFTPFragmentRef ref="sftp_test" /> </CopySourceFragmentRef> <SourceFileOptions> <Selection> <FileSpecSelection> <FileSpec><![CDATA[^test_.\.txt$]]></FileSpec> <Directory><![CDATA[/rec]]></Directory> <Recursive><![CDATA[true]]></Recursive> </FileSpecSelection> </Selection> </SourceFileOptions> </CopySource> <CopyTarget> <CopyTargetFragmentRef> <LocalTarget /> </CopyTargetFragmentRef> <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory> </CopyTarget> </Copy> </Operation> </Profile> </Profiles> </Configurations>
- Flat File Configuration: simple_file_selection.ini
Flat File Configuration: simple_file_selection.ini Expand source
[protocol_fragment_sftp@sftp_server_2_local_select_recursive] protocol = sftp host = test.sos-berlin.com port = 22 user = demo ssh_auth_method = password password = demo [protocol_fragment_sftp@sftp_server_2_local_zero_byte] protocol = sftp host = test.sos-berlin.com port = 22 user = demo ssh_auth_method = password password = demo [profile@sftp_server_2_local_select_recursive] operation = copy source_include = protocol_fragment_sftp@sftp_server_2_local_select_recursive file_spec = ^test_.\.txt$ source_dir = /rec recursive = true target_protocol = local target_host = localhost target_dir = ${USERPROFILE}\jade_demo\a overwrite_files = false [profile@sftp_server_2_local_zero_byte] operation = copy source_include = protocol_fragment_sftp@sftp_server_2_local_zero_byte file_spec = ^test_[0-9]\.txt$ source_dir = / zero_byte_transfer = relaxed target_protocol = local target_host = localhost target_dir = ${USERPROFILE}\jade_demo\a
More Advanced File Selection
- See tutorial The JADE Client Command Line Interface - Tutorial 3 - More Advanced File Selection
- XML Configuration: more_advanced_file_selection.xml
XML Configuration: more_advanced_file_selection.xml Expand source
<?xml version="1.0" encoding="utf-8"?> <Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/jade/JADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Fragments> <ProtocolFragments> <SFTPFragment name="sftp_server_2_local_poll_minfiles"> <BasicConnection> <Hostname><![CDATA[test.sos-berlin.com]]></Hostname> <Port>22</Port> </BasicConnection> <SSHAuthentication> <Account><![CDATA[demo]]></Account> <AuthenticationMethodPassword> <Password><![CDATA[demo]]></Password> </AuthenticationMethodPassword> </SSHAuthentication> </SFTPFragment> </ProtocolFragments> </Fragments> <Profiles> <Profile profile_id="sftp_server_2_local_poll_minfiles"> <Operation> <Copy> <CopySource> <CopySourceFragmentRef> <SFTPFragmentRef ref="sftp_server_2_local_poll_minfiles" /> </CopySourceFragmentRef> <SourceFileOptions> <Selection> <FileSpecSelection> <FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec> <Directory><![CDATA[/]]></Directory> </FileSpecSelection> </Selection> <Polling> <PollInterval>20</PollInterval> <PollTimeout>1</PollTimeout> <MinFiles>5</MinFiles> <PollingServer>false</PollingServer> <PollForever>false</PollForever> </Polling> </SourceFileOptions> </CopySource> <CopyTarget> <CopyTargetFragmentRef> <LocalTarget /> </CopyTargetFragmentRef> <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory> </CopyTarget> </Copy> </Operation> </Profile> </Profiles> </Configurations>
- Flat File Configuration: more_advanced_file_selection.ini
Flat File Configuration: more_advanced_file_selection.ini Expand source
[protocol_fragment_sftp@sftp_server_2_local_poll_minfiles] protocol = sftp host = test.sos-berlin.com port = 22 user = demo ssh_auth_method = password password = demo [profile@sftp_server_2_local_poll_minfiles] operation = copy source_include = protocol_fragment_sftp@sftp_server_2_local_poll_minfiles file_spec = ^test_[0-9]\.txt$ source_dir = / poll_interval = 20 poll_timeout = 1 poll_minfiles = 5 polling_server = false polling_server_poll_forever = false target_protocol = local target_host = localhost target_dir = ${USERPROFILE}\jade_demo\a
File Transfer
- see tutorial The JADE Client Command Line Interface - Tutorial 4 - File Transfer
- XML Configuration: file_transfer.xml
XML Configuration: file_transfer.xml Expand source
<?xml version="1.0" encoding="utf-8"?> <Configurations> <Fragments> <ProtocolFragments> <SFTPFragment name="sftp_server_2_local_cumulate"> <BasicConnection> <Hostname><![CDATA[test.sos-berlin.com]]></Hostname> <Port>22</Port> </BasicConnection> <SSHAuthentication> <Account><![CDATA[demo]]></Account> <AuthenticationMethodPassword> <Password><![CDATA[demo]]></Password> </AuthenticationMethodPassword> </SSHAuthentication> </SFTPFragment> </ProtocolFragments> </Fragments> <Profiles> <Profile profile_id="replace_local_datestamp"> <Operation> <Copy> <CopySource> <CopySourceFragmentRef> <LocalSource> <Rename> <ReplaceWhat><![CDATA[^(test)(_)[0-9]\.txt]]></ReplaceWhat> <ReplaceWith><![CDATA[file_;[date:yyyy-MM-dd]_]]></ReplaceWith> </Rename> </LocalSource> </CopySourceFragmentRef> <SourceFileOptions> <Selection> <FileSpecSelection> <FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec> <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory> </FileSpecSelection> </Selection> </SourceFileOptions> </CopySource> <CopyTarget> <CopyTargetFragmentRef> <LocalTarget /> </CopyTargetFragmentRef> <Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory> </CopyTarget> </Copy> </Operation> </Profile> <Profile profile_id="sftp_server_2_local_cumulate"> <Operation> <Copy> <CopySource> <CopySourceFragmentRef> <SFTPFragmentRef ref="sftp_server_2_local_cumulate" /> </CopySourceFragmentRef> <SourceFileOptions> <Selection> <FileSpecSelection> <FileSpec><![CDATA[^test_.\.txt$]]></FileSpec> <Directory><![CDATA[/]]></Directory> </FileSpecSelection> </Selection> </SourceFileOptions> </CopySource> <CopyTarget> <CopyTargetFragmentRef> <LocalTarget /> </CopyTargetFragmentRef> <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory> <TargetFileOptions> <CumulateFiles> <CumulativeFileSeparator><![CDATA[--- File: %{SourceFileName} ---]]></CumulativeFileSeparator> <CumulativeFilename><![CDATA[text-files.txt]]></CumulativeFilename> </CumulateFiles> </TargetFileOptions> </CopyTarget> </Copy> </Operation> </Profile> </Profiles> </Configurations>
- Flat File Configuration: file_transfer.ini
Flat File Configuration: file_transfer.ini Expand source
[protocol_fragment_sftp@sftp_server_2_local_cumulate] protocol = sftp host = test.sos-berlin.com port = 22 user = demo ssh_auth_method = password password = demo [profile@replace_local_datestamp] operation = copy source_protocol = local source_host = localhost replacing = ^(test)(_)[0-9]\.txt replacement = file_;[date:yyyy-MM-dd]_ file_spec = ^test_[0-9]\.txt$ source_dir = ${USERPROFILE}\jade_demo\a target_protocol = local target_host = localhost target_dir = ${USERPROFILE}\jade_demo\b [profile@sftp_server_2_local_cumulate] operation = copy source_include = protocol_fragment_sftp@sftp_server_2_local_cumulate file_spec = ^test_.\.txt$ source_dir = / target_protocol = local target_host = localhost target_dir = ${USERPROFILE}\jade_demo\a cumulate_files = true cumulative_file_separator = --- File: %{SourceFileName} --- cumulative_file_name = text-files.txt
Checking Files for Completenss
- See tutorial The JADE Client Command Line Interface - Tutorial 5 - Checking files for completeness
- XML Configuration: checking_files_for_completeness.xml
XML Configuration: checking_files_for_completeness.xml Expand source
<?xml version="1.0" encoding="utf-8"?> <Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/jade/JADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Fragments> <ProtocolFragments> <SFTPFragment name="sftp_server_2_local_atomic"> <BasicConnection> <Hostname><![CDATA[test.sos-berlin.com]]></Hostname> <Port>22</Port> </BasicConnection> <SSHAuthentication> <Account><![CDATA[demo]]></Account> <AuthenticationMethodPassword> <Password><![CDATA[demo]]></Password> </AuthenticationMethodPassword> </SSHAuthentication> </SFTPFragment> </ProtocolFragments> </Fragments> <Profiles> <Profile profile_id="local_2_local_create_md5"> <Operation> <Copy> <CopySource> <CopySourceFragmentRef> <LocalSource /> </CopySourceFragmentRef> <SourceFileOptions> <Selection> <FileSpecSelection> <FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec> <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory> </FileSpecSelection> </Selection> </SourceFileOptions> </CopySource> <CopyTarget> <CopyTargetFragmentRef> <LocalTarget /> </CopyTargetFragmentRef> <Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory> <TargetFileOptions> <CheckIntegrityHash> <CreateIntegrityHashFile>true</CreateIntegrityHashFile> </CheckIntegrityHash> </TargetFileOptions> </CopyTarget> </Copy> </Operation> </Profile> <Profile profile_id="local_2_local_check_md5"> <Operation> <Copy> <CopySource> <CopySourceFragmentRef> <LocalSource /> </CopySourceFragmentRef> <SourceFileOptions> <Selection> <FileSpecSelection> <FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec> <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory> </FileSpecSelection> </Selection> </SourceFileOptions> </CopySource> <CopyTarget> <CopyTargetFragmentRef> <LocalTarget /> </CopyTargetFragmentRef> <Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory> <TargetFileOptions> <CheckIntegrityHash /> </TargetFileOptions> </CopyTarget> </Copy> </Operation> </Profile> <Profile profile_id="sftp_server_2_local_atomic"> <Operation> <Copy> <CopySource> <CopySourceFragmentRef> <SFTPFragmentRef ref="sftp_server_2_local_atomic" /> </CopySourceFragmentRef> <SourceFileOptions> <Selection> <FileSpecSelection> <FileSpec><![CDATA[^test_large_1\.txt$]]></FileSpec> <Directory><![CDATA[/large/]]></Directory> </FileSpecSelection> </Selection> </SourceFileOptions> </CopySource> <CopyTarget> <CopyTargetFragmentRef> <LocalTarget /> </CopyTargetFragmentRef> <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory> <TargetFileOptions> <Atomicity> <AtomicPrefix><![CDATA[~]]></AtomicPrefix> <AtomicSuffix><![CDATA[~]]></AtomicSuffix> </Atomicity> </TargetFileOptions> </CopyTarget> </Copy> </Operation> </Profile> <Profile profile_id="local_2_local_check_steady_state"> <Operation> <Copy> <CopySource> <CopySourceFragmentRef> <LocalSource /> </CopySourceFragmentRef> <SourceFileOptions> <Selection> <FileSpecSelection> <FileSpec><![CDATA[^test_large_1\.txt$]]></FileSpec> <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory> </FileSpecSelection> </Selection> <CheckSteadyState> <CheckSteadyStateInterval>2</CheckSteadyStateInterval> <CheckSteadyStateCount>10</CheckSteadyStateCount> </CheckSteadyState> </SourceFileOptions> </CopySource> <CopyTarget> <CopyTargetFragmentRef> <LocalTarget /> </CopyTargetFragmentRef> <Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory> </CopyTarget> </Copy> </Operation> </Profile> </Profiles> </Configurations>
- Flat File configuration: checking_files_for_completeness.ini
Flat File Configuration: checking_files_for_completeness.ini Expand source
[protocol_fragment_sftp@sftp_server_2_local_atomic] protocol = sftp host = test.sos-berlin.com port = 22 user = demo ssh_auth_method = password password = demo [profile@local_2_local_create_md5] operation = copy source_protocol = local source_host = localhost file_spec = ^test_[0-9]\.txt$ source_dir = ${USERPROFILE}\jade_demo\a target_protocol = local target_host = localhost target_dir = ${USERPROFILE}\jade_demo\b check_security_hash = true create_security_hash_file = true [profile@local_2_local_check_md5] operation = copy source_protocol = local source_host = localhost file_spec = ^test_[0-9]\.txt$ source_dir = ${USERPROFILE}\jade_demo\a target_protocol = local target_host = localhost target_dir = ${USERPROFILE}\jade_demo\b check_security_hash = true [profile@sftp_server_2_local_atomic] operation = copy source_include = protocol_fragment_sftp@sftp_server_2_local_atomic file_spec = ^test_large_1\.txt$ source_dir = /large/ target_protocol = local target_host = localhost target_dir = ${USERPROFILE}\jade_demo\a atomic_prefix = ~ atomic_suffix = ~ [profile@local_2_local_check_steady_state] operation = copy source_protocol = local source_host = localhost file_spec = ^test_large_1\.txt$ source_dir = ${USERPROFILE}\jade_demo\a check_steady_state_of_files = true check_steady_state_interval = 2 steady_state_count = 10 target_protocol = local target_host = localhost target_dir = ${USERPROFILE}\jade_demo\b
- No labels