Jack21Z
11 years agoOccasional Contributor
groovyUtils.getXmlHolder treat data as array of characters
Hi
Why the data is treat as array of characters rather than array of strings with 1 element, when 1 result returned?
Sample:
JDBC:
Groovy:
Actual:
Expected:
Regards,
Jack
Why the data is treat as array of characters rather than array of strings with 1 element, when 1 result returned?
Sample:
JDBC:
<Results>
<ResultSet fetchSize="10">
<Row rowNumber="1">
<ADDRESS>North Carolina</ADDRESS>
<HOUSE_NUMBER>99000034</HOUSE_NUMBER>
</Row>
</ResultSet>
</Results>
Groovy:
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );
def dbResult = groovyUtils.getXmlHolder('JDBC#ResponseAsXml');
def housenumber = []
for(item in dbResult['//HOUSE_NUMBER']){
housenumber += item
}
log.info housenumber
Actual:
INFO:[9, 9, 0, 0, 0, 0, 3, 4]
Expected:
INFO:[99000034]
Regards,
Jack