Send XML as String in Connect REST


I have a requirement asking a REST API with request as a string. And i have to send a XML in that string . So while sending XML in a string , i get the following error :

Invalid expression or reference: line 1:16 mismatched input '1.0' expecting {<EOF>, '-', '+', '=', '*', '/', '%', '<', '>', '<=', '>=', '==', '!=', '<>', '^=', '~=', '&&', '||', '?', '+=', '-=', '*=', '/=', '%='}

This is because Pega is considering second quote in XML as EOF and hence resulting a error.

Is there a way by which i can send a complete XML unparsed as String input to the REST api.

***Edited by Moderator: Lochan to update platform capability tags***


Keep up to date on this post and subscribe to comments

October 1, 2019 - 7:08am

To clarify, are you using Connect-REST or Service-REST? What is your Pega version? Please attach your rule configuration either way. A log file with full error stack will help us as well.

October 8, 2019 - 10:55pm
Response to KevinZheng_GCS

Hi Kevin,

I am using Connect-REST. Pega Version 7.2. 

I need to send an XML in .request.body_POST.Value String type property.( See screenshot attached)  and while doing so i get the mentioned error.

October 1, 2019 - 8:41am

How are you mapping your response? Are you using Map From - "XML Stream" and passing the prepared response stream?

October 8, 2019 - 11:02pm
Response to Abhinav_Chaudhary

Hi Abhinav,

I am sending an XML in a String property. See screenshot attached.