Hi All,
We have a requirement to consume JSON based Web API in AX 2012 R3. I am new to this requirement and with the help of some posts I tried to use the below sample code by executing in a Job in X++.
RetailWebRequest request;
RetailWebResponse response;
str rawResponse;
Map responseData;
str responseValue;
RetailCommonWebAPI webApi = RetailCommonWebAPI::construct();
request = RetailWebRequest::newUrl("echo.jsontest.com/.../Clark");
response = webApi.getResponse(request);
rawResponse = response.parmData();
responseData = RetailCommonWebAPI::getMapFromJsonString(rawResponse);
responseValue = responseData.lookup("Kent");
info(strFmt("Element name: %1", responseValue));
However, I could not get any response. Can anyone please help me on this?
Regards
Ana
*This post is locked for comments