on 06-12-2008 10:46 AM
Hi friends,
I have to convert fixed length flat structure to xml message.Therefor i have to do content conversion at the JMS sender comm channel.Can someone please explainthe procedure?
data in the queue would be like as follows.
9999000000124646q12233appej500rc11147822zord
Hi,
Please do refer the document
Ref How To Use the Content Conversion Module in JMS Adapter -
https://websmp106.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000582377&;
Regards,
Vinod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can use all the parameters fo content conversion in JMS adapter with the usage of adapter module
Refer step by step guide
use message protocol as NFS and put Conversion Module in module list before the adapter module;
For a reference, check this blog: /people/stefan.grube/blog/2007/02/20/working-with-the-payloadzipbean-module-of-the-xi-adapter-framework
The conversion module is the StrictXML2PlainBean.
Thanks
Swarup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manikandan,
The structure conversion can handle files containing rows with different structures. In
each row there is a key field to identify the structure. The rows with identical key fields of
course have identical structures.
Let us assume that we have a sample file with four rows. Each row has a two-byte key
field; the first row has a second field with ten bytes; the structure of the second and third
rows is the same and comprises two additional fields with three bytes each; the last row
has a second field with five bytes:
AA1234567890
BBABCABC
BBXYZXYZ
CC12345
The configuration for the conversion could look like this:
Module Configuration
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 StructPlain2XML
Plain2XML xml.processFieldNames fromConfiguration
Plain2XML xml.documentName MyDocument
Plain2XML xml.documentNamespace http://xi.com/test
Plain2XML xml.recordsetName MyRecordset
Plain2XML xml.recordsetStructure NameA,1,NameB,*,NameC,1
Plain2XML xml.keyFieldName MyKey
Plain2XML xml.keyFieldType CaseSensitiveString
Plain2XML xml.NameA.fieldNames MyKey,field-nameA
Plain2XML xml.NameA.fieldFixedLengths 2,10
Plain2XML xml.NameA.keyFieldValue AA
Plain2XML xml.NameB.fieldNames MyKey,field-nameB1,field-nameB2
Plain2XML xml.NameB.fieldFixedLengths 2,3,3
Plain2XML xml.NameB.keyFieldValue BB
Plain2XML xml.NameC.fieldNames MyKey,field-nameC
Plain2XML xml.NameC.fieldFixedLengths 2,5
Plain2XML xml.NameC.keyFieldValue CC
In xml.recordsetStructure, you add a name for each different structure followed by the
number of occurrences or an asterisk for unbounded occurrences. For each structure
name, you configure the structure separately in a separate namespace such as
xml.NameA.fieldNames and so on.
If your source file is a CSV file, replace each xml.XXX.fieldFixedLengths with
xml.XXX.fieldSeparator.
the result of this conversion looks like this:
<ns:MyDocument xmlns:ns="http://xi.com/test">
<MyRecordset>
<NameA>
<MyKey>AA</MyKey>
<field-nameA>1234567890</field-nameA>
</NameA>
<NameB>
<MyKey>BB</MyKey>
<field-nameB1>ABC</field-nameB1>
<field-nameB2>ABC</field-nameB2>
</NameB>
<NameB>
<MyKey>BB</MyKey>
<field-nameB1>XYZ</field-nameB1>
<field-nameB2>XYZ</field-nameB2>
</NameB>
<NameC>
<MyKey>CC</MyKey>
<field-nameC>12345</field-nameC>
</NameC>
</MyRecordset>
</ns:MyDocument>
Regards,
Vinod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.