Question

3
Replies
486
Views
MADHUMITA Member since 2009 2 posts
Cognizant Technology Solutions
Posted: 3 years ago
Last activity: 3 years 5 months ago
Closed

I need to establish a REST service connection through Connect HTTP

Hi,

In 6.1 sp2 I need to establish a REST service connection through Connect HTTP. I need to send request in JSON format and parse it from JSON to clipboard. I tried below code but not able to save, it is failing

in compilation getting error like getJson() function is not defined in Clipboard page API. So my question is, to use below method which class/JAR I can import in Pega 6.1 SP2 . Is it anyway possible to use

these below methods in pega 6.1 sp2.

Clipbaord to Json format:

PublicAPI tools = (PegaAPI) ThreadContainer.get().getPublicAPI();
ClipboardPage stepPage = tools.getStepPage();
String returnValue = stepPage.getJSON(false);
ResultJson = returnValue;

Json to clipboard

ClipboardPage responseData = tools.createPage("$ANY", "TestDataPage");

responseData.adoptJSONObject(JSONResp);

Regards

Madhumita

***Updated by Moderator: Marissa to branch this comment off of this thread***

Data Integration
Moderation Team has archived post
Share this page LinkedIn