Forum Discussion
krenevla
14 years agoContributor
Hello,
Groovy did the job for me, thanks for help. It's a pity there is missing function for adding elements in property transfer anyway.
Because there is so little documentation around, I'll post my groovy here.
It will add new element from other source to the request
Groovy did the job for me, thanks for help. It's a pity there is missing function for adding elements in property transfer anyway.
Because there is so little documentation around, I'll post my groovy here.
It will add new element from other source to the request
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def child = groovyUtils.getXmlHolder("getMeterAsset - LITE2#Response")
def holder = groovyUtils.getXmlHolder("updateMeterAssetGroup - LITE#Request")
def node = holder.getDomNode("//meterAssetGroup/meterAssets")
node.appendChild(node.getOwnerDocument().importNode(child.getDomNode("//meterAsset"), true))
holder.updateProperty()