kvedula
15 years agoOccasional Contributor
Issue with cloning of Test Request XML Node
Hi,
I am trying to clone the Test Request - XML Node to create a exact copy of exisitng node including the values.
In actual, it is not cloning the node that should create a copy of below xml node and save it in test request xml as another child with same
copy and values
"<req:Child1>
<req:Child1Value>${DataSource#Value}</req:Child1Value>
</req:Child1>"
Groovy Scripts Used is
****************
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( "TestRequest#Request" )
def node = holder.getDomNode( "//req:Child1" ).cloneNode(true)
node.cloneNode(true)
holder.updateProperty()
Test Request XML is
****************
<soapenv:Body>
<req:Test1>
<req:Header>
<req:Child1>
<req:Child1Value>${DataSource#Value}</req:Child1Value>
</req:Child1>
</req:Header>
</req:Test1>
</soapenv:Body>
I am trying to clone the Test Request - XML Node to create a exact copy of exisitng node including the values.
In actual, it is not cloning the node that should create a copy of below xml node and save it in test request xml as another child with same
copy and values
"<req:Child1>
<req:Child1Value>${DataSource#Value}</req:Child1Value>
</req:Child1>"
Groovy Scripts Used is
****************
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( "TestRequest#Request" )
def node = holder.getDomNode( "//req:Child1" ).cloneNode(true)
node.cloneNode(true)
holder.updateProperty()
Test Request XML is
****************
<soapenv:Body>
<req:Test1>
<req:Header>
<req:Child1>
<req:Child1Value>${DataSource#Value}</req:Child1Value>
</req:Child1>
</req:Header>
</req:Test1>
</soapenv:Body>