how to replace entire parent node in request xml
- 9 years ago
thank you rao.
I treid for long but figured out that i can dom object. Below code wored.
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context);
def namespace = "http://pos.odc.vzwcorp.com";
def holder = groovyUtils.getXmlHolder("Get Edge Installment Device#Request");
def npanxxholder =groovyUtils.getXmlHolder("Npanxx Lookup Call#Request");
holder.namespaces["ns1"] = namespace;
npanxxholder.namespaces["ns1"] = namespace;use (groovy.xml.dom.DOMCategory){
for( node in npanxxholder.getDomNodes( "//ns1:orderKeyInfo")) {
node.children().each { child ->
childname=child.name()
childtext=child.text()
log.info child.name()
log.info child.text()
//log.info "//ns1:"+"$childname"
holder.setNodeValue("//ns1:"+"$childname",child.text())
holder.updateProperty()
}
}}