Forum Discussion

momorahmani's avatar
momorahmani
Occasional Visitor
3 years ago

Webservices Connection to SQL database through SOAPUI

Hi Everyone,

I've been trying to connect SOAP web services to an SQL database but it seems like I'm missing something.

I tried two things but none seems to work.

1st attempt:

- Created the project and added the WSDL file

- At the bottom of the request "Auth tab", I enter the database username and password.

- Entered the database server IP in the endpoint field - with top of the window

With this attempt, I get the 200 OK message, but I don't seem to receive the response ( no XML response)

2nd attempt: 

- Created the project and added the WSDL File

- Created a test suite and inserted a JDBC request.

- Entered the following info :

  •  Driver: com.mysql.jdbc.Driver
  • Connection String: jdbc:mysql://"database server IP":/?user&password

Knowing that I already added the jar file correctly, & I still get an error message.

 

I'm new to SOAPUI, can someone please help me find the solution to this? 

 

 

1 Reply

  • bqualters's avatar
    bqualters
    Occasional Contributor
    Hey ...I'm new to SoapUI as well (less than a month) but I think you are looking in the wrong place to make a database connection.  I believe, and I could be wrong, but if you are putting database connection info in the Authorization tab in the Request itself you indicating that the username password is for the application you are testing the Rest API for and NOT the database attached to the AUT (application under test).  Right click on your test case name and select Add Step - then pick the JDBC Request choice and define the connection string info there - test it to make sure you made a connection and then supply your SQL statement in that step and see if that gets you what you want...