Forum Discussion

soapuitoudaya's avatar
soapuitoudaya
New Contributor
5 years ago

How to extract paramtered request xml in soap ui

Hi Team, 

 

We are trying to copy xml from one request to another. where as we need to copy the paarmeterized text. 

Using below code we are trying to copy the request from AddOriginal to AddActual

 

import groovy.xml.*
import groovy.util.XmlParser
import com.eviware.soapui.support.GroovyUtils

def request =context.expand('${AddOriginal#Request}')

def grUtils = new com.eviware.soapui.support.GroovyUtils(context)

def TargetTestcase=testRunner.testCase
TargetTestcase.getTestStepByName("AddActual").setPropertyValue('request',request)

def ReqHolderActual = grUtils.getXmlHolder("AddActual#Request")
ReqHolderActual.removeDomNodes('//tem:intA')
ReqHolderActual.updateProperty()

 

Code was able to get only hard code values, but actually we need Parameterized values, is it possible?

${intB}  is not coming :( Verified the same with hard coded values and its working. 

No RepliesBe the first to reply