Forum Discussion
ThomasAu
15 years agoContributor
deepesh.jain wrote: You don't need the property transfer step. You only need directly a properties step or directly soap step.
You can use groovy step to populate the xml tag in soap step or property in properties step.
This is how you can do it assuming your second SOAP step is named as SOAP_2:// say in your groovy step you have guid stored in [b]sourceGuid[/b].
def gUtils = new com.eviware.soapui.support.GroovyUtils( context );
def holder = gUtils.getXmlHolder("SOAP_2#Request");
holder.setNodeValue("YOUR_XPATH_HERE",sourceGuid);
holder.updateProperty();
Regards,
Deepesh Jain
Or, in your old example, can I put the guid directly into my properties file using groovy?
for (i in 1..Integer.parseInt(totalcount))
{
def name1 = holder.getNodeValue("//node1/node2[i]/name") ;
def guid1 = holder.getNodeValue("//node1/node2[i]/guid") ;
if (name1 == "ABC")
{
//insert value of guid1 into #property_file#${guid} (i don't know the syntax, can you help me?)
}
}