on 08-17-2006 11:55 AM
Hi all,
I have the following xml:
<?xml version="1.0" encoding="UTF-8"?>
<ns:PayLinkV1 xmlns:ns="urn:basf:sa:fi:cash">
<payRecord>
<recType>PAY</recType>
<countryCode>032</countryCode>
...
<payFlag />
<filler />
<invoice>
<recType>VOI</recType>
<countryCode>032</countryCode>
...
<description>0001A0000GAL1</description>
<filler />
</invoice>
<invoice>
<recType>VOI</recType>
<countryCode>032</countryCode>
...
<description>0001A0000GAL2</description>
<filler />
</invoice>
</payRecord>
<payRecord>
<recType>PAY</recType>
<countryCode>032</countryCode>
...
<payFlag />
<filler />
<invoice>
<recType>VOI</recType>
<countryCode>032</countryCode>
...
<description>0001A0000CIT3</description>
<filler />
</invoice>
<invoice>
<recType>VOI</recType>
<countryCode>032</countryCode>
...
<description>0001A0000CIT2</description>
<filler />
</invoice>
</payRecord>
<trailer>
<recType>TRL</recType>
<qtyTransaction>000000000000000</qtyTransaction>
<qtyAmount>000000000000000</qtyAmount>
<qtyRec>000000000000000</qtyRec>
<qtyRecNo>000000000000000</qtyRecNo>
<filler />
</trailer>
</ns:PayLinkV1>
I need to convert it in one text file with this layout:
fields of payrecord
fields of invoice
fields of invoice
...
fields of payrecord
fields of invoice
fields of invoice
...
fields of trailler
In may file conversion type has the following configuration:
Recordset structure: payRecord,invoice,trailer
payRecord.fieldFixedLengths: 3,3,10,6,3...
invoice.fieldFixedLengths: 3,3,10,15...
trailer.fieldFixedLengths: 3,15,15...
But in the file adapeter occurs one error with this configuration.Anybody have an ideia to do it?
thanks!
Hi!
What exactly is the error message?
Regards, Joerg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The message error in Adapter monitoring is:
Last message processing started 19:46:36 2006-08-16, Error: Message processing failed with java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value 'VOI')', probably configuration error in file adapter (XML parser error)'
I did file content conversion. I enclosed my message with a root in xml. Then my Recordsetstructure looks like
row,payRecord,invoice,trailer.
The following worked for me. I just modified my example for you with your values:
root.fieldSeparator:'0x0D''0x0A'
payRecord.addHeaderLine: 0
payRecord.fieldFixedLengths:3,3,10,15...
payRecord.fixedLengthTooShortHandling Ignore
payRecord.endSeparator '0x0D''0x0A'
invoice.addHeaderLine: 0
invoice.fieldFixedLengths:3,3,10,15...
invoice.fixedLengthTooShortHandling Ignore
invoice.endSeparator '0x0D''0x0A'
trailer.addHeaderLine: 0
trailer.fieldFixedLengths:3,15,15...
trailer.fixedLengthTooShortHandling Ignore
trailer.endSeparator:'0x0D''0x0A'
Also check the number of columns you have in your fieldFixedLengths and in the xml.
Regards
Venkat
User | Count |
---|---|
90 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.