Forum Discussion
wraith77
15 years agoNew Contributor
I've put together this Groovy Script for the Mock Response.
My assumption is that if my script is correct, the property ${requestid} should be replaced with the value that's in the RequestID node of the request. However, in the response, the RequestID value is empty. I'm obviously doing something wrong. Help! :-)
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context)
def holder = groovyUtils.getXmlHolder(mockRequest.requestContent)
def id = String.valueOf(holder.getNodeValue("//ns:RequestID"))
context.setProperty("requestid", id)
My assumption is that if my script is correct, the property ${requestid} should be replaced with the value that's in the RequestID node of the request. However, in the response, the RequestID value is empty. I'm obviously doing something wrong. Help! :-)
Related Content
- 4 years agomehdisinger
Recent Discussions
- 6 days agoruchisingh