Raw Response: custom service response format Follow
JavaScript services have the ability to return the response 'as-is', without adding the standard ServiceManager ResponseWrapper:
{
"success": true,
"Response": {
"myServiceSuccess": true,
"myServiceElements": {},
"myServiceMessage": {
"Error": "",
"PopupMessages": "",
"StatusBarMessages": ""
}
}
}
To enable Raw Response, go to: (JavaScript service) > Advanced Details > Raw Response: <checked>.
Now you can write anything in the return statement of your JavaScript code (it doesn't have to be JSON object anymore). For example:
return "<customer><id>434</id><name>Jessie</name></customer>I am big elephant";
When running the service, the response will be returned 'as-is' - it doesn't have to be valid by any standard or structure:
<customer><id>434</id><name>Jessie</name></customer>I am big elephant
Comments
0 comments
Please sign in to leave a comment.