Skip to main content

Webservices Interview Questions

 

1. What is Web Service

The Web Service is a standard software system used for communication between two devices (client and server) over the network

or

Say exchanging information between two applications over the network.


2. How Does a Web Service Work?

A web service enables communication among various applications by using open standards such as HTML, XML, WSDL, and SOAP.

You can build a Java-based web service on Solaris that is accessible from your Visual Basic program that runs on Windows.


3. Explain web service architecture?

Web service framework architecture consists of three different layers.

Service Provider: Service provider role is to create the web service and makes it accessible to the client applications over the internet for their usage.

Service Requestor: Service Requestor is basically any consumer of web service like any client application. Client applications are written in any language. They contact web service for any type of functionality by sending XML requests over the available network connection.


Service Registry: Service Registry is the centralized directory that helps locate web services for client applications. Here we can find the existing web services, we can also create the new one.

The Service Provider uses the ‘Publish’ interface of Service Registry to make the existing web services available to client applications. With all the information provided by the Service Registry, the Service Requestor is able to bind or invoke services.


4. What are the different types of webservices?

SOAP It is an XML based protocol for accessing web services. RESTful It is an architectural style, not a protocol.


5. What is SOAP?

SOAP stands for Simple Object Access Protocol.

It is an XML based protocol for accessing web services. It is platform independent and language independent. By using SOAP, you can interact with other programming language applications.


6. What are the advantages of SOAP webservices?

WS Security SOAP defines its security known as WS Security.

Language Independent Its web services can be written in any programming language

Platform Independent Its web services can be executed on any platform.


7. What are the disadvantages of SOAP webservices?

Slow It uses XML format that must be parsed to be read and defines many standards that must be followed while developing the SOAP applications. So it is slow and consumes more bandwidth and resource.

WSDL Dependent It uses WSDL and doesn't have any other mechanism to discover the service.


8. What is WSDL?

WSDL stands for Web Service Description Language. WSDL is an XML based document that provides technical details about the web service. Elements used in Web Services Description language

  • Method name
  • Port types
  • Service end point
  • Binding
  • Method parameters


9. What is UDDI?

UDDI is acronym for Universal Description, Discovery and Integration.

UDDI is a directory of web services where client applications can lookup for web services. Web Services can register to the UDDI server and make them available to client applications. WSDL is the part of UDDI


10. Which language is used by UDDI?

UDDI uses the language known as WSDL (Web Service Description Language)


11. What is RESTful web services?

The REST stands for Representational State Transfer. It is an architectural style. It is not a protocol like SOAP

When web services use HTTP methods to implement the concept of REST architecture, then it is known as RESTful Web services. In this architectural style, data and functionality are served as resources and are accessed by URI (Uniform Resource identifier).


12. Explain the advantages of RESTful web services?

Advantages of RESTful web services:

They are considered as language and platform independent as these can be written in any programming language and can be executed on any platform.

REST is a lightweight protocol and is considered as fast because of less consumption of bandwidth and resources.

It supports multiple technologies and different data formats like plain text, XML, JSON, etc.

It has loosely coupled implementation and can be tested easily over browsers.


13. Explain different HTTP methods supported by RESTful web services?

  1. GET: Read only access to the resource.
  2. PUT: Creation of new resources.
  3. DELETE: Removal of a resource.
  4. POST: Update of an existing resource.
  5. OPTIONS: Get supported operations on the resource.
  6. HEAD: Returns HTTP header only, nobody.


14. What are tools could be used for API testing?

  1. Katalon Studio
  2. Postman
  3. SoapUi Pro
  4. Apigee


15. What are differences between API Testing and UI Testing?

API enables communication between two separate software systems.

UI ( User Interface) testing refers to testing graphical interface such as how users interact with the applications, testing application elements like fonts, images, layouts etc. UI testing basically focuses on look and feel of an application


16. What is HTTP?

HTTP stands for Hyper Text Transfer Protocol

HTTP is the most popular option for service transport. HTTP is simple, stable, and widely deployed. Furthermore, most firewalls allow HTTP traffic.


17. What is BEEP?

BEEP stands for Blocks Extensible Exchange Protocol.

This is a alternative to HTTP. BEEP is a new Internet Engineering Task Force (IETF) framework for building new protocols. BEEP is layered directly on TCP and includes a number of built in features, including an initial handshake protocol, authentication, security, and error handling. Using BEEP, one can create new protocols for a variety of applications, including instant messaging, file transfer, content syndication, and network management.


18. What is XML RPC?

XML RPC(remote procedure call) is a simple protocol that uses XML messages to perform RPCs. Requests are encoded in XML and sent via HTTP POST. XML responses are embedded in the body of the HTTP response.


19. What is the difference between HTTP vs HTTPS

HTTP stands for Hypertext Transfer Protocol. At it’s most basic, it allows for the communication between different systems. It’s most commonly used to transfer data from a web server to a browser in order to allow users to view web pages. It’s the protocol that was used for basically all early websites.

HTTPS stands for Hypertext Transfer Protocol Secure. The problem with the regular HTTP protocol is that the information that flows from server to browser is not encrypted, which means it can be easily stolen. HTTPS protocols remedy this by using an SSL (secure sockets layer) certificate, which helps create a secure encrypted connection between the server and the browser, thereby protecting potentially sensitive information from being stolen as it is transferred between the server and the browser.


20. What is Interoperability in Web services?

The Web services facilitate various applications to communicate with each other and share data and services among themselves. Other applications can also use the web services. For example, a VB or .NET application can communicate with a Java web services and vice versa. Web services are used to make the application platform and technology independent.


21 Explain different types of HTTP Status Codes

  1. 1xx: Informational Communicates transfer protocol level information.
  2. 2xx: Success Indicates that the client’s request was accepted successfully.
  3. 3xx: Redirection Indicates that the client must take some additional action in order to complete their request.
  4. 4xx: Client Error This category of error status codes points the finger at clients.
  5. 5xx: Server Error The server takes responsibility for these error status codes.



22. Explain HTTP Status 1xx Codes

  1. 100 Continue Indicates the client that the initial part of the request has been received and has not yet been rejected by the server. The client SHOULD continue by sending the remainder of the request or, if the request has already been completed, ignore this response.
  2. 101 Switching Protocol Sent in response to an Upgrade request header from the client, and indicates the protocol the server is switching to.
  3. 102 Processing (WebDAV) Indicates that the server has received and is processing the request, but no response is available yet.
  4. 103 Early Hints Primarily intended to be used with the Link header. It suggests the user agent start preloading the resources while the server prepares a final response.


23. Explain HTTP Status 2xx Codes

  1. 200 OK Indicates that request has succeeded.
  2. 201 Created Indicates that request has succeeded and a new resource has been created as a result.
  3. 202 Accepted Indicates that the request has been received but not completed yet. It is typically used in log running requests and batch processing.
  4. 203 Non Authoritative Information Indicates that the returned metainformation in the entity header is not the definitive set a s available from the origin server, but is gathered from a local or a third party copy. The set presented MAY be a subset or superset of the original version.
  5. 204 No Content The server has fulfilled the request but does not need to return a response body. The server may return the updated meta information.
  6. 205 Reset Content Indicates the client to reset the document which sent this request.
  7. 206 Partial Content It is used when the Range header is sent from the client to request only part of a resource.
  8. 207 Multi Status (WebDAV) An indicator to a client that multiple operations happened, and that the status for each operation c an be found in the body of the response.
  9. 208 Already Reported (WebDAV) Allows a client to tell the server that the same resource (with the same binding) was mentioned earlier. It never appears as a true HTTP response code in the status line, and only appears in bodies.
  10. 226 IM Used The server has fulfilled a GET request for the resource, and the response is a representation of the result of one


24. Explain HTTP Status 3xx Codes

  1. 300 Multiple Choices The request has more than one possible response. The user agent or user should choose one of them.
  2. 301 Moved Permanently The URL of the requested resource has been changed permanently. The new URL is given by the Location header field in the response. This response is cacheable unless indicated otherwise.
  3. 302 Found The URL of the requested resource has been changed temporarily. The new URL is given by the Location field in the response. This response is only cacheable if indicated by a Cache Control or Expires header field.

  4. 303 See Other The response can be found under a different URI and SHOULD be retrieved using a GET method on that resource.
  5. 304 Not Modified Indicates the client that the response has not been modified, so the client can continue to use the same cached version of the response.
  6. 305 Use Proxy (Deprecated) Indicates that a requested response must be accessed by a proxy.
  7. 306 (Unused) It is a reserved status code and is not used anymore.
  8. 307 Temporary Redirect Indicates the client to get the requested resource at another URI with same method that was used in the prior request. It is similar to 302 Found with one exception that the same HTTP method will be used that was used in the prior request
  9. 308 Permanent Redirect (experimental) Indicates that the resource is now permanently located at another URI, specified by the Location header. It is similar to 301 Moved Permanently with one exception that the same HTTP method will be used that was used in the prior request.


25. Explain HTTP Status 4xx Codes

  1. 400 Bad Request The request could not be understood by the server due to incorrect syntax. The client SHOULD NOT repeat the re quest without modifications.
  2. 401 Unauthorized Indicates that the request requires user authentication information. The client MAY repeat the request with a suitable Authorization header field
  3. 402 Payment Required (Experimental) Reserved for future use. It is aimed for using in the digital payment systems.
  4. 403 Forbidden Unauthorized request. The client does not have access rights to the content. Unlike 401, the client’s identity i s known to the server.
  5. 404 Not Found The server can not find the requested resource.
  6. 405 Method Not Allowed The request HTTP method is known by the server but has been disabled and cannot be used for that resource.
  7. 406 Not Acceptable The server doesn’t find any content that conforms to the criteria given by the user agent in the Accept header sent in the request.
  8. 407 Proxy Authentication Required Indicates that the client must first authenticate itself with the proxy.
  9. 408 Request Timeout Indicates that the server did not receive a complete request from the client within the server’s allotted timeout period.
  10. 409 Conflict , 410 Gone , 
  11. 411 Length Required, 
  12. 412 Precondition Failed , 
  13. 413 Request Entity Too Large , 
  14. 414 Request URI Too Long ,, 
  15. 415 Unsupported Media Type,
  16. 416 Requested Range Not Satisfiable, 
  17. 417 Expectation Failed, 
  18. 418 I’m a teapot (RFC 2324), 
  19. 420 Enhance Your Calm (Twitter), 
  20. 422 Unprocessable Entity (WebDAV),
  21. 423 Locked (WebDAV) , 
  22. 424 Failed Dependency (WebDAV), 
  23. 425 Too Early (WebDAV), 
  24. 426 Upgrade Required, 
  25. 428 Precondition Required, 
  26. 429 Too Many Requests,
  27. 431 Request Header Fields Too Large, 
  28. 444 No Response (Nginx), 
  29. 449 Retry With (Microsoft), 
  30. 450 Blocked by Windows Parent al Controls (Microsoft), 
  31. 451 Unavailable For Legal Reasons, 
  32. 499 Client Closed Request (Nginx)


26. Explain HTTP Status 5xx Codes

  1. 500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request.
  2. 501 Not Implemented The HTTP method is not supported by the server and cannot be handled.
  3. 502 Bad Gateway The server got an invalid response while working as a gateway to get a response needed to handle the request.
  4. 503 Service Unavailable The server is not ready to handle the request.
  5. 504 Gateway Timeout The server is acting as a gateway and cannot get a response in time for a request.
  6. 505 HTTP Version Not Supported (Experimental) The HTTP version used in the request is not supported by the server.
  7. 506 Variant Also Negotiates (Experimental) Indicates that the server has an internal configuration error: the chosen variant resource is
  8. configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.
  9. 507 Insufficient Storage (WebDAV) The method could not be performed on the resource because the server is unable to store the
  10. representation needed to successfully complete the request.
  11. 508 Loop Detected (WebDAV) The server detected an infinite loop while processing the request.
  12. 510 Not Extended further extensions to the request are required for the server to fulfil it.
  13. 511 Network Authentication Required Indicates that the client needs to authenticate to gain network access.







Comments

Popular posts from this blog

Java Program to Swap Two Numbers

In this program, you'll learn two techniques to swap two numbers in Java. The first one uses a temporary variable for swapping, while the second one doesn't use any temporary variables. To understand this example, you should have knowledge of the following Java programming topics: Basics of Java  Java Operators  Java Data types  Program with Temp Variable : The output of the program is : before swapping value of a:5 value of b:10 after swapping value of a:10 value of b:5 Program without temp variable :  the output of the above program will be: before swapping value of first:5 value of second:10 after swapping value of first:10 value of second:5 Follow my session on youtube : 

Selenium introduction

Selenium introduction and its components: Selenium was created by Jason Huggins in 2004. An engineer at ThoughtWorks, he was working on a web application that required frequent testing. First tool was named as “JavaScriptTestRunner” later named as “Selenium Core” Selenium is a functional automation tool for web applications Selenium is an open-source Selenium can support multiple languages like HTML, java, python, ruby, Perl, PHP and C# Can support multiple browsers like IE, Google Chrome, Mozilla Firefox, Safari and Opera Supports the Operating systems like Windows, Linux, and Mac. Selenium is mainly built-in 4 Components Selenium IDE (Integrated Development Environment) Selenium RC (Remote Control) Selenium WebDriver Selenium Grid Selenium IDE (Integrated Development Environment): Selenium IDE is a simple record and playback tool which comes as an add-on for Mozilla Firefox only. Test cases written in IDE can be ex