Home / Interview / Web Services :: General Questions

Interview :: Web Services

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. Web services provide a common platform for various applications written in different languages to communicate with each other over the network.

Java Web Services API

java web services
2) How does a web service work?

A web service is used to communicate 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. You can also use C# to develop new web services on Windows invokes from your web application that is based on Java Server Pages (JSP) and runs on Linux.

web services
3) What are the advantages of web services?

These are some of the important advantages of web services:

  • Interoperability: With the help of web services, an application can communicate with other application developed in any language.
  • Reusability: We can expose the web service so that other applications can use it.
  • Modularity: With the help of web service, we can create a service for a specific task such as tax calculation.
  • A Standard protocol for every application program: Web services use standard protocol so that all the client applications written in different languages can understand it. This Standard protocol helps in achieving cross-platform.
  • Cheaper cost for communication: Web services uses SOAP over HTTP so that anybody can use existing internet for using web services.
4) What are the different types of web services?

There are two types of web services:

  • SOAP - It is an XML-based protocol for accessing web services.
  • RESTful - It is an architectural style, not a protocol.
types of web services
5) What are the main features of web services?

Following is a list of main features of web services:

  • It is available over the Internet or private (intranet) networks.
  • It uses a standardized XML messaging system.
  • It is not tied to any one operating system or programming language.
  • It is self-describing via a common XML grammar.
  • It is discoverable via a simple find mechanism.
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 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?

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:

  • : The message element in WSDL is used to define all different data elements for each operation performed by the web service.
  • : 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.
  • : This element contains the used protocol.