Forum Discussion
7 Replies
Sort By
- deggialOccasional Contributor1. Download appropriate driver - http://www.soapui.org/Working-with-soap ... -list.html (Oracle is there as well) and place it in SoapUI lib folder.
2. Connect to db using script (be sure to change appropriate driver in the connection string, I don't have Oracle so I can't check it, but the mechanism is in place):import groovy.sql.Sql
def sql = Sql.newInstance("jdbc:mysql://xx.xx.xx.xx:3306/dbname", "root", "password", "com.mysql.jdbc.Driver")
sql.eachRow("SELECT * FROM myTable;") {
log.info " ${it.id}"
} - NessieOccasional ContributorThanks Deggial, I'll give that a go
- NessieOccasional ContributorHi,
I have a number of WDSL's, these being:
FLAuthWebBinding
authenticate
authenticateByProxy
verify
FLWebBinding
updateIndividual (this is what I am using to do the DB update)
Where would I put the groovy script? - deggialOccasional ContributorYou should choose location based on your scenario.
If I understood correctly - it is the last step, so create a groovy script as last step and place there the query you want to execute.
Edit: You can find information regarding working with databases in Groovy here - http://groovy.codehaus.org/Database+features - NessieOccasional ContributorThanks again Deggial
- NessieOccasional Contributorhey, me again..
To make it a bit easier for me I have tried to use the JDBC Request to see if I could get a connection first but alas to no avail.
in the configuration window I have the following:
Driver: com.oracle.jdbc.Driver
Connection String: jdbc:oracle:thin:@//someserver:1521/DB Name, "username", "password"
SQL Query: SELECT COUNT(*) FROM LGNOM_INDIVIDUAL;
but when tring to test I get back:
com.eviware.soapui.support.SoapUIException: Failed to init connection for drvr [com.oracle.jdbc.Driver], connectionString [jdbc:oracle:thin:@//someserver:1521/B Name,, "username", "password"]
Regards - NessieOccasional ContributorHi,
Got a bit further, it looks like I had the connection string messed up, have tried to connect to two different servers and oracle refused a connection on one and the Network Adapter could not establish the connection on the other one.
Getting closer now.
Thanks for your help...
Related Content
Recent Discussions
- 17 hours agoGuhan-B
- 5 days agoruchisingh