Before going to learn about web service architecture, just have a look at functionality of web service.
Web services are using open standards like HTML, XML, WSDL and SOAP to establish communication between different applications online.
In the process of communication
Tagging the data by using XML
To transfer data SOAP
For availability of service WSDL is helpful.
Every mechanism has an architecture, if we understand the architecture, we can build the web service easily.
There are two ways to explain the web service architecture here is the one.
In web services there are three different roles
- Service Provider
- Service Requestor
- Broker/Service Registry
Web services are created by “Service Provider” and makes it available online for clients or who requests to use that service.
Service Requestor is the consumer of the service which is offered by Provider. A requestor is nothing but a client application that need to contact a web service by sending XML request.
Broker is the application which provides the access to the UDDI. UDDI enables the client application to locate the web service because the broker or service registry is the centralized directory of web services.
Now, go for second way of observing web service architecture by using web service protocol stack.
Web service protocol stack is having four layer these are examined to understand the webservice architecture. Web service protocol stack is used to define, locate, implement and make web services interact with each other.
The four protocols namely
- Transport protocol
- Description Protocol
- Discovery Protocol
- XML Messaging Protocol
Transport layer job is to transfer the message between applications via online. SMTP, HTTP, FTP and BEEP are included in this layer. (BEEP- Block Extensible Exchange Protocol)
Description protocol is used for describing the public interface to a specific web service. The WSDL interface format is typically used for this purpose.
Discovery Protocol, it centralizes the services into a common registry so that network web services can publish their location and description and make it easy to discover what services are available on the network. UDDI (Universal Description Discovery and Integration) was intended for this purpose, but it has not been widely adopted.
XML Messaging protocol is responsible for encoding the messages in common XML format so that they can be understood at either end of a network connection. At present this area includes such protocols as XML-RPC, WS-Addressing and SOAP.
The Web service protocol stack also includes a whole range of recently defined protocols: BPEL, SOAP-DSIG.
The bottom of the web service protocol stack is service transport. This layer is responsible for transporting XML messages between two systems. Service Transport is used HTTP and BEEP protocols.
HTTP is the most popular protocol for service transport in web service. As HTTP is simple, stateless, stable, widely deployed. Apart for this most security firewalls allows HTTP requests. HTTP is good while using remote applications integration but it raises security concerns.
BEEP (Block Extensive Exchange Protocol) is an alternative of HTTP. BEEP is a new Internet Engineering Task Force (IETF) framework for building new protocols. BEEP is layered directly on TCP and includes a number of built-in features, including an initial handshake protocol, authentication, security, and error handling. Using BEEP, one can create new protocols for a variety of applications, including instant messaging, file transfer, content syndication, and network management.
SOAP is using via HTTP, SMTP or FTP, it doesn’t directly tie up with any specific service transport protocol.
Working of Web service
Publish, Find and Bind these are the three steps involved in work flow of web service.
Publishing of Webservice: Service provider informs the service registry/Broker about the existence of the web service using the broker’s publish interface to make the service accessible to clients.
Finding of Webservice: The service requestor consults the service registry to locate a published web service.
Bind of Webservice: By using the gained information from the service registry about the web service, the service requestor can bind or invoke the web service.
Web service Protocol Stack: