Google News
Web Services Interview Questions
The Service Transport layer transfer messages between different applications, such as HTTP, SMTP, FTP, and Blocks Extensible Exchange Protocol (BEEP). The XML Messaging layer encodes messages in XML format so that messages can be understood at each end, such as XML-RPC and SOAP. The Service Description layer describes the user interface to a web service, such as WSDL. The Service Discovery layer centralizes services to a common registry and offer simple publish functionality, such as UDDI.
The WSDL stands for Web Services Description Language. It is an XML document containing information about web services such as method name, method parameter. The Client needs a data dictionary which contains information about all the web services with methods names and parameters list to invoke them for the web services. The Web Service Description Language bridge up this gap, by providing all necessary information to the client.
Some Important elements used in Web Services Description language are as follows :
<message> : The message element in WSDL is used to define all different data elements for each operation performed by the web service.

<portType> : The port type element is used to determine the operation which can be performed by the web service. This operation can have two messages one is input and the second one is the output message.

<binding> : This element contains the used protocol.
The UDDI stands for Universal Description, Discovery and Integration. It is a XML based framework for describing, discovering and integrating web services. It contains a list of available web services. WSDL is the part of UDDI.
The REST stands for Representational State Transfer. It is an architectural style. It is not a protocol like SOAP.
These are some of the important advantages of RESTful web services :
* Fast : The Web Services are fast because there is no strict specification of SOAP. It consumes less bandwidth and resource.

* Language Independent :
The web services can be written in any programming language.

* Platform Independent :
The web services can be executed on any platform.

* Can use SOAP :
The web services can use SOAP web services as the implementation.

* Allows different data format :
The web service permits different data format such as Plain Text, HTML, XML, and JSON.
API (Application Programming Interface) : It acts as an interface between two devices so that they can communicate with each other without any user intervention. Some of its features include customizable, easy integration with GUI, time effective, language-independent, etc. All APIs are not web services.

Web Service : It facilitates interaction between two devices over a network. They are widely used for exchanging data among systems or applications. Some of its features include loosely coupled, supports document exchange, interoperability, extensibility, etc. All Web services are APIs.

API Web Service
It can be online or offline. It must use a network.
They are lightweight architecture. They require SOAP to send and receive network data therefore, are not lightweight architectures.
It can use any design style or protocol. It can only use SOAP but sometimes UDDI, XML, RPC, and REST also.
It supports HTTP/HTTPS protocol and also supports XML and JSON. It supports HTTP protocol and also supports XML.
It doesn’t require any network for its operation. It requires a network for its operation.
They are open source and are used for XML. They are not open source and are used to understand JSON (JavaScript Object Notation).
There are various tools used to test web service as given below: 
* SoapUI 
* Poster 
* Postman 
* REST client 
* JMeter
Some of the different tags in WSDL xml are :
xsd : import namespace and schemaLocation: provides WSDL URL and unique namespace for web service.

message : for method arguments

part : for method argument name and type

portType : service name, there can be multiple services in a wsdl document.

operation : contains method name

soap : address for endpoint URL.
Some of the disadvantages of REST are :

* Sessions can’t be maintained.
* Since it works on HTTP, there can’t be asynchronous calls.
* Since there is no contract defined between service and client, it has to be communicated through other means such as documentation or emails.
XML-RPC (Remote Procedure Call) is considered the most basic and simplest XML-based protocol to exchange data among different devices on a network. It uses HTTP as a transport protocol for quickly and easily transferring the information or data between two devices. XML-RPC can also be used with different programming languages such as Perl, Java, Python, C, C++, PHP, etc,.