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