Quantcast
Channel: Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 741

Java Mapping : Base64 Zipped CSV to XML Conversion

$
0
0

Introduction

 

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.

 

Description

 

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.

 

Incoming Payload


Encoded file is is within the "HeaderExport" Tag

 

Input paylaod.png

 

CSV file after unzipping

 

UnzippedCSV.png

 

 

Source Code : Please see attachment.

 

Output of the Mapping

 

Output.png

 

outputPayload.png


Viewing all articles
Browse latest Browse all 741

Trending Articles