I have an input file like this :
I want to skip the first line of input file.
In the File Adapter, we have a parameter called Document Offset, where we can achieve this.
I wanted to know the equivalent of that while using MessageTransformBean.
Thanks in advance,
We can use exeternal java classes to modify XI payload for various adapters.
For this, the Java classes must have implemented a Transform Java interface.
To use these classes for the corresponding adapter types in the J2EE Adapter Engine as well, the module AF_Modules/MessageTransformBean is shipped with the module processor.
The MessageTransformBean module enables conversion of XML files to flat files and vice versa. You can use this module in the sender and receiver communication channels
We can use classes com.sap.aii.messaging.adapter.Conversion and com.sap.aii.messaging.adapter.XSLTConversion for conversion in sender and receiver communication channel.
Here we have to configure parametrs for module MessageTransformBean like :
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 Document
Plain2XML xml.structureTitle Title
Plain2XML xml.fieldNames field-name1,field-name2,field-name3
for more information visit SAP HELP: http://help.sap.com/saphelp_nw04/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm
For the above mentioned reauirement, you have to find similiar document offset parameter with above MessageTransformBean.
You find all parameters for the MessageTransformBean in the online help for the J2SE File adapter, as in fact it is the same module used in both cases.
The parameter is:
If you are using conversion type SimpleXML2Plain and the input file has the column headers in the first row which is to be omitted as part of data the following can be done as mentioned by Vishnu above i.e.
xml.processFieldNames = fromFile
If the conversion type is StructPlain2XML you have the following parameters that can be used :
1) xml.documentOffset = 2
the other option would be to check if this can be handled in the mapping.