In the first two sections of this article, I'll discuss what web services are and how they work. In the third and fourth sections I'll explain how to develop web services using Apache AXIS and Java.
Let's start learning about web services with the definition for web service as provided by W3C. According to them, a web service is a software application which is identified by a URI, whose interfaces and binding are capable of being defined, described and discovered by XML using XML-based messages via Internet-based protocols.
A web service is usually identified by a URI (Unified Recourse Identifier). A web service has WSDL (Web Service Description Language) definitions. To communicate with web services we need to use SOAP messages, which are XML based messages transported over Internet protocols like HTTP, SMTP, and FTP. Web services can be better described with the following diagram.
Here, the service requester is the client of the web service, and the service provider is the host of the web service. A requester makes SOAP requests to the provider and the provider responses accordingly.
A service registry can be thought of as a database of web services. It has the definitions and URIs for web services. Developers of web services can publish their services to a service registry if they wish. After that someone can query the registry and choose the service from the registry. Since a registry has all the information required to develop a web client, developers can search and find necessary information from a service registry using UDDI (Universal Description, Discovery and Integration).