In my recent client project i had a requirement where the incoming file was a csv file zipped and Base64 encoded. Source system was Ariba and Target was ECC.
My aim at writing this blog is to provide you with a reusable Java Mapping for similar requirements.
Ariba sends file to PI using webservice. The encoded file is within a tag named “Header”.
Following actions are required to be performed by PI before sending the file to ECC for further processing .
1. Decode base64 file
2. Unzip the content
3. Convert the unzipped CSV file into XML
In order to achive the above i have created a Java Mapping.
Encoded file is is within the “HeaderExport” Tag
CSV file after unzipping
Source Code : Please see attachment.
Output of the Mapping