Support Article
REST issue when sending message body as binary
SA-28725
Summary
Users experience an issue when sending a message body as binary in a REST service call.
Error Messages
Not Applicable
Steps to Reproduce
- Create a test activity.
- Set the test activity to send message body.
- Call the REST service.
Root Cause
A defect in Pegasystems’ code or rules
This version of Pega (Pega 7.1.9) does not support binary request bodies as a Pega-provided feature. Support for binary request bodies was made available in Pega 7.3 for POST and in Pega 8.1 for all HTTP verbs.
Resolution
Best practice: Update or upgrade to the latest Pega Platform release, including the latest Pega Platform Patch Release.Alternative
If you cannot update or update your deployment of Pega, perform the following local-change:
In Step 5 of the activity pyInvokeRESTConnector, update the mData setting as shown in the following code snippet:
//mData = messageData.getBytes(); --> Old code
mData = Base64Util.decodeToByteArray(messageData); --> Updated code
Published February 5, 2019 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.