In this article, I am going to show the easiest (and free) way to parse an EDIFACT Document to XML. Many paid tools are available on the market to convert EDIFACT and EDI . This include converters from Stylus Studio, ETASoft etc. But they are all priced. I wanted to have something free that can parse a custom EDI without much hassle. My objective was to parse an IFLIRR EDIFACT File from Amadeus which is part of the Altea Inventory System, an extended version of Flight Reservation, FLIRES.
So let’s start with the tools you will need
1. Smooks
Java provides an extensible open source framework called Smooks for building applications for processing XML and Non-XML data such as CSV, EDI. You can do a lot with Smooks but for the purpose of this tutorial, we will stick to EDI to XML Conversion.
2. Now, to develop with Smooks, one need to have a good Java IDE. Many open source Java IDE are available but here we will use Talend Open Studio. Talend Open Studio is an open source studio ETL Tool for business integration. It supports the process of moving, transforming data across information systems. Talend Open Studio, code named as TOS is as powerful as Powercenter Informatica or Microsoft SQL Server Integration Services.
3. To integrate Smooks with Talend Open Studio, SOPERA has introduced Sopera Data Integration Smooks Components which is also free. Download Talend Open Studio , tSmooks and tSmooksInput. That’s all we will need to parse an EDIFACT.
To install TOS, Double click the executable. Once installation is complete, you will need to register. Enter your email address and country etc.
1. In the Proxy Parameters area, select the checkbox if relevant and fill in the following proxy fields. Click Validate to access Talend Open Studio.
2. You will need to create a local repository to store the mapping and developments you will do on TOS.
The first time you open TOS, you need to set up a new project or import an existing project. Create a new project and exit TOS. We are going to configure TOS for tSmooks Components.
3. Extract tSmooks and tSmooksInput you downloaded earlier and follow the instructions in their readme file to configure TOS
4. Open TOS and create a new project or open the one you have created before. Choose Java as Generation Language
5. To start with, you need to create new Job.
6. To see if TOS has loaded the tSmooks components, open the palette window and locate tSmooks and tSmooksInput.
Now, you have all the tools required to convert the EDIFACT into XML. With TOS, you can even parse the XML and save the data to a database
In part II , I will explain how to configure a tSmooks component in Talend and build a Smooks mapping.
Was the article Helpful?