Monday 6 August 2012

Groovy script to save the output XML Response - SOAP UI

Groovy script to save the output XML Response - SOAP UI

Below code can added in Groovy script after the SOAP Request  Step in a Groovy Script.
This will save the Request Response in the below mentioned location.


def outputFile = "D:/IA2Tech/response.xml"
def response = context.expand( '${TestRequest- Request 1#Response}' )
def of = new File(outputFile)
of.write(response, "UTF-8")

No comments:

Post a Comment