on 09-22-2012 5:56 PM
Hello experts,
I need help for the following problem:
I read a text file via File Sender using Content Conversion. An XML will be generated. But this XML includes invalid files, and my mapping throws an exception:
The illegal character is:
<DOCUMENTTYPE>��Value2</DOCUMENTTYPE>
Runtime exception occurred during application mapping com/sap/xi/tf/_MM_PSTest_TO_IDOC_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0x0 (:main:, row:4, col:2~
How can I solve this issue, without using Java Mapping? I use as File Encoding UTF-8 for the File Sender.
Thanks for your support,
Erkan
Hi Erkan,
Either the sender has to remove those characters before sending the file or you need a java mapping before the message mapping to remove special characters. If you want to go with second alternative then please publish the exact ASCII value of the characters you want to remove from XML and the version of PI you are working in.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a byte order mark http://en.wikipedia.org/wiki/Byte_order_mark
It does not make sense in ISO-8859-1
Request a file without this BOM.
XSLT mapping would not help, as it would fail also.
Hi Erkan,
From your response , it seems you decided to remove the characters using mapping than request the sender to remove such characters before sending the files. In such case XSLT mapping will not help. you need a java mapping here. When I say ascii value of characters you can find it out by downloading this HEX editor http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm .
View the xml containing invalid characters using hex editor , you will get the ASCII values of characters you want to remove. Then you need a java mapping to actually remove the characters.
Regards
Anupam
Hello all,
thanks for you support. I will ask the provider to fix this file as Stefan Grube suggested.
Kind regards,
Erkan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Erkan,
Hope you have set the following for your file sender adapter :
1. Transfer Mode is set to Binary,
2. File Type Text,
3. Encoding ISO-8859-1( for Western European Latin ).
Your sender file after coming into Pi has XML encoding declaration 'UTF-8'.
Write a simple XSLT mapping to change the value of the attribute "encoding" to "ISO-8859-1" in the output XML of message mapping . Include this XSLT map as the second mapping step in your interface mapping.
First step in your interface mapping will be your already existing message mapping.
Please follow this doc http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79f...
Best Regards,
Sagarika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Ask your source side to correct the data with out any special charecters.
Regards,
Naveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The provider of the file has to fix it. An ascii 00 value is not allowed in a text file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.