Forum Discussion

coolguy18aoe's avatar
coolguy18aoe
New Contributor
14 years ago

How to modify the xml on onRequestscript() in SOAP UI

Here is my code which 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 changes my XML entirely... I want to modify an existing XML(something.xml)..

i was actually Not able to modify the xml so i thought of changinf the xml instead.But according to my business logic its wrong... So can any one help me to modify the xml
in onRequestscript....
No RepliesBe the first to reply