Forum Discussion
donaldngo
15 years agoOccasional Contributor
Can you declare the namespace in the groovy script as well?
For example how would I declare ns1?
groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );
holder = groovyUtils.getXmlHolder("create a TSA user#ResponseAsXml");
context.accountId = holder.getNodeValue( "//ns1:user[1]/accountId[1]");
context.tenantId = holder.getNodeValue( "//ns1:user[1]/tenantId[1]");
For example how would I declare ns1?
groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );
holder = groovyUtils.getXmlHolder("create a TSA user#ResponseAsXml");
context.accountId = holder.getNodeValue( "//ns1:user[1]/accountId[1]");
context.tenantId = holder.getNodeValue( "//ns1:user[1]/tenantId[1]");