Invoke web service using soapUI tool

Once you have created a web service, it is time to take it out for a test drive. Probably the best known web services test tools is soapUI, which is available in both open source and 'Pro' forms, the former being free to download. soapUI is available for most modern operating systems. (soapUI is implemented in Java, so you will be immediately testing in a cross-language environment.) Install soapUI according to its instructions. (Note that soapUI has many capabilities that will not be exploited in this tutorial.)

When you start soapUI and dismiss its start up screen, you are presented with a work area as shown below:

The left pane provides an area to define projects and the right pane contains windows that are associated with a selected project. Follow these steps to create a project to test the first example.

From the File menu, select New soapUI Project.

A dialog box appears, which allows you to provide a name for your project, as well as the location for finding the WSDL.

Type a name for the project, then in the Initial WSDL/WADL field, enter the following URL:

Since our web service provides a WSDL as the result of a GET on the endpoint, we simply enter a name for the project and the URL of the web service end point. Make sure the Create Requests: option is checked so that soapUI creates a prototype request document for each method. After fetching and processing the WSDL, the result is displayed in the left pane:

Note that the tutorialSoapBinding has a single method named find.

Expand the selection for the find method, exposing a prototype request named Request 1. Double click Request 1 to open the prototype request in the right pane:

The prototype request has the question mark (?) character in those areas that need input values to create a valid request. In the case of this tutorial example, we need to supply an alphanumeric value which the web service will use to determine which company name to return. Let's enter BO and press the green arrowhead at the upper left of the request window.

soapUI sends the request to the web service and displays the result:

This indicates that the web service has created a WSDL and successfully processed a web service request.