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

Inbound map error for Rest service parsing JSON request

SA-25744

Summary



User is on Pega 7.1.6 and they have a REST service that parses JSON.

When attempting to execute the REST service, Pega throws exception 'Inbound data mapping failed'. They were attempting to parse a JSON request as shown below: 


{ "traceId" : "Test" }
 


Error Messages



REST service [RESTServicePackageJson][REST][RESTServiceJson] failed:Inbound data mapping failed


Steps to Reproduce

  1. Create Rest service using HTTP Post method. 
  2. Configure Service-REST request tab with JSON mapping
  3. Map the request to Clipboard Page. 
  4. Run Service-REST, pass JSON input and check the log for errors.


Root Cause



An issue in the custom application code or rules is identified as root cause of the issue. For the JSON request, user was passing the actual property. One must pass the embedded page property in the JSON request.

Resolution



Perform the following local-change to resolve the issue:
 
  1. Add the embedded page to the JSON request used for parsing. An example is shown below:
{ "EmbededPage" : { "traceId" : "Test" } }
 
        2.  In the "Map to Key" and "Map from Key" fields present in POST request and response tab, reference a page or page list property type.
             An example is shown below where "requestpage" and "responsepage" are configured as single page properties.

 
     

Published July 26, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

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

Did you find this content helpful?

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