AnsweredAssumed Answered

Need to modify & pass a request argument to response JSON

Question asked by sourav.ganguly on Jun 19, 2018
Latest reply on Jun 20, 2018 by sourav.ganguly

Hi All,

 

I am trying to create a VS where the response uses one of its JSON element as a request arguements' modified value.

In my JSON request I am getting particular element with value as 2XXXXXXXXXXX.

 

In the response JSON we require the to use the same value as magic string in one element and 6XXXXXXXXXXX in another element.

 

Sample req:

{
    "Operation": {
        "requestHeader": {
            "activityName": "Operation",
            "senderURI": "Val1",
            "userid": "Val1",
            "security": "security",
            "requestTimestamp": "2016-02-10T07:45:43.38Z",
            "conversationID": "***:2yyyyy-77",
            "requestID": "***:2yyyyy-99"
        },
        "MACAddress": "2XXXXXXXXXXX"
    }
}

 

Response:

 

{
    "Operation": {
        "responseHeader": {
            "activityName": "Operation",
            "businessID": [],
            "messageID": [],
            "activityStatus": "SUCCESS",
            "requestTimestamp": "2016-03-16T17:21:45.634Z",
            "responseTimestamp": "2016-03-16T17:21:45.634Z",
            "conversationID": "***:2yyyyy-77",
            "requestID": "***:2yyyyy-99"
        },
        "success": {
            "MACAddress": "2XXXXXXXXXXX",
            "edVAMACAddress": "6XXXXXXXXXXX",
            "Key": "alphanumerickeyvalue"
        }
    }
}

 

Please suggest the approach to be followed to achieve this. Please let me know if any further details are required.

 

Thanks,

Sourav.

Outcomes