...
The examples presented in this article are based on the simple file transfer example described in the The YADE Client Command Line Interface - Tutorial 1 - Getting Started article. This The tutorial describes the configuration required to download a number of files from a online server provided by the SOS GmbH and save these files on the user's local file system. Using this server means that users can get a working example up and running with a minimum of effort. A simplified version of the configuration used in the tutorial (only specifying FTP) is available as a download: sos-berlin_demo_2_local.xml. Instructions for installing and configuring the YADE Client can be found in the YADE - Tutorials article.
The configuration provided in the download file will cause six files in the root server folder to be copied to a local /jade_demo/transfer_receive
folder, generating the target folder in the user's home or profile directory if required and permissions are available. The files will be transferred by FTP and authentication for the server (user name and password) is specified in the download file.
The example described in this article uses
Installing the Credential Store and configuring the database
...
Alternative Syntax
Note also that although the CSEntryPath element is a required element, it can be left empty and that fully specified paths can be used for each parameter. For example, the Password could be specified using:
...
The parts of the XML configuration relevant to the use of the Credential Store are shown in the following screenshot of the XML Editorconfiguration for the current example, with parameter values highlighted in yellow:
...
The use of the Credential Store is contained within the settings file and is not exposed when calling the YADE Client. For example, on Windows systems, the YADE Client could be is called for the current example using:
Code Block | ||||
---|---|---|---|---|
| ||||
C:\Program Files\sos-berlin.com\jade\client\bin>jade.cmd -settings="%USERPROFILE%\jade_demo\sos-berlin_demo_2_local_cs.xml" -profile="ftp_server_2_local_cs" |
The output produced when successful:following listing shows the output produced by the example configuration. Note that the problem that occurred with the transfer of one of the files has nothing to do with the use of the Credential Store.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
C:\Program Files\sos-berlin.com\jade\client\bin>jade.cmd -settings="%USERPROFILE%\jade_demo\sos-berlin_demo_2_local_cs.xml" -profile="ftp_server_2_local_cs" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + START : JADE.CMD + + ----------------- + + DATE : 1718.04.2018 1415:5632:5145,2654 + HOSTNAME : JS-PC + USER : aa + CALL : C:\Program Files\sos-berlin.com\jade\client\bin\jade.cmd -settings="C:\Users\aa\jade_demo\sos-berlin_demo_2_local_cs.xml" -profile="ftp_server_2_local_cs" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + main INFO 1415:5632:5449,679319 (SOSDataExchangeEngineMain.java:76) ::Execute SOSDataExchange - Kommandozeilenprogram startet .... main INFO 1415:5632:5449,711709 (SOSDataExchangeEngine.java:536) ::showBanner ************************************************************************ * * * YADE - Managed File Transfer * * -----www.sos-berlin.com----- * * * ************************************************************************ Version = 1.12.3-SNAPSHOT (2018-04-15 23:09, revision f156fa1144fe219789e9bf2ad1d3a4b52a68cd24) Copyright 2003-2018 SOS GmbH Berlin Date = 2018-04-1718 1415:5632:5449 SettingsFile = C:\Users\aa\jade_demo\sos-berlin_demo_2_local_cs.xml Profile = ftp_server_2_local_cs Operation = copy Transactional = false +------------Source------------ | Protocol = ftp | Host = test.sos-berlin.com | IP = 93.157.51.161 | User = demo | Password = *** | Passive = false | TransferMode = binary | Directory = ./ | FileSpec = .* | ErrorWhenNoFilesFound = true | Recursive = false | Remove = false +------------Target------------ | Protocol = local | Host = JS-PC | IP = 192.11.0.85 | Directory = C:\Users\aa\jade_demo\transfer_receive/ | OverwriteFiles = true main INFO 1415:5632:5549,164803 (SOSVfsFtpBaseClass.java:242) ::doConnect SOSVfs_D_0102: Verbunden mit Rechner 'test.sos-berlin.com' ³ber Port-Nummer '21'. main INFO 1415:5632:5549,539866 (SOSVfsFtpBaseClass.java:958) ::login (demo@test.sos-berlin.com:21) SOSVfs_D_133: Benutzer 'demo' eingeloggt. main INFO 1415:5632:5549,695928 (SOSVfsFtpBaseClass.java:1295) ::transferMode SOSVfs_D_123: Antwort des FTP-Servers ['binary']: '200 Type set to I'. main INFO 1415:5632:5650,148272 (SOSDataExchangeEngine.java:897) ::setInfo 6 files found for regexp '.*'. main ERROR 15:32:51,131 (SOSFileListEntry.java:1150) ::run SOSVfs_E_229: Fehler. Daten³bertragung nicht m÷glich. Grund: com.sos.JSHelper.Exceptions.JobSchedulerException: unable to get inputstream for file './test_5.txt' main ERROR 15:32:51,131 (SOSDataExchangeEngine.java:1140) ::transfer SOSDataExchangeEngine.TRANSFER_ABORTED main INFO 1415:5632:5651,945131 (SOSDataExchangeEngineSOSFileList.java:788464) ::printState SOSJADE_I_0101: Es wurden 6 Dateien ³bertragenrollback Rollback aborted files. main INFO 1415:5632:5651,961147 (SOSDataExchangeEngine.java:359) ::showResult ************************************************************************* Ausf³hrungsstatus = Ohne FehlerFehlerhaft. Erfolgreiche ▄bertragungen = 65 ▄bersprungene ▄bertragungen = 0 Fehlgeschlagene ▄bertragungen = 01 letzter aufgetretener Fehler = unable to get inputstream =for file './test_5.txt' ************************************************************************* main INFOERROR 1415:5632:5651,976147 (SOSDataExchangeEngineMain.java:7881) ::Execute Execute -: Fehler aufgetreten: unable to get inputstream for file './test_5.txt', Programm wurde ohne Fehlerwird mit Exit-Code 99 beendet. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + END : JADE.CMD + + ---------------- + + DATE : 1718.04.2018 1415:5632:5751,0320 + HOSTNAME : JS-PC + USER : aa + CALL : C:\Program Files\sos-berlin.com\jade\client\bin\jade.cmd -settings="C:\Users\aa\jade_demo\sos-berlin_demo_2_local_cs.xml" -profile="ftp_server_2_local_cs" + EXIT : 099 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
...