Forum Discussion
omatzura
17 years agoSuper Contributor
Hi!
sorry for the delay.. please try the following in your MockResponse script:
Hope this helps!
regards,
/Ole
eviware.com
sorry for the delay.. please try the following in your MockResponse script:
import groovy.sql.Sql
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( mockRequest.requestContent )
def objectRefIn=holder["//ucor:object/text()"]
sql = Sql.newInstance("jdbc:jtds:sqlserver://CWS-Fredrik_C/uc_resp;domain=", "soapUI","soapUI", "net.sourceforge.jtds.jdbc.Driver")
def row=sql.firstRow("select UCresponse from resp where socid ={objectRefIn}")
mockResponse.setResponseContent("${row.UCresponse}")
Hope this helps!
regards,
/Ole
eviware.com
Related Content
- 7 years agoHappyRandom
- 6 years agopankajmalinda