chikki
17 years agoContributor
Re: Get into String
Hi,
I have a Response file
admin
Admin
Istrator
2387927601777237750
MSG_Service_Administrator
MSG_Moderator
MS1_OP
MS1_P1
STM
55
EP
CC
DL
MK
666
11
KH
MS1_P3
GOA
MS1_P4
148
901
TE
TG
I have to get all the response of OrganizationUIDs in to an array how can i achieve that
I am able to get the Soap UI response in an array.
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( "AuthenticateAdmin#Response" )
def items = holder.getNodeValues( "//ns2:GMSAdministrator/organizationUIDs")
log.info( "Found " + items.length + " items.." )
for (item in items)
{
log.info( item )
}
the same way i have to get data from DB and then compare
def sql = Sql.newInstance("jdbc:oracle:thin:@" + properties.getProperty( "databaseurl" ) + ":" + properties.getProperty( "databaseport" ) + ":" + properties.getProperty( "database" ) , properties.getProperty( "databaseuser") ,
properties.getProperty( "databasepassword" ), "oracle.jdbc.OracleDriver")
def partnerUID =sql.eachRow("Select EXTERNAL_ORG_UNIT_UID from org_unit",{ log.info( it.EXTERNAL_ORG_UNIT_UID) }) //+ " -- ${it.EXTERNAL_ORG_UNIT_UID} --"
Please help me how do i get the values into an array and then compare them both.
I have a Response file
I have to get all the response of OrganizationUIDs in to an array how can i achieve that
I am able to get the Soap UI response in an array.
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( "AuthenticateAdmin#Response" )
def items = holder.getNodeValues( "//ns2:GMSAdministrator/organizationUIDs")
log.info( "Found " + items.length + " items.." )
for (item in items)
{
log.info( item )
}
the same way i have to get data from DB and then compare
def sql = Sql.newInstance("jdbc:oracle:thin:@" + properties.getProperty( "databaseurl" ) + ":" + properties.getProperty( "databaseport" ) + ":" + properties.getProperty( "database" ) , properties.getProperty( "databaseuser") ,
properties.getProperty( "databasepassword" ), "oracle.jdbc.OracleDriver")
def partnerUID =sql.eachRow("Select EXTERNAL_ORG_UNIT_UID from org_unit",{ log.info( it.EXTERNAL_ORG_UNIT_UID) }) //+ " -- ${it.EXTERNAL_ORG_UNIT_UID} --"
Please help me how do i get the values into an array and then compare them both.