NewToSoap1
8 years agoOccasional Contributor
How to save a dynamic mock response content to local drive
Hi All,
I am having a dynamic mock response under mock service. I want to save its content to my local drive. Please help me or suggest a way.
<soapenv:Body>
<mes:ResponseMessage>
<mes:Header>${Header}</mes:Header>
</mes:ResponseMessage>
</soapenv:Body>
I am using the below code to save the content but it is not working. It is not resolving the "${Header}". Please help me about how to save this response.
def resContent = mockResponse.responseContent.toString().trim();
def file = new File(filePath);
file.write(resContent, "UTF-8");