System functions - DecodeBase64 

Page / - last modified by Assala Chmiti on 2022/06/13 13:18 

DecodeBase64 
last modified by Assala Chmiti
on 2022/06/13 13:18

Table of Contents
 Introduction:
DecodeBase64 function Explanation:

 Introduction:
This page is an introduction to the System functions DecodeBase64 that is used in order to decode a data. Decode base64 the encoded text into Text or File.
DecodeBase64 function Explanation:
Definition: 
This fucntion is used to decode a content source (Text) to an output content (File or Text).
The content source is a non human-readable format in base 64 and it's transformed to an lisible format.
How to use the function? :
The EncodeBase64 funtion have 4 necessary parameters:
•	The 1st parameter is the Source that verify if the content source is text. This parameter accepts just XML, otherwise, an error is generated.
•	The 2nd parameter connector is the one that contains the value in base 64 to be transformed. when Source equals to XML, the Param2 is the connector that holds the file containing the encoded String value inside a node.
•	The 3rd parameter pathExpression is the one that contains the PathExpression of the node containing the Base64 encoded value.
•	The 4th parameter outputFileName is the one that holds the path of the decoded value with its real extension.
You can call this function inside a stylesheet and use it for a mapping or you can call it inside a connector, but the declaration differs in each case.
First case:
In an XSL, to call this system function, we use this form ixf:DecodeBase64('XML','FtpListener1','/R/A','The output File name after decoding(Ex:out/file.pdf)').
Ex:   ​​​​​​​

Second case:
In the scenario, to call this system function inside a connector (A loadFile for example), we use this form {System.DecodeBase64;XML;FtpListener1;/R/A;The output File name after decoding (Ex:out/file.pdf)}.
Ex :   ​​​​​​​  
The result of this function :
This function returns the path of the decoded value.
Return: C:\SERVER\Data\ENV\iXPath\jobs\2021\12\13\22174\out\file.pdf