|
top
|
Subject: Can a pipeline send a file by FTP, using explicit ftp over TLS? Author: Ivan Pedruzzi Date: 23 Jun 2023 09:20 PM
|
See XML Pipeline Server’ s User guide chapter “FTP Operations”.
Here an example
declare namespace xps_ftp = "ddtekjava:com.ivitechnologies.pipeline.ext.net.FTP";
declare function xps_ftp:sendFile($element as element(), $uriLocalFile as xs:string, $targetPath as xs:string) as xs:boolean external;
declare function xps_ftp:sendString($element as element(), $data as xs:string, $targetPath as xs:string) as xs:boolean external;
declare variable $session := <root host='127.0.0.1' port='21' path='/' user='ftp' password='ftp' ftps_protocol="TLS"/>;
declare variable $file_url := resolve-uri("myfile.xml", fn:static-base-uri());
declare variable $target_file := "myfile.xml";
xps_sftp:sendFile($session, $file_url, $target_file)
or you can send a string
xps_sftp:sendString($session, "some nice data", $target_file)
You will need the following jars in your Stylus Studio project’s classpath to test the query:
xmlpipelineserver.jar
json-20090211.jar
commons-net-3.6.jar
Ivan Pedruzzi
Stylus Studio Team
|
|
|