cancel
Showing results for 
Search instead for 
Did you mean: 

Problem converting flat file to XML using JMS Adapter

Former Member
0 Kudos

I need to take an MQSeries message in a flat file format and convert it to XML before processing. I have configured the modules as described by the screenshot located here:

http://www.radesix.com/JMSConfig.jpg

The message is received however it isn't converting to XML. When I view the payload I get the message indicated by the screenshot located here:

http://www.radesix.com/JMSError.jpg

I am new to XI. Any ideas?

Accepted Solutions (0)

Answers (4)

Answers (4)

stefan_grube
Active Contributor
0 Kudos

Your conversion Type is set to StructPlain2XML but your configuration works only with SimplePlain2XML.

For a good documentation go to Plain J2SE adapter -> Configuring the Sender File/FTP adapter

Scroll to point 8: FILE2XMBWITHSTRUCTURECONVERSION

All the here described and explained parameters you have to use for StructPlain2XML.

(For SimplePlain2XML you use the parameters described under 7 FILE2XMBWITHROWCONVERSION)

Regards

Stefan

stefan_grube
Active Contributor
0 Kudos

Two things I want to add:

The conversion inside the JMS adapter works from SP9 on.

You should test the conversion with the file adapter before (use the same module), as the error messages of the file adapter will lead directly to the missing or wrong configuration.

Regards

Stefan

Former Member
0 Kudos

Stefan

I appreciate your help. I'm having some difficulty finding the documentation you referenced.

Using sdn.sap.com I navigated to Exchange Infrastructure -> XI 3.0 documentation and the following paths:

SAP XI Runtime -> Connectivity -> Adapters

I do not see a Plain J2SE adapter. I do however find File Adapter -> Configuring the Sender File/FTP Adapter but I don't see the point 8 that you reference. If I click on Converting File Content in the Sender Adapter I still see no point 8.

Former Member
0 Kudos

Shaun ...got to the prior to NW'04 documentation (XI 2.0)

Former Member
0 Kudos

Okay... in the 2.0 documentation I see stuff referencing what Stefan is talking about.

By the way, this was also tried with SimplePlain2XML and still doesn't work.

stefan_grube
Active Contributor
0 Kudos

For simple plain conversion here is a config, which works in our system:

(left parameter key, right parameter value, module key always the same)

Transform.Class com.sap.aii.messaging.adapter.Conversion

TransformContentType text/xml;charset=utf-8

xml.conversionType SimplePlain2XML

xml.addHeaderLine 0

xml.processFieldNames fromConfiguration

xml.documentName SA02_Identnummer

xml.documentNamespace urn:mycompany-com:logistics:DFT:HWL

xml.structureTitle SA02_Identnummer_Satz

xml.fieldNames Satzart,Identnummer,Status

xml.fieldFixedLengths 2,10,3

Be aware, that you must delete all spaces in the config, especially when you copy and paste values.

For struct. conversion the entries are a little bit more complex.

Regards

Stefan

Former Member
0 Kudos

This documentation seems to indicate that PLAIN2XML is an arbitrary name. What seems to count is the conversiontype parameter. We are using Struct2XMLService since the flat file is of fixed length, not delimited.

Does anyone have a working example of this scenario?

Thanks

Former Member
0 Kudos

Shaun,

Where did you find the documentation for this module you are using ? I would like to test it as well.

Regards,

Achmed

Former Member
0 Kudos

I'm looking at the link you gave... I don't see PLAIN2XML anywhere.

Former Member
0 Kudos

AHA! Nevermind... I see it now.

Former Member
0 Kudos

Did you develop this module yourself or is it a standard module that is present in XI ?

Former Member
0 Kudos

I didn't develop this. I believe it is standard in XI. I just copied what someone else did.

Former Member
0 Kudos

If you check the SAP help file it seems to be using PLAIN2XML transformations in the example, maybe that will help ?

http://help.sap.com/saphelp_nw04/helpdata/en/4d/a3bc97ff55c742af7faed661635baf/frameset.htm

this tells how to migrate j2se dispatchers to be used as Modules in XI 3.0.