Below is input request that I have saved in the Request variable and saved the response string in the ResponseString variable. Now I need to replace the ResponseString variable value with Payload element value in the input request, please refer to the below request for reference. All helps are much appreciated!
var Request = apim.getvariable('originalRequest');
var ResponseString = 'DataIndex_12345';
Input Request:
<soap:Envelope xmlns:or="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<or:Request>
<Sender>Mark</Sender>
<Receiver>Steve</Receiver>
<Payload>Data</Payload>
</or:Request>
</soap:Body>
</soap:Envelope>
Expected Output Request:
<soap:Envelope xmlns:or="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<or:Request>
<Sender>Mark</Sender>
<Receiver>Steve</Receiver>
<Payload>DataIndex_12345</Payload>
</or:Request>
</soap:Body>
</soap:Envelope>