Top 39 Web Services Interview Questions: Here are the top interview questions of Web Services. Be prepared for the interview. You can download the entire questions in a pdf format. so guys All the best for your interview.
1) Define Web Service?
A web service is a kind of software that is accessible on the Internet. It makes use of the XML messaging system and offers an easy to understand, interface for the end users.
2) What is new in this field for past few years?
The initiation of XML in this field is the advancement that provides web service a single language to communicate in between the RPCs, web services and their directories.
3) Give me an example of real web service?
One example of web services is IBM Web Services browser. You can get it from IBM Alphaworks site. This browser shows various demos related to web services. Basically, web services can be used with the help of SOAP, WSDL, and UDDI. All these, provide a plug-and-play interface for using web services such as stock-quote service, a traffic-report service, weather service, etc.
4) How you define web service protocol stack?
It is basically a set of various protocols that can be used to explore and execute web services. The entire stack has four layers i.e. Service Transport, XML Messaging, Service Description, and Service Discovery.
5) Can you define each of these layers of protocol stack?
Top 39 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 offers simple publish functionality, such as UDDI.
6) What is SOAP?
The 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.
7) What are the advantages of SOAP web services?
These are some of the important advantages of SOAP web services:
- 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.
8) What are the disadvantages of SOAP web services?
These are some of the important disadvantages of SOAP web services:
- 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.
9) What are the main features of SOAP?
The following list specifies the features of SOAP:
- SOAP is a communication protocol.
- SOAP communicates between applications.
- SOAP is a format for sending messages.
- SOAP is designed to communicate via the Internet.
- SOAP is platform independent.
- SOAP is language independent.
- SOAP is simple and extensible.
- SOAP allows you to get around firewalls.
- SOAP developed as a W3C standard.
10) What is WSDL?
Top 39 Web Services Interview Questions 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.
11) Explain BEEP?
BEEP stands for Blocks Extensible Exchange Protocol. BEEP is determined as building new protocols for a variety of applications such as instant messaging, network management, file transfer, etc. It is termed as a new Internet Engineering Task Force (IETF) which is layered directly over TCP. It has some built-in features like
- Error handling
- Handshake Protocol
12) Enlist few tools used to test web services?
Ans: To test Web services, below-mentioned tools are used
- REST client
13) Do we require any special application to access web service?
Ans: The only requirement for accessing web services from any application is that it must support XML-based request and response. There is no need or say the requirement of installing an application for accessing web services.
14) Define Entrust Privacy Service?
As its name implies, it deals with security and confidentiality. This service encrypts data to ensure that only concerned parties can access the data.
15) What do you mean by PKI?
It means Public-Key Infrastructure.
16) What tools are used to test a web service?
I have used SoapUI for SOAP WS and Firefox poster plugin for RESTFul Services.
17) Differentiate between a SOA and a Web service?
SOA is a design and architecture to implement other services. SOA can be easily implemented using various protocols such as HTTP, HTTPS, JMS, SMTP, RMI, IIOP, RPC, etc. While Web service, itself is an implemented technology. In fact, one can implement SOA using web service.
18) Discuss various approaches to develop SOAP based web service?
Top 39 Web Services Interview Questions We can develop SOAP-based web service with two different types of approaches such as contract-first and contract-last. In the first approach, the contract is defined first and then the classes are derived from the contract while in the later one, the classes are defined first and then the contract is derived from these classes.
19) If you have to choose one approach, then what will be your choice?
In my point of view, the first approach that is the contract-first approach is more feasible as compared to the second one but still, it depends on other factors too.
20) Is there any special application required to access web service?
No, you don’t need to install any special application to access web service. You can access web service from any application that supports XML based object request and response.
21) What are the advantages of having XML based Web services?
22) What do you mean by synchronicity?
Synchronicity is used to bind the client to the execution of the service. In synchronous invocations, the client blocks and waits for the service to complete its operation before continuing. On the other hand, synchronous operations facilitate a client to invoke a service and then execute different functions.
23) What is the usage of Service Transport Layer in Web service protocol stack?
The Service Transport Layer is used to transport messages between applications.
This layer includes Hypertext Transport Protocol (HTTP), Simple Mail Transfer Protocol (SMTP), File Transfer Protocol (FTP), and newer protocols like Blocks Extensible Exchange Protocol (BEEP).
24) What is the usage of Service Description layer in Web Service Protocol Stack?
The Service Description layer is used to describe the public interface to a specific web service. Currently, service description is handled via the Web Service Description Language (WSDL).
25) What is the usage of Service Discovery layer in Web Service Protocol Stack?
Top 39 Web Services Interview Questions The Service Discovery layer is used for centralizing services into a universal registry and providing easy publish/find functionality.
Currently, service discovery is handled via Universal Description, Discovery, and Integration (UDDI).
26) How can you document web service?
Web services are contemplated as self-documenting because they provide entire information regarding the available methods and parameters used for XML based standard, known as WSDL. One can also provide more information to explain web services via their own WebService and WebMethod attributes.
27) What are the situations, when we need ASP.NET web services?
ASP.NET web services are used when one needs to implement the three-tier architecture in a web service. It allows handy ways to use middle-tier components through the internet. The main advantage of .NET Web services is that they are capable enough to communicate across firewalls because they use SOAP as a transport protocol.
28) What are distributed technologies?
The increasing ratio of distributed applications has raised the demand for distributed technologies. It allows segmenting of application units and transferring them to different computers on different networks.
29) Differentiate between web services, CORBA and DCOM?
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.
30) Can you tell few benefits of web services?
The biggest advantage of web service is that is supported by a wide variety of platforms. Moreover, in the near future, web services may spread its boundary and enhance new methods that will provide ease to clients. The enhancement will not affect the clients, even if they offer old methods and parameters.
31) What is XML-RPC?
Top 39 Web Services Interview Questions The RPC is Remote Procedure Call. It is the method used for calling a procedure or function available on any remote computer on the web.
XML-RPC refers to a simple protocol used to perform RPCs by using XML messaging. It is an excellent tool for connecting different environments and also establishing connections between wide varieties of computers.
32) Explain BEEP?
The BEEP stands for Blocks Extensible Exchange Protocol. BEEP is an alternative to HTTP and FTP. BEEP is determined as building new protocols for a variety of applications such as instant messaging, network management, file transfer. It is termed as a new Internet Engineering Task Force (IETF) which is layered directly over TCP.
Some of the Build-in features of BEEP protocol are listed below:
- Error handling
- Initial Handshake Protocol
33) What are the requirements to access a Web Service?
The requirement for accessing web services from any application is that should support XML-based request and response. Hence there is no need to install any app for accessing web services.
34) Which language does UDDI use?
The UDDI uses the language known as WSDL (Web Service Description Language).
35) Explain different HTTP methods supported by RESTful web services?
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.
- PUT: Creation of new resource.
- DELETE: Removal of a resource.
- POST: Update of an existing resource.
- OPTIONS: Get supported operations on the resource.
- HEAD: Returns HTTP header only, nobody.
36) How a .NET web service is consumed?
Since we know that web services are constructed on XML standards. Therefore, clients need to have a complete understanding of XML-based messages to interchange messages. Clients can communicate with web services through .NET framework that offers proxy mechanisms. These proxy mechanisms have detailed information regarding data sharing within web services that can be easily used by the clients.
37) Can you name the two Microsoft solutions for distributed applications?
The two Microsoft solutions for distributed applications are .NET Web Services and .NET Remoting.
38) Differentiate between .NET Web Services and .NET Remoting?
As far as the protocol is concerned, .NET Web Service uses HTTP, while, .NET Remoting uses any protocol i.e. TCP/HTTP/SMTP. When it comes to performance, .NET Remoting is comparatively, faster than.NET Web Service. Also, as .NET Web Services are hosted via IIS, therefore, it is far more reliable than the .NET Remoting.
39) Name the components to be published while deploying a Web Service?
The components that need to be published during a web service deployment are Web Application Directory, Webservice.asmx File, Webservice.Disco File, Web.Config File and Bin Directory.