Architecture of A Web Service
The architecture of web service consists of three roles: service provider, service requester, and service registry.
The interaction consists of three operations: publish, find, and bind. These operations and roles act upon the artifacts of web services. The web service artifacts are the software modules of web service and their description.
Below figure illustrates these operations, the components providing them and their interactions.
There are three roles of web service architecture:
- The service provider defines a service description for the Web service and publishes it to a service requestor or service registry
- It is the platform that hosts the services. It creates web service and makes it available to client applications who want to use it.
- Service Requestor uses a find operation to retrieve the service description locally or from the service registry and uses the service description to bind with the service provider and invoke or interact with the Web service implementation.
- It is the application that is looking for and invoking or initiating an interaction with a service. Here, the browser plays the requester role, driven by a consumer or a program without a user interface. In short, the client application that needs to contact a web service is Service Requestor. The client application can be a .Net application, a Java application, or any other language-based application that looks for some sort of functionality.
Service requestors find the service and obtain binding information for services during development. It is the application that provides access to the UDDI. The UDDI enables the client application to locate the web service.
Operations in a Web Service Architecture
A provider informs the broker (service registry) about the existence of the web service by using the broker’s publish interface to make the service accessible to clients
The service requestor retrieves a service description directly Find. or queries the service registry for the type of service required
It is involved in two different lifecycle phases:
- At the design time, to retrieve the service’s interface description for program development.
- Second, at the runtime to retrieve the service’s binding and the location description for invocation.
The service requestor calls or initiates an interaction with the service at runtime only using the binding details available in the service description to locate, contact, and call the service.
Web Service Protocol Stack
To perform three operations: publish, find, and bind in an interoperable manner, there must be a web service stack.
In Below figure , The upper layers build upon the capabilities provided by the lower layers. The vertical towers shows the requirements that must be addressed at every level of the stack. The text on the left represents standard technologies that apply at that layer of the stack.
A web service protocol stack typically contains four protocols:
- Transport Protocol
- Messaging Protocol
- Description Protocol
- Discovery Protocol
(Service) Transport Protocol:
The network layer is the foundation of the web service stack and It is responsible for transporting a message between network applications. HTTP is the network protocol for internet available web services. It also supports other network protocol such as SMTP, FTP, and BEEP (Block Extensible Exchange Protocol).
(XML) Messaging Protocol:
It is responsible for encoding message in a common XML format so that they can understand at either end of a network connection. SOAP is the XML messaging protocol because it supports all the three operations: publish, find, and bind operation.
(Service) Description Protocol:
This protocol is used for describing the public interface to a specific web service. WSDL is the standard for XML-based service description. WSDL describes the interface and mechanics of service interaction. The description is beneficial to specify the business context, quality of service, and service-to-service relationship.
(Service) Discovery Protocol:
It is a centralized service into a common registry so that network Web services can publish their location and description. It makes it easy to discover which services are available on the network.
The first three layers of the stack are required to provide or use any web service. The simplest stack consists of HTTP for the network layer, SOAP protocol for the XML-based messaging, and WSDL for the service description layer. These three-layer provides interoperability and enables web service to control the existing internet infrastructure. It creates a low cost of entry to a global environment.
The bottom three layers of the stack identify technologies for compliance and interoperability, the next two layer- Service Publication and Service Discovery can be implemented with a range of solutions.