cancel
Showing results for 
Search instead for 
Did you mean: 

Parsing an empty source. Root element expected!

Former Member
0 Kudos

Hi Experts,

I am using SFTP adapter in my Sender CC and getting error message as below and also my XML data message is empty. I can't figure out what is the problem, and if I use the same Message Mapping in a Sender CC with file adapter and it works fine:

RuntimeException during appliction Java mapping com/sap/xi/tf/_EmployeurD_Filter_to_EmployeeImport_ Thrown: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Parsing an empty source. Root element expected!



I have my mapping and Transformation in my Sender CC with SFTP adapter as below.


1. Mapping:



2. Transformation in Sender CC. I didn't put Header element below, since I didn't define Header in my Data Type:



Thanks for your advice!

Blue


Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Please check RecordSet of Target structure is mapped with RecordSet of Sender structure 1 to 1.

Thanks,

Tiyasa

Former Member
0 Kudos

I forgot to mention that my source Data Type does not have Header and Key field for Record either, I just hardcoded as below:

former_member182412
Active Contributor
0 Kudos

Hi Blue,

You dont have key field in your structure that is why MessageTransformBean with StructPlain2XML conversion generated empty payload because StructPlain2XML needs key fields in structure.

If your structure is simple structure then you can use 'SimplePlain2XML'.  You no need to mention the key fields in your configuration.

you can refer below blog for more details.

How To...Content conversion module with J2EE JMS adapter - Process Integration - SCN Wiki

Module Key

Parameter Name

Parameter Value

Plain2XML

Transform.Class

com.sap.aii.messaging.adapter.Conversion

Plain2XML

Transform.ContentType

text/xml;charset=utf-8

Plain2XML

xml.conversionType

SimplePlain2XML

Plain2XML

xml.processFieldNames

fromConfiguration

Plain2XML

xml.documentName

MyDocument

Plain2XML

xml.documentNamespace

http://xi.com/test

Plain2XML

xml.structureTitle

MyTitle

Plain2XML

xml.fieldNames

field-name1,field-name2,field-name3

Plain2XML

xml.fieldFixedLengths

3,3,3

Regards,

Praveen.