Forum Discussion
max1965
12 years agoContributor
I write the following groovy script:
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def response = context.expand( '${searchRequest APT NAKED#Response}' ) //searchRequest APT NAKED is the step name
def holder = groovyUtils.getXmlHolder( response )
def cdata = holder.getDomNode('//response/text()').nodeValue
def holder2 = groovyUtils.getXmlHolder( cdata )
def id = holder2.getDomNode('//spml:id/text()').nodeValue
log.info id
The id value is correctly extract from soap response:
Wed Feb 13 13:51:58 CET 2013:INFO:0802100000
I don't know how the script should be modify to extract the errorCode value ?
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def response = context.expand( '${searchRequest APT NAKED#Response}' ) //searchRequest APT NAKED is the step name
def holder = groovyUtils.getXmlHolder( response )
def cdata = holder.getDomNode('//response/text()').nodeValue
def holder2 = groovyUtils.getXmlHolder( cdata )
def id = holder2.getDomNode('//spml:id/text()').nodeValue
log.info id
The id value is correctly extract from soap response:
Wed Feb 13 13:51:58 CET 2013:INFO:0802100000
I don't know how the script should be modify to extract the errorCode value ?
Related Content
Recent Discussions
- 2 days ago