Here is my code that I wrote in onRequestscript
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) path = "D:\\Service\\something2.xml"; log.info("path = "+ path); if (mockRequest.method == "POST" ) { mockRunner.returnFile( mockRequest.httpResponse, new File(path)) return new com.eviware.soapui.impl.wsdl.mock.WsdlMockResult(mockRequest) }
But this script completely changes my XML ... I want to change the existing XML (something.xml) ..
i actually could not change xml, so I thought about changing xml instead. But according to my business logic, this is wrong ... So can anyone help me change the xml in onRequestscript ....
Xml like
<Something> <Data1> <value>100</value> <Data1> <Data2> <value>200</value> <Data2> </Something>
for modified type
<Something> <Data1> <value>101</value> <Data1> <Data2> <value>201</value> <Data2> </Something>
source share