Adding a REST Service to SoapUI

soapUI is a “open source functional testing tool for Web Services”. In this post, we’ll add the XSL Servlet as a soapUI project.

To help you get started, here is the XSL servlet as a java war file. This war requires the addition of serializer.jar, xalan.jar and xml-apis.jar from Xalan-J to the web-application WEB-INF/lib directory to run.

First, create a new project in soapUI. That bring up the dialog shown below. For this example, I’ve named the new service Ideoplex, specified the base url for the service as http://localhost:8080/xsl/transform and requested that we proceed to add a REST resource as our next step.

soapUI: Create New Project

Name the resource “Get environment” and specify an endpoint of environment (this will be appended to the service endpoint defined for our project.

soapUI: New REST Resource

Name the method “Get Environment” and verify that the HTTP Method is “GET”.

soapUI: New REST Method

And execute this request by clicking on the green triangle in the upper left. soapUI will display the response (the environment.xsl transform configured in the java web application) in the right window pane with a response time in the window footer.

soapUI: New REST Request

Repeat the preceding 3 steps to add the corresponding POST request. Be sure to specify POST as the HTTP Method when defining the Method and to add a valid xml file as input to the Request.

soapUI: Add REST Request

Continue and add GET and POST methods for the echo and remove transforms. That should result in a the soapUI project file linked here.

Sep 25: Using soapUI Project Properties