Scripts
Response Level
-
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
-
def holder = groovyUtils.getXmlHolder( mockRequest.requestContent )
-
-
def username = holder.getNodeValue("/soap:Envelope/soap:Body/ic:requestSOAEndpointsMessage/ic:Credentials/ic:Username")
-
-
//if ( username == "weblogic") return "Response1"
-
if ( username.equals("weblogic")) return "Response1"
-
-
return "BadUserNamePassword"
Script Level
Creates a context that can be referred to in response as ${suppliedInput}
-
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
-
def holder = groovyUtils.getXmlHolder( mockRequest.requestContent )
-
-
def input = holder.getNodeValue("/soap:Envelope/soap:Body/ic:requestSOAEndpointsMessage/ic:Input")
-
-
context.setProperty("suppliedInput",input )
RJM Article Type
Work Notes