sprocketx33
16 years agoOccasional Contributor
Problems trying to set values in groovy script
I'm trying to set property values using a grouvy script without success. I don't get an error just the values don't get changed. Below is the script I'm using. Being new to Soapui etc I'm not sure if I'm missing something or if this is a known issue.
##############################################
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
log.info( groovyUtils.projectPath )
def holder = groovyUtils.getXmlHolder( "listDocuments#Response" )
def holder2 = groovyUtils.getXmlHolder( "addFromDocumentsCaseData#Request" )
for (handle in holder.getNodeValues( "//ns1:listDocumentsResponse/documents/handle" ))
holder2.setNodeValue( "//ws:addFromDocuments/srcDocumentHandleList", handle ))
Thanks
Keith
##############################################
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
log.info( groovyUtils.projectPath )
def holder = groovyUtils.getXmlHolder( "listDocuments#Response" )
def holder2 = groovyUtils.getXmlHolder( "addFromDocumentsCaseData#Request" )
for (handle in holder.getNodeValues( "//ns1:listDocumentsResponse/documents/handle" ))
holder2.setNodeValue( "//ws:addFromDocuments/srcDocumentHandleList", handle ))
Thanks
Keith