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. (Please 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 similar to 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.

  1. From the File menu, select New SOAP Project. A dialog box is displayed which allows you to provide a name for your project, as well as the location for finding the WSDL.

    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 tutorial1SoapBinding has a single method named: find.

  2. Expand the selection for the find method, exposing a prototype request named Request1. Double click Request1 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.

  3. 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.