Forum Discussion

yuwaan's avatar
yuwaan
New Contributor
14 years ago

Parsing the response but showing null any help ????

For a test step it is working fine but when am trying to parse the response from a diff test step it is showing

Wed Apr 04 13:31:31 IST 2012:INFO:null
Wed Apr 04 13:31:31 IST 2012:INFO:[Ljava.lang.String;@319897d4

Code is
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder("createUser#response")
log.info holder.getNodeValue("//codeMajor")
log.info holder['//codeMajor']

when am trying to use this code for a diff test step say

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder("getStatus#response")
log.info holder.getNodeValue("//codeMajor")
log.info holder['//codeMajor']

in both test steps only diff is XMLHolder so for first code block it is showing null null and only null but for the second block it is parsing the exact response. In both cases my node value is the same. Please help me
No RepliesBe the first to reply