Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Error parsing response from REST service

SA-33260

Summary



The user is on Pega 7.2.1 and is not able to parse a REST response from the Service:


Error Messages



com.pega.pegarules.pub.services.InboundMappingException: Error mapping incoming response to .response_POST: org.codehaus.jackson.JsonParseException: Unexpected character ('' (code 65279 / 0xfeff)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.StringReader@5fbf866e; line: 1, column: 2]

or

** Error mapping incoming response to .response_POST: org.codehaus.jackson.JsonParseException: Unexpected character ('' (code 65279 / 0xfeff)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
at [Source: java.io.StringReader@19a6e597; line: 1, column: 2]


Steps to Reproduce

  1. Create a REST connector.
  2. Use POST method for calling the Service.
  3. Invoke the REST connector from an activity. We can see the connector failing while parsing the response received from the Service.


Root Cause



A defect or configuration issue in the operating environment is identified as root cause. The REST service is sending an additional dot prepended to the JSON response. Due to this reason the JSON response is not confirming to the JSON standard and Pega is failing to parse the message received from the REST service.

Resolution



Make the following change to the operating environment:
  1. Contact the team owning the REST Service to rectify the JSON response sent by the webservice to Pega.
Suggest Edit

Published February 3, 2017 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us