Consuming Web Services

 

Activity 1: Web services on the Internet

Do a search on the Web and Identify potential partners who could provide you with the XML Web Services you want to consume.  You can make a start at: http://www.xmethods.com.

 

This website introduces you to a number of Web services you may like to explore in your own time in order to understand their functionalities.  One of these Web services is a currency exchange rate Web service which as the name suggests provides the consumer with the exchange rate for currency of one country for another.  The input parameters to this Web service are two country names and the Web service returns the conversion rate for one to the other. Some of the other ineteresting ones return weather report and do mathematical calculations.

 

Before building an application that consumes this service, you may like to test the service.  You may be able to do this by visiting the URL where the Web service is hosted.

 

Activity 2: What is the addition of two integers?

 

In this activity we will build our own interface to a simple web service that adds two integers. To do this we need:

  1. We need to know tle location of the Web Service, the name of its method, and the parameter types you need to pass to the method. The web service we are going to use is at http://aces-web.aces.shu.ac.uk/staff/cmsmr2/AddWebService.asmx.

 

In this activity we will build our own interface to the simple web service that adds two integers. To do this we need:

 

2.    URL of the web Service we are going to use.

3.    A HTML form for the two input parameters.

 

 

HTML form consists of:

 

4.    Build the HTML form and FTP it to your public_html folder.

5.    Run the application.

6.    Extend the application by adding an additional submit button for subtracting two integers.

 

Activity 3: Further development of the interface to the Web service

 

  1. Think of a scenario case study for consuming the currency exchange rate Web service for example an application that would convert Euro to Canadian dollar.  Enhance the HTML Web form that you developed in Activity 2 to build a user friendly and informative application.

 

Discussion within your project group:

 

  1. Can you state examples of functionality within your shopping cart that would use the type of application in Activity 2?
  2. Can you think of examples of functionality and value added services that you could develop within an Extranet or an Intranet using XML Web services you have explored in Activity 1?
  3. Does the shopping cart system enable the integration of this type of application? Have you tried to incorporate the application you developed in Activity 2? For example could the currency converter application could be embeded in your development of shopping cart?