Top 21 Web Services Interview Questions

Here we will cover top web services interview questions which help to crack the beginner level interviews. We covered also SOAP and REST API related questions.

What is Web Services?

Web services are the web component or a piece of software which are used to communicate between two applications. It is use to transfer the data from client to server through XML messaging concept.

What are the different types of web services?

There are two types of web services.

SOAP – It stands for Simple Object Access Protocol. It is based on XML over HTTP (Hypertext Transfer Protocol) to access the web services.

Rest – It stands for Representational state transfer. It is used to design the RESTful web services. It’s not a protocol.

What are the different components used in web services?

 There are many components are uses in web services like –

                 WSDL– Web Service Description Language

                 UDDI–   Universal Description, Discovery and Integration

                 XML –   eXtensible Markup Language

                 RDF –    Resource description framework.

                 Soap –    Simple object access protocol.

What is WSDL?

It stands for Web Service Description Language. It is a XML based file which contains information of web services like WSDL Url, namespace, schema location, method name etc.

What is UDDI?

It stands for Universal Description, Discovery and Integration. It is a directory where web services should be registered so that client applications can access them.

UDDI uses the Web Services Definition Language (WSDL) to describe the Interfaces to Web Services. UDDI can communicate via SOAP or Java RMI protocol.

What is SOAP UI?

Soap UI is an open source tool functional, Load testing and Security testing tool. It is also a API testing tool.

What are the main challenges in Soap UI?

 When we are doing functional testing, mainly we are used GUI but in case of Soap UI we    do not have any GUI.

Which language we are used in Soap UI?

  Soap UI supports Groovy and Java script.

How to fetch the custom property in Soap UI?

 Using ${#lablename#key} we can fetch property.

What is the process to build a project in Soap UI?

 Order to be create a Soap UI project –

  1. Test Suite
  2. Test case
  3. Test step 

What are the different communication channels in a web services?




How do you validate you response in Soap UI?

 Using different types of exception we can validate it. Assertion like –


                  Not Contains

                  Xpath match

                  Xpath Query

What types of testing you can perform using Soap UI?

 By using Soap UI we can perform functional, regression, load and security testing.

What is REST?

It stands for Representational State Transfer (REST). It is an architectural style for providing standards between computer systems on web and uses HTTP protocol. It is use to design the RESTful web services.

In REST, we can use different types of files like XML and JSON file.

web services interview questions REST API

Which HTTP methods use in REST?

Different methods commonly used in REST based architecture.

    GET – It is used to access the resources.

    POST – It is used to create new resources.

    DELETE – It is used to delete the resources from the server.

    PUT – It is used to update an existing resources.

    PATCH – Modify the existing resources.

    HEAD – It is similar to GET. It is used to check whether a given resource is present.(In GET we get the resources from the server).

    OPTIONS – It is used to describe other HTTP methods or communication options for the target resources.

What are the advantages of REST web services?

  1. Support multiple resource file for data transfer like text, xml, JSON and image.
  2. It is fast or lightweight protocol.
  3. It provides the scalability (product might be scaled without any troubled.)

What are different resources in Web Services?

In REST every contents is a resource. These resources can be text files, html files, videos, images or database values. Each resource can be identifying on the server by URI (Uniform Resource Identifier).

What is the HTTP request attributes in REST API?

RESTful webservices used HTTP protocol to make communication between client and server. Client send the request in the form of HTTP request and receive response in form of a HTTP response. This is called messaging.

Different attributes used in HTTP Request:-

   Verb – It indicates the HTTP Methods such as GET, POST, DELETE, and PUT.

   URI- It stands for Uniform Resource Identifier, used to identify the resources on the server.

   HTTP Version– It indicates the HTTP version. For example – HTTP v1.1

   Request Header– It contains metadata in the form of key and value pairs for HTTP request message.

   Request Body– It contains message request which we want to post.

What is the HTTP response attributes in REST API?

 It has 4 major parts.

Status/Response Code – This is  used to convey the result of a client request. There are so many status codes which have different meaning. Some of them below

      200 – Response is Ok.

      202 – A resource is created on the server.

      400 – Bad Request. Something is wrong into request body.

      401 – Unauthorized user want to access resources.

HTTP Version– It indicates the HTTP version. For example – HTTP v1.1.

Response Header– It contains metadata in the form of key and value pairs for HTTP response message. For example- content length, content type, server type etc.

Response Body – It contains response message.

Can we maintain user session in web services?

 As we know web services is stateless so we can’t maintain user sessions in web services.

How to handle exception in RESTful web services?

 By using ExceptionMapper class we can handle it. It convert application level exception into HTTP response.


Hope this tutorial helpful for you and covered all basics level web services interview questions. In this we have covered about web services, types of web services, HTTP request and response, HTTP status code, SOAP and RESTful web services.

Leave a Comment