Support Article
Invalid clipboard stream error sending multipart file
SA-38259
Summary
User developed a REST integration with an external system in order to send metadata and file content using multipart.
The external system receives correctly the attached file but the following exception is raised anyway:
Error Messages
Caught unexpected exception mapping inbound data: Invalid clipboard stream detected in module com.pega.pegarules.data.internal.clipboard.XMLStream.newStream(String, StorageStream). Reason: sax parse error: Content is not allowed in prolog
Steps to Reproduce
Use Connect REST to send file attachment with multi part.
Root Cause
An issue in the custom application code or rules as having single string value sent back, one must use single property to map the response value. Mapping to a single-value property is the correct mapping for a simple string value response.
Mapping it to an embedded page property implies that the string value can be expanded in some way that produces a clipboard page full of data.
The code implicitly assumes that the string is XML unless user explicitly change the Map To value to JSON, which would not work in this case either.
Resolution
Perform the following local-change:
Map response to single property.
Published July 6, 2017 - 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.