I am trying to virtualize an API using ServiceV. What I want to do is, have a request to pull data from JDBC (oracle db in my case), send a request to the virtual service, when the request hits the virtual service, the service looks for a unique identifier (Primary key) and based on that primary key, it fetches the right row from the database.
What I have done so far is: Managed to set up an oracleDB and connected it into our ReadyAPI project and I’ve managed to get data from the database into our request (filling in the various headers like ID, status, party ID etc) and we can return a response that also picks data out of a different table.
The next step for us is customising the SQL query on the response level to select the specific response based on the primary key from the request table.
The problem I’ve found with this is I'm not too sure where the SQL query customisation would occur. At the moment I have an SQL query run on the request level in SOAP UI and then a separate request happens in the DataSources part of the virt end to fill the response form with data. This virt end SQL query is the one I want to be able to dynamically change.
Would you have any idea of how I can achieve this?