on 11-02-2007 3:05 PM
Hello,
I have Async. File receiver scenario in which the following is the XML message structure. This is received by the file adpater.
<ns1:MT_Info_File xmlns:ns1="urn:http://freemanco.com/xi/info_list">
<TYPE>
<FileItem>
<FileName>DD11022007</FileName>
</FileItem>
</TYPE>
<DATA>
<LineItem> <LineEntry>234567891234567890123456789012345678901234567890</LineEntry>
</LineItem>
<LineItem>
<LineEntry>95473523647586969587265245437586979798376524253586</LineEntry>
</LineItem>
<DATA>
<LineItem</ns1:MT_Info_File>
<u><b>I want to write only folowiing DATA structure to file. I do not want to wite contents of TYPE structure</u>
<DATA>
<LineItem> <LineEntry>234567891234567890123456789012345678901234567890</LineEntry>
</LineItem>
<LineItem>
<LineEntry>95473523647586969587265245437586979798376524253586</LineEntry>
</LineItem>
<DATA></b>
In the receiver file adpater I have follwoing <u><b>File content conversion parameters</b></u>.
RecordSetStructure: DATA,LineItem,*
*.addHeaderLine 0
*.fieldFixedLengths 301
*.fixedLengthTooShortHandling Error
*.endSeparator nl
LineItem.fieldSeparator nl
DATA.fieldSeparator nl
While testing I got following error. Looks like it is expecting some values for FileItem element in the XML.
<b>Error</b> Attempt to process file failed with java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'FileItem' found in document', probably configuration error in file adapter (XML parser error)'
<b>Error</b> MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'FileItem' found in document', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'FileItem' found in document', probably configuration error in file adapter (XML parser error)'
<b>Error</b> Exception caught by adapter framework: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'FileItem' found in document', probably configuration error in file adapter (XML parser error)'
<b>Error</b> Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'FileItem' found in document', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'FileItem' found in document', probably configuration error in file adapter (XML parser error)'.
How to resolve this issue? I appreciate your help.
Thank you,
Balaji
Balaji,
i dont understand... the structure on the top - is it the source file?
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Balaji, it is not possible with this target structure!
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Balaji,
I would suggest to remove FileItem and LineItem in your receiver datatype. They are increasing the hierarchy of your content conversion. If you do that then you will have
<ns1:MT_Info_File xmlns:ns1="urn:http://freemanco.com/xi/info_list">
<TYPE>
<FileName>DD11022007</FileName>
</TYPE>
<DATA><LineEntry>234567891234567890123456789012345678901234567890</LineEntry>
<LineEntry>95473523647586969587265245437586979798376524253586</LineEntry>
<DATA>
</ns1:MT_Info_File>
Then in content converstion give this parameters:
Record structure : TYPE,FileName,DATA,LineEntry
TYPE.fieldfixedlengths : 0
FileName.fieldfixedlenghts:0
DATA.fieldfixedlenghts:0
LineEntry.fieldfixedlengths:301
LineEntry.endSeparator:'nl'
Then it should work. Also you can use FileName in your variable substituition. Also please see this weblog on how to use FileName in variable substitution:
/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
If you dont want to remove FileItem and LineItem then add these also in your content conversion. Then the parameters would be:
Recordset: TYPE,FileItem,FileName,DATA,LineItem,LineEntry
TYPE.fieldfixedlengths : 0
FileItem.fieldfixedlengths:0
FileName.fieldfixedlenghts:0
DATA.fieldfixedlenghts:0
LineItem.fieldfixedlengths : 0
LineEntry.fieldfixedlengths:301
LineEntry.endSeparator:'nl'
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Satish,
Thank you for the information, I have tried with your suggestions, I got following error.
Could not process due to error: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Column value 'DD11022007' too long (>0 for 0. column) - must stop', probably configuration error in file adapter (XML parser error)'
Looks like we are configuring FileName.fieldfixedlenghts:0, but FileName length is >0.
PLease let me know if you have any other thoughts.
Thank you,
Balaji
Hey,
You want content conversion for sender or for receiver?
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Satish,
I am looking for file content conversion on Receiver. The current situation is I want to write only part of XML payload. <u><b>I want to write following structure</b></u>
<DATA>
<LineItem> <LineEntry>234567891234567890123456789012345678901234567890</LineEntry>
</LineItem>
<LineItem>
<LineEntry>95473523647586969587265245437586979798376524253586</LineEntry>
</LineItem>
<DATA>
<u><b>I do not want to write content of</b></u>
<TYPE>
<FileItem>
<FileName>DD11022007</FileName>
</FileItem>
</TYPE>
Please look at original posting on how payload looks like.
Thank you,
Balaji
If you dont want to send content of TYPE field then dont map it to target. Your mapping program should contain mapping of only data part.
Data> LineItem>Line entry is complex structure.(You can check this in data type). I am not much sure that complex structure is possible with FCC or not.
Here consider Type as your first part and data is your second part. then you can add following FCC parameter.
Data.fieldNames
Data.fieldFixedLengths
Data.ProcessFieldNames
Data.LastFieldsOptional
Type.fieldNames
Type.fieldFixedLengths
Let me know the output.
-Gouri
Award points if useful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
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.