on 03-22-2006 10:58 PM
Hi
I am passing an xml file to an interface and in the text if there are some special characters like &, I am getting
"Whitespace is not allowed at this location. Error processing resource " error. If flat file, content conversion is needed..what should be done for xml files as input - how do we escape the special characters...any help is greatly appreciated
thanks
Thilothama
Hi Thilothama,
I dint understand the Scenario you are trying to do....
anyways if you wanna do content conversion at the sender end that is you wanna covert flat file into xml file then pls go throught the information given below:
While doing content conversion you have to mention the field names in header of data type: fieldNames. Hence if the key field is not present it will throw an error in adapter monitoring, FIELD NOT FOUND.
To make note mapping cannot be performed with a flat file as XI understands only XML. Hence content conversion required.
Please go thru these links for step by step procedure to do the same:
<a href="/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30 to send a flat file with various field lengths and variable substructures to XI 3.0</a>
<a href="/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter">How to send a flat file with fixed lengths to XI 3.0 using a Central File Adapter</a>
<a href="/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file">Content Conversion (Pattern/Random content in input file)</a>
<a href="http://help.sap.com/saphelp_erp2005/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm">Converting File Content in the Sender Adapter</a>
Now if it is that you wanted to covert the xml structure to flat file at the receiver end, then please go through the information below:
<a href="/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion Receiver with Content Conversion</a>
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm">Converting File Content in the Receiver Adapter</a>
Regards,
abhy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check whether the value in file is valid for the corresponding XSD type of the element. Eg. you may be trying to assign a text with spaces to a number type.
Since the field value is enlosed in an XML tag there is nothing like an enclosureSign as you have it in content conversion.
In one of my previous interfaces, I had material text with spaces as the value in XML file. And I did not face any problem.
So double check the message type. Another way is to ensure that ur input XML is well formed, try and put this XML file in the mapping test environment where this message is used.
praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tested the message from the message mapping - in tabular tree view, when I give &, it gets replaced by & and test is successful. But when I hardcode the input in source code view, and switch to tabular tree view, i get xml not well-formed popup error. I am getting parser exception while testing it.
Similarly when I test from HTTP client, the & does not get replaced by & Do we need to do anything in mapping or in Datatype to avoid these problems? Or we have to replace & by & in al the places for testing??
WHen the real message comes in, will it get replaced???
Hi Thilothama,
I think just for testing the scenario you are using the HTTP Client :)... and in real case some other system might be sending the XML to XI thru HTTP adapter.
The XML which is to be given in the Payload area of the client should be a well formed XML so & should be changed with &
But in real case it is not needed.
Regards
Suraj
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.