cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP - StructPlain2XML

Former Member
0 Kudos

Hello Experts,

I'm facing problems to convert text plain to XML using StructPlain2XML.

For example, I have this message file:

And I have to convert the plain text in this XML structure.

The module was configured with settings below, but after process the message my payload is blank

Payload result:

Does anybody knows where is the problem in configuration?

Thank you,

Bruno

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184720
Active Contributor
0 Kudos

I don't think fieldSeparator is 'nl' here.

Check below blog and adjust the configuration

under Linha.fieldnames, i see only one field defined but where as in input file i see few more( in addition there is a key field which is not part of it).

If you have only recordset then i believe you can go with simple plain to xml. Check below blog for reference.

http://wiki.scn.sap.com/wiki/display/XI/How+To...Content+conversion+module+with+J2EE+JMS+adapter

"

engswee
Active Contributor
0 Kudos

Bruno,

Hareesh's recommendation is spot on. You should go for SimplePlain2XML conversion instead. The parameters you currently have are inconsistent with the file content, examples:-

  • xml.Linha.keyFieldValue = Lin although there is no actual content in each line that has the value "Lin".
  • xml.keyFieldName = chave but there are no such field name in xml.Linha.fieldNames.

Rgds

Eng Swee