Forum Discussion
Ya. This would be fine. I haven't thought like this. Thank you I will check now.
My JDBC response is like below
<Results>
<ResultSet fetchSize="10">
<Row rowNumber="1">
<V_OBJ_ID>6455a073-29b0-4261-a310-a99b89ef57bb</V_OBJ_ID>
<V_OBJ_CODE>TEST_TYPE_5</V_OBJ_CODE>
<N_VERSION>1</N_VERSION>
<V_AUTH_STATUS>D</V_AUTH_STATUS>
</Row>
</ResultSet>
</Results>
But when I use
def DBholder = groovyutils.getXmlHolder("JDBC RequestForDatabase#ResponseAsXml")
assert DBholder.V_OBJ_ID == json.payload.id
I am getting the below error. there is no value for DBholder.V_OBJ_ID
com.eviware.soapui.support.XmlHolder@66fa28 (toString() threw java.lang.NullPointerException) error at line: 27
Sorry, I had forgotten that XmlHolder is based on XPath. So it would be more like this:
assert DBholder["/Results/ResultSet/Row[@rowNumber=1]/V_OBJ_ID"] == json.payload.id