Exercise: Consuming SOAP based web services

The web site http://www.webservicex.net/ introduces a lot of relatively simple web services ready for consumption.

In this exercise you will make client applications for some of these web services.

Some of the services work - others don't.
Try the services in your browser before you start making a client application.

For each service your want to try

  1. Try the service in the browser.
    webservicex.net provides a browser based user interface for the service (this is nice, but quite unusual).
  2. Try the service with WcfTestClient.
    WctTestClient is a small tool you get with Visual Studio.
    On my computer WctTestClient is found in the folder C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
  3. Make a client application, preferable a console application
  4. Add a service reference to project
  5. Make a simple client to try out the service
    Some of the methods will return a string containing a loooong XML text, others will return a simple result.
  6. Use Wireshark to study the communication between the webservice consumer and producer - at HTTP level.

Some services to try

  1. WHOIS (provides service similar to https://www.whois.com The result is a long text string)
  2. Temperature unit convertor (uses enumerations)
  3. Currency convertor (my service)
  4. Simple statistics (uses out parameters)
  5. Country details (most methods return a long XML string. Use the class XmlDocument to parse the XML string, specially the method GetElementByTagName)
  6. Periodic table (returns XML strings)
  7. FootbalPool
  8. others from http://www.webservicex.net/ws/default.aspx or elsewhere

Extra: Parse XML output

Some of the service methods return a long XML string.

Use the class XmlDocument to parse the XML string to get access to data inside the string.

More documentation on GetElementByTagName

Extra: GUI, only if you have done the above exercises ...

Make a GUI include one (or more ...) of the web services you already tried.