Tuesday, January 6, 2015

Web Services Interview Questions

What types of operations are available in WSDL?

There are four operations available:
1. One-way, where the operation can receive a message but will not return a response.
2. Request-response, where the operation can receive a request and will return a response.
3. Solicit-response, where the operation can send a request and will wait for a response.
4. Notification, where the operation can send a message but will not wait for a response.
What tools are used to test a web service?
I have used SoapUI for SOAP WS and Firefox poster plugin for RESTFul Services.

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 the web service.

Discuss various approaches to develop SOAP based web service?
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.
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.
Can you name few free and commercial frameworks for web services?
The frameworks I know are Apache Axis2, JAX-WS Reference Implementation, JAX-RS Reference Implementation, Metro, Apache CXF, MS.NET and Java 6.
Explain in brief, what DISCO is?
DISCO means discovery. It groups the list of interrelated web services. The organization that provides web services, issues a DISCO file on its server and that file contains the links of all the provided web services. This standard is good when client knows the company already. Also it can be used within a local network as well.

Define a REST web service.

REST is Representational State Transfer and it is a network of web pages where the client progresses through an application by selecting links. REST is an architectural style that uses existing standards such as HTTP.

What is SOAP?

Simple Object Access Protocol
<soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">

<soap:Header>

</soap:Header>

<soap:Body>

  <soap:Fault>
  
  </soap:Fault>
</soap:Body>

</soap:Envelope
WSDL file contains following :

<types>data type definitions used by the web service
<message>typed definition of the data being communicated
<portType>set of operations supported by one or more endpoints
<binding>protocol and data format specification for a particular port type

No comments: