Interview :: Web Services
Using XML eliminates any networking, operating system, or platform binding. So Web Services based applications are highly interoperable application at their core level.
Synchronicity is used to bind the client to the execution of the service. In synchronous invocations, the client blocks and waits for the service to complete its operation before continuing. On the other hand, synchronous operations facilitate a client to invoke a service and then execute different functions.
The Service Transport Layer is used to transport messages between applications.
This layer includes Hypertext Transport Protocol (HTTP), Simple Mail Transfer Protocol (SMTP), File Transfer Protocol (FTP), and newer protocols like Blocks Extensible Exchange Protocol (BEEP).
The Service Description layer is used to describe the public interface to a specific web service. Currently, service description is handled via the Web Service Description Language (WSDL).
The Service Discovery layer is used for centralizing services into a universal registry and providing easy publish/find functionality.
Currently, service discovery is handled via Universal Description, Discovery, and Integration (UDDI).
The Remote procedure calls refer to the calls made to the methods which are hosted by related web service.
The SOAP message refers to the data sent to the application from web services. SOAP message is an XML document which is sent through web services to provide data to the client application written in any programming language.
SOAP message sends via using hypertext transfer protocol.
The
The Root element is known as the first element in the XML Document.
The envelope, in turn, separated into two parts. One is the header part and second is the body part. The header contains the routing data which stores the source and destination address of the client. So the body includes the actual data.
The web services consist of four layers, as mentioned below:
Service transport:
This layer is the first layer in the web services protocol stack used in transporting XML files between various clients applications. Protocols used in the layer is as follows:
- HTTP (Hypertext transfer protocol)
- SMTP (Simple Mail Transfer Protocol)
- FTP (File Transfer Protocol)
- BEEP (Block Extensible Exchange Protocol)
XML Messaging:
This layer is the second layer in the web services protocol stack based on XML model where messages are encoded in common XML format which can be understandable to other client applications. This layer includes the following protocols:
- XML - RPC
- SOAP (Simple Object Access Protocol)
Service Description:
This layer provides the service description to the public interface like the location of web service, Available functions, And the data types for XML messaging. This layer only includes one language:
- WSDL: WSDL stands for Web Service Description Language.
Service Discovery:
This layer in the Web Services protocol stack is used to publish or finding web services over the web. This layer includes:
UDDI (Universal Description, Discovery, and integration).
The web service framework includes three different layers.
The roles of these layers are:
- Service Provider: Role of Service provider is to make the web service which makes it accessible to the client applications over the Web.
- Service Requestor: Service requestor refers to any consumer of web service like any client application. Client applications are written in any language contact web service for any functionality by sending XML request over the available network connection.
- Service Registry: Service Registry is the centralized directory System which helps to locate the web services for client applications. Used to find the existing web services, as well as developers, can also create the brand new one web service also.
The Service Provider uses the interface named as ?Publish? interface of Service Registry to make the existing web services available to client applications. With all the information provided by the service registry, service requestor able to find or invoke services.