kkiran11
16 years agoNew Contributor
Save the Raw XML of the Request and Response of the SOAP UI
Hi,
I am using the following code to save the request and the response in the XML file. It works fine but I want to save the Raw data instead of the XML. how can I do this.
def testRequest = testRunner.testCase.testSteps["Create"].testRequest
def file = new PrintWriter("C:/Request.xml")
log.info(testRequest.response.contentAsString)
file.println( testRequest.requestContent )
file.println( "==============End of Request=============")
file.println( testRequest.response.contentAsString )
file.flush()
file.close()
This code saves the XML Request and Response, but I want to Save the Raw Data in the File.
Regards,
Kiran K
I am using the following code to save the request and the response in the XML file. It works fine but I want to save the Raw data instead of the XML. how can I do this.
def testRequest = testRunner.testCase.testSteps["Create"].testRequest
def file = new PrintWriter("C:/Request.xml")
log.info(testRequest.response.contentAsString)
file.println( testRequest.requestContent )
file.println( "==============End of Request=============")
file.println( testRequest.response.contentAsString )
file.flush()
file.close()
This code saves the XML Request and Response, but I want to Save the Raw Data in the File.
Regards,
Kiran K