|
next
|
 Subject: Problems with FTP upload via XQuery Author: (Deleted User) Date: 05 Jun 2020 05:54 PM Originally Posted: 04 Jun 2020 11:40 AM
|
Hi
I need to prefix outgoing files from my XML pipleline with a static value: 'S8000092.' and as far as I can see this is some I cannot achieve via the Pipeline Output node.
Am I right? Or is there an easier way to append a prefix to an outgoing file that needs to be placed on a FTP server?
So I am trying to make a xquery script that does the trick, but it is giving me some trouble.
I copied the sample script from the XML Pipeline server guide, added the needed jars.
The script is returning this error:
javax.xml.xquery.XQQueryException: [DataDirect][XQuery]Error at line 10, column 1. Error in call to extension function "public static boolean com.ivitechnologies.pipeline.ext.net.SFTP.sendFile(org.w3c.dom.Element,java.lang.String,java.lang.String) throws java.lang.Throwable": Exception in extension function "10: "
at com.ddtek.xquery.xqj.Util.createXQQueryException(Util.java:341)
at com.ddtek.xquery.xqj.Util.createXQQueryFromXPathException(Util.java:415)
at com.ddtek.xquery.xqj.Util.createXQException(Util.java:237)
at com.ddtek.xquery.xqj.DDXQAbstractSequence.writeSequence(DDXQAbstractSequence.java:466)
Can anyone tell me what it supposed to mean? The 10: refers to line 10 I think, this is where the cursor ends up.
The script:
declare namespace xps_sftp = "ddtekjava:com.ivitechnologies.pipeline.ext.net.SFTP";
declare function xps_sftp:sendFile($element as element(), $uriLocalFile as xs:string, $targetPath as xs:string) as xs:boolean external;
declare variable $sftp := <root host='ftp.eetgroup.com' port='22' path='/' user='<...>' password='<...>'/>
xps_sftp:sendFile(sftp,resolve-uri("../testdata/ORDERS_881141.xml", fn:static-base-uri()),"ORDERS_881141.xml")
added jars to project:
xmlpipelineserver.jar
json-20090211.jar
commons-net-3.6.jar
jsch-0.1.53.jar
|
|
|