Hi ,
I have created a method inside my class file :
METHOD PUBLIC VOID getRequestData( INPUT ilcRequest AS LONGCHAR , OUTPUT myjsonObj AS LONGCHAR):
DEFINE VARIABLE vlOk AS LOGICAL NO-UNDO.
vlOk = TEMP-TABLE ttRequestParam:READ-JSON( "LONGCHAR", ilcRequest, "empty") NO-ERROR.
...
END METHOD.
I send a JSON input from Google's Advance REST Client Application to the above method
{
"ttRequestParam": {
"whereClause": " OrderNum = 1 ",
"className": "Order",
"tableName": "Order",
"ID": "Order"
}
}
But, I am not able to receive these values in ttRequestParam. If am doing the same thing from Progress 4GL client it works fine.
My input and output verb association is mentioned below. Where exactly do I need to map my input longchar variable ?
Awesome !!!. It working now. You made my day. Thanks a lot :-)
Hello,
The new screenshot shows that you are mapping ilcRequest to a parameter within the body, not the body per se.
Try mapping dragging the mapping line to the Body node instead of the within the parameter.
Take a look at the following screenshot to see how it looks like:
community.progress.com/.../image3.png
from the article:
community.progress.com/.../2190
If you map items as parameters rather than to the body, the you need to wrap the input in a request object and the output in a response object.
Please let me know how it goes.
Thanks.
Hello,
I think that for what you are trying to do, you would want to map your parameters to the body.
Also, the data that you are sending seems to be missing - - to indicate an array:
{
"ttRequestParam": [{
"whereClause": " OrderNum = 1 ",
"className": "Order",
"tableName": "Order",
"ID": "Order"
}]
}
I hope this helps.
Hello,
The new screenshot shows that you are mapping ilcRequest to a parameter within the body, not the body per se.
Try mapping dragging the mapping line to the Body node instead of the within the parameter.
Take a look at the following screenshot to see how it looks like:
community.progress.com/.../image3.png
from the article:
community.progress.com/.../2190
If you map items as parameters rather than to the body, the you need to wrap the input in a request object and the output in a response object.
Please let me know how it goes.
Thanks.
Awesome !!!. It working now. You made my day. Thanks a lot :-)