|
next
|
Subject: Query and Sftp clent Author: Bruce Cantor Date: 09 Aug 2021 10:53 AM Originally Posted: 09 Aug 2021 10:52 AM
|
Hi
I am having a problem with xquery and sftp client functionality.
Having this script:
declare namespace xps_sftp = "ddtekjava:com.ivitechnologies.pipeline.ext.net.SFTP";
declare variable $ediData as xs:string external;
declare variable $config := <root host="xxxx" port="22" path="/EET_Inbox" user="integration_test" password="xxxx"/>;
declare function xps_sftp:sendString($element as element(), $data as xs:string, $targetPath as xs:string) as xs:boolean external;
let $now := ddtek:format-dateTime(fn:current-dateTime(),'[Y0001][M01][D01][H01][m01][s01]') ,
$fileName := concat("S8000092.Order.",$now,'.edi')
return
xps_sftp:sendString($config,$ediData,$fileName)
This script works if I just have a pipeline where an EDIFACT file is used as input, but if I do transformations from XML to EDIFACT before applying this script nothing is placed on the ftp server and an error is thrown "No value has been bound to the external variable $edidata"
I need to apply a special name to the file, otherwise I would have just used the binding file option.
Can anyone tell me why edifact data can be parsed directly , but not as the result of an conversion?
I have attached the two pipelines, the working one and the faulty one.
demo1_works.pipeline demo1_works
demo2_doesnotwork.pipeline demo2_doesnotwork
|
|
|