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:   ​​​​​​​

1639556857103-850.png

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 :   ​​​​​​​  1639411018630-433.png

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

 

Tags:
    
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian