Forum Discussion

OOTesting's avatar
OOTesting
Occasional Contributor
14 years ago

Pass Value to SQL query from SOAP response

New to SOAPUI and loving the tool so far. How can one pass captured value from SOAP response into SQL query to validate that data entered into table (JDBC test step).

Below is test steps:

1. Create SOAP request > creates succesful booking
2. Extract booking reference using property transfer
3. Pass value to JDBC test step
4. Need to use value in query

Step 4 is the part which I'm unsure how to achieve.
  • deepesh_jain's avatar
    deepesh_jain
    Frequent Contributor
    1. create a property in JDBC step and use property transfer to populate that from SOAP Response.
    2. Give the driver that you would be using to connect to DB
    3. Give the connection string in the following format:
    jdbc:oracle:thin:<user_id>/<password>@<sql connection string>
    4. Create a query like below:
    select a,b,c,d from s where a = :param

    Let me know if this helps.
    Thanks,
    Deepesh