Question
I am currently trying to obtain data using [Network] -> [REST] -> [Execute GET] operation.
When the response data is JSON format, the following error occurred.
c1359bec-1c89-4ac9-b5cd-1bbacf54a3d5,end,operation,bd1f15f9-ae91-417a-b4c7-464f56af33a8,p045163bc-089c-46dc-a9c9-be942f951b45, Integrate_Project,REST0000E,com.appresso.ds.script.runtime.ComponentFailedException: [[API data acquisition (network/REST/GET execution)]] failed. Cause: [com.appresso.ds.common.xmlfw.xml.InvalidXMLContentException: An invalid character was found while creating the XML document. The character (Unicode: 0xf) does not conform to the character ([2] Char) as defined by the XML Recommendation].
- I assume that this error occurred because the response data obtained contained characters that are not available in XML, is this correct?
- What characters may cause this error? Is there a list of them?
- Is there any other workaround than using Remove Invalid XML Characters operation?
- How Remove Invalid XML Characters operation removes invalid characters?
Answer
- As your assumption, the error is output because the response data obtained contains invalid characters as XML element content.
In Execute Get operation of the REST connector, data is converted to XML format and output in the result data if the response body is JSON format.
- Excel connector's invalid characters comply with the XML Recommendations of W3C, which defines the XML specifications.
For details of the XML Recommendation, please refer to the following page.
2.2 Characters section describes about characters in XML.
Extensible Markup Language (XML) 1.0 (Fifth Edition)
https://www.w3.org/TR/xml/
- You can avoid error by not including invalid characters in the input data or replace them in advance, in reference to the XML recommendation.
- Remove Invalid XML Characters operation removes only invalid characters, and the rest of the data will be filled in.
e.g.) ABC < invalid characters> EDFG → ABCDEFG
Supplementary information
Remove Invalid XML Characters
https://www.hulft.com/help/en-us/HULFTSquare/Content/Designer/Connector/char_remove_Invalid_XML_Char.htm
Comments
0 comments
Article is closed for comments.