Forum Discussion

bjaitly's avatar
bjaitly
Occasional Contributor
12 years ago

How to Use the SoapUI API to create DataSource

I need to create a SoapUI test suite and test cases programmatically using Java and the SoapUI API. I’m able to create the SoapUI project and import a WSDL into that project but I am having problems understanding which classes I use to create the data source etc. I’ve read the SoapUI API Javadoc, but are there sample code snippets and/or documentation I can use to learn which classes I would use and how to use those classes?

2 Replies

  • PaulDonny's avatar
    PaulDonny
    Regular Contributor
    If you are importing SoapUI into Java, I have a decent guide that will help get your started here. As for a Datasource, I just use a SQLite database and grab the information VIA Java for the UI portions of my script. I then take a property file and store it for the SoapUI portions of the program. Works very well and makes it easier to distribute and know exactly what happened where.

    If I am wrong by my assumption regarding importing SoapUI into Java, DataSources and DataSinks are technically for pro versions only. Again, you can easily just have it read a SQLite database using a groovy script.
  • bjaitly's avatar
    bjaitly
    Occasional Contributor
    Thanks Paul for your comment. I went through your link , it is definitely helpful to set-up the Java project using SOAP jar files.

    Regarding datasource Lets say i have SOAP UI Pro version , how can i use the SOAP API's to related to datasource.

    I went through the API documentation at following link - http://www.soapui.org/apidocs/pro/ . But there is not much documentation about the API's to use through Java.