SWIFT Module 7.1 SP10.July 2020 | Package Services | WmFIN Package Services | wm.xmlv2.utils Folder | wm.xmlv2.utils:formatXMLV2
 
wm.xmlv2.utils:formatXMLV2
This service formats the XML contents of the Data PDU to a proper XMLv2 format, as follows:
*Prefix (1 byte): the hexadecimal character 0x1f.
*Length (6 bytes): the length (in bytes) of the Signature and Data PDU fields. The length is base-10 encoded as 6 ASCII characters, left padded with 0s, if needed.
*Signature (24 bytes): the Signature computed on the Data PDU using the HMAC-SHA256 algorithm, base-64 encoded. This signature authenticates the originator of the Data PDU (the application or SAA), and guarantees the integrity of the Data PDU. If this authentication is not required on the SAA side, the field must be filled with NULL characters.
Note:
SWIFT Module does not support signature generation.
*Data PDU: the XML structure that contains the information relevant for processing the document encoded in UTF--8 format. The first byte of this field must be the character '<' (0x3C): byte-order marker is not supported.
Input Parameters
message
String The Data PDU in XML format.
filename
String The fully qualified file name where the generated XMLv2 message is added after generation.
signature
String (optional) The signature to be appended to the generated xmlv2 message to be sent to SAA. If you do not specify a signature, the service fills the signature field with NULL characters.
Output Parameters
outMessage
String The generated formatted XMLv2 message.