cancel
Showing results for 
Search instead for 
Did you mean: 

Flat file to XML file

Former Member
0 Kudos

i have a flat file which need to be converted into XML file. in my spec i have only sender datatype and dont have receiver datatype.and the source file structure is different from the target. source header, items, footer are different from the xml target structure.got struct --how to map source msg type to target as i dont have target datatype as well as msg type.

Accepted Solutions (0)

Answers (1)

Answers (1)

manikandan_shanmugam3
Active Participant
0 Kudos

Hi Macho,

Get the target Structure and map the fields which are needed and in Receiver Communication Channel choose the Adapter as a File

Transport protocol:FTP

Message protocol:File

then configure rest of the things and do the end to end test

Regards,

Manikandan

Former Member
0 Kudos

do u want me to create target data type from target structure, then only i can map from source to target. but in my spec they have mentioned as target data type is not required and they have only given an XSD file for target msg type.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>they have only given an XSD file for target msg type

You already have answer. Import the XSD as external definition in the PI server. You dont need to create data type for target structure. After import in pi, create target message type... there import the xsd as external message. That's it. Then you do mapping of your source xml and target xml in message mapping. Rest are all same.

Hope that helps.

manikandan_shanmugam3
Active Participant
0 Kudos

Hi,

then you need to import the XSD file in external definition .there is no need to create the data type since they want to use XSD.

go to Interface Objects in Namespace

then right click the External Definition thn click new then give the name.

choose the category as a XSD in drop down list and Import the XSD file in File option and save it.

use that External definition as target Structure in Mapping and map the fields .

then create the Message interface for that External Definition and use same as target message interface in Interface Mapping.

Regards,

Manikandan