300+ TOP RESTful Web Services Interview Questions and Answers

RESTful Web Services Interview Questions for freshers experienced :-

1. What is REST?
REST is web standards based architecture and stands for REpresentational State Transfer. It uses HTTP Protocol for data communication. Here, everything is a resource.

2. What are the HTTP methods used in REST based architecture?
HTTP methods used in REST based architecture are:

  • GET
  • PUT
  • DELETE
  • POST
  • OPTIONS

3. Who is the inventor of RESTful Web Services?
REST is introduced by Roy Fielding.

4. Which framework implements JAX-RS 2.0 API in REST?
Jersey framework.

5. Which annotation is used to specify a path for the web service?
@Path annotation is used to specify a path for the web service.

6. What is a Resource?

  • A resource is an entity in the database and similar to object in Object Oriented Programming.
  • It is a unique URL with representation of an object.

7. Which markup language can be used in restful web API?
SON and XML.

8. What are the advantages of Web Services?
Advantages of Web Services are:

  • Reusability
  • Loose Coupling
  • Interoperability
  • Easy to deploy and integrate
  • Multiple service versions can be running at same time

9. What are different types of Web Services?
Two types of Web Services are:

  • SOAP Web Services
  • RESTful Web Services

10. What is the difference between SOAP and RESTful Web Services?
Difference between SOAP and RESTful Web Services are:

  • SOAP Web Services                                                                        RESTful Web Services
  • It is a standard protocol for creating web services        It is an architectural style to create web services
  • Stands for Simple Object Access Protocol                       Stands for REpresentational State Transfer
  • Supports XML data format only                                       Supports any data format such as XML, JSON etc
  • Web Services are bind with WSDL contract                   Doesn’t have any contract
RESTful Web Services Interview Questions
RESTful Web Services Interview Questions

11. What are the benefits of Statelessness?
Benefits of Statelessness are:

  • Here, each method request is independently treated by Web Services.
  • Here, Client’s previous interactions not need to be maintain by Web Services.
  • HTTP is statelessness protocol, RESTful Web Services work with the HTTP protocols.

12. What are the frameworks available to implement RESTful Web Services?
Frameworks available to implement RESTful Web Services are:

  1. Jersey
  2. Restlet
  3. EasyRest

13. What are the tools required to test Web API?
Tools required to test Web API are:

  • SOAPUI tool for SOAP Web Services
  • Firefox poster plugin for RESTful Web Services

14. What is WSDL?
It is an XML format which is used for describing web services.

WSDL stands for Web Services Description Language.

15. What is JAX-WS?
It is a set of APIs which is used for creating web services in XML format.

16. What is Payload?

The request data which is present in the body part of every HTTP message is referred as ‘Payload’. In Restful web service, the payload can only be passed to the recipient through POST method.

There is no limit of sending data as payload through POST method but the only concern is that more data with consuming more time and bandwidth. This may consume much of user’s time also.

17. Enlist some of the HTTP methods with description.

Mentioned below is the list of HTTP methods with their descriptions:

  • GET: This is a read only operation which fetches the list of users on the server.
  • PUT: This operation is used for the creation of any new resource on the server.
  • POST: This operation is used for updating an old resource or for creating a new resource.
  • DELETE: As the name suggests, this operation is used for deleting any resource on the server.
  • OPTIONS: This operation fetches the list of any supported options of resources that are available on the server.

18. What is the difference between PUT method and POST method?

The major difference between the PUT and POST method is that the result generated with PUT method is always same no matter how many times the operation is performed. On the other hand, the result generated by POST operation is always different every time.

19. What is your understanding about JAX-RS?

JAX-RS is defined as the Java API for RESTful web service. Among multiple libraries and framework, this is considered as the most suitable Java programming language based API which supports RESTful web service.

Some of the implementations of JAX-RS are:

  • Jersey
  • RESTEasy
  • Apache CFX
  • Play
  • Among these, Jersey is the most popular framework.

20. What are HTTP status codes? Enlist few with meaning.

HTTP status codes basically are the representation of the status of the task that has been performed on the server, with the mode of some codes. Every code has their own meaning.

Some of the HTTP status codes with their meaning are as follows:

  1. Code 200: This indicates success.
  2. Code 201: This indicates resource has been successfully created.
  3. Code 204: This indicates that there is no content in the response body.
  4. Code 404: This indicates that there is no method available.
    There are few more such codes that indicate the status.

RESTful Web Services Questions and Answers Pdf Download

Leave a Reply

Your email address will not be published. Required fields are marked *