Herong's Tutorial Notes on Web Service and SOAP
Dr. Herong Yang, Version 2.11

Introduction Web Service

This chapter describes:

  • What is a Web service.
  • What are the related technologies.

What Is a Web Service?

A Web Service is an application programming service that can be accessed remotely via standard Internet protocols using XML as the data format.

Key elements in this definition:

  • A Web service is a programming service, not an end user service
  • A Web service is designed to be used remotely.
  • A Web service is accessible via standard Internet protocols, ex. HTTP.
  • A Web service communicates data in XML format.

Benefits of using Web services:

  • Easier to integrate applications together.
  • Services re-usable.
  • Making application flexible to meeting constantly changing business needs.

Web Service Related Technologies

There are several technologies that are related to Web services:

  • UDDI (Universal Description, Discovery and Integration) - A server acting like a Web service directory. Web services can be registered and discovered on a UDDI server.
  • WSDL (Web Services Description Language) - An XML based language to describe a Web service.
  • SOAP (Simple Object Access Protocol) - An XML based protocol used to define requests and responses for a Web service.
  • HTTP (Hyper-Text Transport Protocol) - An Internet communication protocol used by the World Wild Web system. HTTP are used to deliver Web service requests and responses.
  • XML (eXtensible Markup Language) - A markup language used to organize information in clear text format.

The following diagram is an illustration of how these technologies are used to deliver a Web service from a provider to a consumer:

                       Query for a service                             
Web service <-----------------------------------------> UDDI server 
consumer             Return provider location           |  
                                                        |
                                                        |
                Query for the service description       v        
Web service <-----------------------------------------> WSDL document
consumer            Return service description          server    
                                                        |
                                                        |
                Send service request (SOAP + HTTP)      v
Web service <-----------------------------------------> Web Service
consumer       Return service response (SOAP + HTTP)    provider

As you can see from this diagram, UDDI and WSDL are really optional. If you know the location and the description of a Web service, you don't need to query the UDDI server and fetch the WSDL document. All you need to do is to build a request in SOAP format, and sent it via HTTP to the provider.

Since HTTP is a very old protocol, I will not discuss it in this book.

Most of the notes in this book will be on SOAP, because it is the key technology of Web services.

Of course, some of the notes will on UDDI and WSDL.

Dr. Herong Yang, updated in 2006
Herong's Tutorial Notes on Web Service and SOAP - Introduction Web Service