Working with REST Services and WADL

User rating:
2.7 (60 ratings)

Let’s have a detailed look at how SoapUI models REST Services. 

Start by creating a new REST project:

Open the File menu



Select New REST project

Normally, we would probably just provide an URI:



But in this case we will use the sample wadl provided in the SoapUI-Tutorials/WSDL-WADL folder.

Click the Import WADL button.

The New WADL dialog opens:

Click Browse
 

We can then browse to the file:

Click Open

The sample WADL is specified In the New WADL dialog: 



Click OK

SoapUI creates the specified project and imports the WADL, resulting in the following object hierarchy in the navigator:

rest-object-model

Here you can see the core items that make up a REST Service project:

  • The project (sample-service)
  • The REST Service (sample-service)
  • A resource (accountcreation)
  • A GET method for accessing the resource (Register new account)
  • A default request generated by soapUI for this method (“Request 1”)
  • ... and so on...

Double-click the REST Service node.

This opens the Service Overview:

rest-overview-tab

The Overview tab shows basic data about the service.

Click Service Endpoints

rest-endpoints-tab

The Service Endpoints tab lets you define any number of alternative endpoints for your service, which you can easily switch between in the REST Request editor.

Click WADL Content

rest-wadl-content-tab

To the right you can see separate tabs for each of the files imported for the WADL. In our case there is only the WADL itself.

The tree to the left allows for easy navigation between elements in all imported files, for example selecting the GET method as in the screenshot above highlights it in the corresponding WADL file to the right.