Google News
Web Services Interview Questions
REST API generally returns the following status codes in HTTP response :
* 200 OK
* 201 Created
* 202 Accepted
* 302 Found
* 400 Bad Request
* 401 Unauthorized 
* 404 Not Found
* 405 Method Not Allowed
* 409 Conflict
* 500 Internal Server Error
The increasing ratio of distributed applications has raised demand for distributed technologies. It allows segmenting of application units and transferring them to different computers on different networks.
Web services transfer/receive messages to/from application respectively, via HTTP protocol. It uses XML to encode data.
CORBA and DCOM transfer/receive messages to/from application respectively, via non-standard protocols such as IIOP and RPC.
DISCO means discovery. It groups the list of interrelated web services. The organization that provides web services, issues a DISCO file on its server and that file contains the links of all the provided web services. This standard is good when client knows the company already. Also it can be used within a local network as well.
Java webservices is developed to build and deploy basic web service on JAVA platform.
To create a web services, there are two approaches that are adopted
* Top-down approach
* Top-up approach
Web service protocol stack consists of 4 layers. This can be described as follows :
a) Service transport : This is the first layer that helps in transporting XML messages between various client applications. This layer commonly uses the below-mentioned protocols:
* HTTP(Hypertext Transport Protocol)
* SMTP(Simple Mail Transport Protocol)
* FTP(File Transfer Protocol)
* BEEP(Block Extensible Exchange Protocol)

b) XML messaging : This layer is based on the XML model where messages are encoded in common XML format which is easily understood by others. This layer includes
* SOAP(Simple Object Access Protocol)

c) Service description : This layer contains descriptions like location, available functions, and data types for XML messaging which describes the public interface to a specific web service. This layer includes:
* WSDL(Web Service Description Language)

d) Service discovery : This layer is responsible for providing a way to publish and find web services over the web. This layer includes:
* UDDI(Universal Description, Discovery, and Integration)
BEEP stands for Blocks Extensible Exchange Protocol. BEEP is determined as building new protocols for the variety of applications such as instant messaging, network management, file transfer, etc. It is termed as new Internet Engineering Task Force (IETF) which is layered directly over TCP. It has some built-in features like
* Authentication
* Security
* Error handling
* Handshake Protocol
Enlisted below are some common HTTP methods along with their functions that are supported by RESTful web services
GET : Read-only access to the resource.

Creation of new resources.

Removal of a resource.

Update of an existing resource.

Get supported operations on the resource.

Returns HTTP header only, nobody.
HTTP request has following 5 major components :
Verb   : Indicate HTTP methods like GET, PUT, POST, etc
URI    : Identifies the resource on server
HTTP Version  : Indicates version.
Request Header : Contains metadata like client type, cache settings, message body format, etc for HTTP request message.
Request Body : Represents content of the message.

HTTP response has following 4 major components :
Status/Response code  :  Indicates the status of the server for requested resource.
HTTP version  :  Represents HTTP version.
Response Header :  Consists of metadata like content length, content type, server length, etc for HTTP response message.
Response Body :  Represents response message content.
The purpose of URI is to locate resources on the server that are hosting web services.
Format of URI :