Handle apostrophe (') in xml response of REST Api call
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 10:30 PM
Hello All,
We have SSIS packages with which we are doing GET call to servicenow REST API and the source produces JSON as result.
The issue we are having is whenever any value with apostrophe appears json result is getting distrubed.
For e.g if value of location column is as below:
"location":{
"display_value":"ABCDFG'S " } the JSON gets distubed and eventually error out as below
"error":{"message":"Transaction cancelled: maximum execution time exceeded","detail":"maximum execution time exceeded Check logs for error trace or enable glide.rest.debug property to verify REST request processing"},"status":"failure"}
Please let me know how this can be handled.
Thanks in advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 10:33 PM - edited 02-18-2024 10:35 PM
HI @Supriya39
Please follow thread it will be helpful
How to read XML server response
how-to-parse-xml-response-from-api
Please mark reply as Helpful/Correct, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 10:36 PM - edited 02-18-2024 10:43 PM
Check this article
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0748767
Use this method
setStringParameterNoEscape(String name, String value).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 10:42 PM
Actually we are using a REST API tool from Task Factory and not using any javascript. I Wanted to check if from source this can be handled?