Building a SOAP Web Service Client

The temperature conversion web service is an sample web service provided by the w3schools.com tutorial web site, which provides a large offering of tutorials on many web technologies. A web service provides a Web Services Definition Language document, also called a WSDL, that defines the location of the service, its methods (or functions) and the request and response documents for those methods. The temperature conversion web service is located at URL http://www.w3schools.com/webservices/tempconvert.asmx.

You can use SoapUI to obtain the WSDL for the temperature conversion web service by entering the WSDL for the URL in a SOAP project. To do this, you enter the URL http://www.w3schools.com/webservices/tempconvert.asmx?WSDL for the SOAP project. Using an initial WSDL performs an HTTP GET on the URL, which is a fairly conventional mechanism of publishing the WSDL for a web service. Since SOAP requests always use POST to a URL, a GET can be interpreted as a request for the WSDL or, as in this case, a GET of the URL with a query parameter 'WSDL' is interpreted as a request for the WSDL.

Note:

Some web services do not make a WSDL available via the web, due to security or other concerns, but rather have some other means to deliver a file containing the WSDL. If you use a browser to GET the WSDL, you may need to look at the page source to see the XML information that makes up the WSDL.

A WSDL is a very complex document and not readily decipherable. This tutorial uses SoapUI, an open source web services testing tool to obtain the WSDL. soapUI can create much more usable request and response documents which can in turn be modified to create XSLT style sheets to be used with XML Extensions.

See Prerequisites for more information about using SoapUI for this tutorial.