You are on page 1of 2

“TBIT42_J2EE_FileStructure” - Exercise - File adapter with structure conversion_______

Overview:

This example shows a structure conversion using a J2EE file adapter sender service. The file
adapter receive service is only used to receive and store the converted file.

The source file is a flat file CSV format and will be converted into an XML file format. The file
will be picked up from a directory, converted into XML structure and send to another directory.
As a result of this exercise you become more familiar with using a file adapter sender service
implementing a conversion of the file structure.

To start the scenario make sure the FileSendChannel in service FileSender and
FileReceiveChannel in service FileReceiver are in active status.

Used structures:

so
source structure

after conversion

Message flow:
J2EE File
Adapter

J2EE File
Adapter

Contacts
Contacts
XML file
CSV file format
format Structure
conversion
Configuration:

As sender and receiver parties two services with party or without party are needed. These services
should be created as first step.

To send or receive messages each service need a communication channel that defines the way
that this services handle messages.

Within the channel of the sender service the structure conversion is defined. So the file adapter
picks up the CSV file and convert it to a XML structure for further processing like mapping etc.

The way of conversion has to be defined in the channel settings. The example below provides an
overview how to configure it.

The recordset “contactlist” consists of multiple substructures “contact”. The parameters for the
substructure “contact” must be defined more detailed and describe the structure of “contact”.

The syntax of the path for file pick up and storage could look like this:

On Windows OS: “ D:/dir1/IN ”


On Unix machines: “ /dir1/IN “

Routing information and partner agreements have to be configured as for any other scenario.

Note that you need a sender agreement for your file sender service to get messages from file
adapter into XI.

As result you should see a file in the folder specified in file receiver channel.

You might also like