Forum Discussion
apoorva
16 years agoOccasional Contributor
Hi Ole,
Thanks for your reply... But I want to replace with specific value, not random one and I write following script to do this
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( "Request 1#Response" )
holder.namespaces["ns"] = "http://sidmgmt.com/xsd"
def res = holder.getNodeValue( "//ns:results" )
def ret = groovyUtils.getXmlHolder(res)
ret.namespaces["ns1"] = "http://service.bds.com/xsd"
def codevalue = ret.getNodeValue( "//ns1:code" )
ret.setNodeValue("//ns1:code", "400") //not sure
I got following error
com.eviware.soapui.impl.wsdl.mock.DispatchException: Failed to dispatch using script; java.lang.NullPointerException
Can you please suggest whats the suggested argument value in getXmlHolder to get access to mockResponse..
Thanks,
Jim
Thanks for your reply... But I want to replace with specific value, not random one and I write following script to do this
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( "Request 1#Response" )
holder.namespaces["ns"] = "http://sidmgmt.com/xsd"
def res = holder.getNodeValue( "//ns:results" )
def ret = groovyUtils.getXmlHolder(res)
ret.namespaces["ns1"] = "http://service.bds.com/xsd"
def codevalue = ret.getNodeValue( "//ns1:code" )
ret.setNodeValue("//ns1:code", "400") //not sure
I got following error
com.eviware.soapui.impl.wsdl.mock.DispatchException: Failed to dispatch using script; java.lang.NullPointerException
Can you please suggest whats the suggested argument value in getXmlHolder to get access to mockResponse..
Thanks,
Jim
Related Content
- 7 months agonado