Forum Discussion
Emric-Test
18 years agoOccasional Contributor
Hi again!
I've been experimenting, and I got somethings straight and others not... my problem right now is what I think you refer to as property expansion. I need to geth the "object" (see request) from the request to use a primarykey in my select staement...I can't get it, I get null!
Request:
XXXX
XXXX
Emric
false
3000
Mock response script
===================
import groovy.sql.Sql
sql = Sql.newInstance("jdbc:jtds:sqlserver://CWS-Fredrik_C/uc_resp;domain=", "soapUI","soapUI", "net.sourceforge.jtds.jdbc.Driver")
objectRefIn=mockRequest.getProperty("//ucor:individualReport/individualReportQuery/object/")
row=sql.firstRow("select UCresponse from resp where socid = ${objectRefIn}")
mockResponse.setResponseContent("${row.UCresponse}")
I've been experimenting, and I got somethings straight and others not... my problem right now is what I think you refer to as property expansion. I need to geth the "object" (see request) from the request to use a primarykey in my select staement...I can't get it, I get null!
Request:
Mock response script
===================
import groovy.sql.Sql
sql = Sql.newInstance("jdbc:jtds:sqlserver://CWS-Fredrik_C/uc_resp;domain=", "soapUI","soapUI", "net.sourceforge.jtds.jdbc.Driver")
objectRefIn=mockRequest.getProperty("//ucor:individualReport/individualReportQuery/object/")
row=sql.firstRow("select UCresponse from resp where socid = ${objectRefIn}")
mockResponse.setResponseContent("${row.UCresponse}")