Presentation Points Chapter 9

Web Services

Objectives

To understand how clients interact with web services.

To understand the role of WSDL in these interactions.

To be able to use Java JAX-RPC to develop web service clients and servers.

Points to emphasize

Web services are acessed by URIs by clients using messages formatted in XML. SOAP is used to express Request and Reply messages in XML and to transport them over HTTP.

SOAP messages can be used to represent either single documents or pairs of request and reply messages. But it is the synchronous HTTP protocol that is used to relate each Reply to the corresponding Request.

A web service consists of a single remote object – it is not possible to instantiate additional remote objects during the running of a web service and remote object references are not used. Therefore, servants do not figure in implementations of web services.

The details of SOAP and XML can be hidden from client and server programmer, for example, by the Java web services API (JAX-RPC).

Web services use service descriptions which are written in an XML based language called WSDL. Service descriptions are more general than interface definitions in that they also specify the endpoints (URIs) of a service and the protocols used (e.g. SOAP and HTTP) to communicate the messages.

WSDL documents are accessed via their URIs, which can be used by, for example, the JAX-RPC system to generate client proxies.

XML security is a scheme in which encryption and authentication techniques are applied to documents to be exchanged instead of to communication channels (as in TLS). This allows secure documents to be stored and re-used in a wide variety of different ways and still remain secure. Since sender and recipient may not be in communication, information regarding the algorithms used can be included in the documents themselves, together with hints for finding keys.

The Grid is a large-scale application of web services. It is designed for data-intensive and compute intensive applications. It is based on an architecture in which instances of services may be created and named; and stopped when they are no longer needed. In addition, metadata about the current state of a service instance is supported.

Possible difficulties

Students may not be clear of the difference between a web server and a web service.

They may also lack the motivation to feel that web services are important when the existing Web is apparently so effective.

Teaching hints

Use the introduction to web services in Section 1.3.1.

Students who have been trained to think in terms of distributed objects, remote object references and servants as in our model in Chaper 5 may need to ‘unlearn’ some of this. It would be worth studying the section on RPC in Chapter 5.

Practical work can be based on JAX-RPC and TomCat.

Review the section on XML in Chapter 4 and the section on URIs in Chapter 9