Wednesday, November 21, 2012

web service interview questions

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.

3) Give me an example of real web service?
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.

7) Define SOAP?

SOAP is an XML based protocol to transfer between computers.


8) Define WSDL?

It means Web Services Description Language. It is basically the service description layer in the web service protocol stock. The Service Description layer describes the user interface to a web service.

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

23) What is REST?

REST stands for Representational State Transfer. REST itself is not a standard, while it uses various standards such as HTTP, URL, XML/HTML/GIF/JPEG (Resource Representations) and text/xml, text/html, image/gif, image/jpeg, etc (MIME Types).


25) Name the various communication channels in web service?

Web service is integrated with three protocols such as HTTP/POST, HTTP/GET, and SOAP. It provides three different communication channels to clients. Client can choose any communication method as per requirements.



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.



31) Can you name some standards used in web services?

The standards used in web services are WSDL (used to create interface definition), SOAP (used to structure data), HTTP (communication channels), DISCO (used to create discovery documents) and UDDI (used to create business registries).


33) Explain in brief, what UDDI is?

UDDI (Universal Description, Discovery, and Integration) provides consolidated directory for web services on the internet. Clients use UDDI to find web services as per their business needs. It basically hosts the web services from various companies. In order to share web services, you need to publish it in UDDI.

40) What are the steps performed by the client to access a web service?

First of all a web reference to the web service is created by the client in his application. Then a proxy class is generated. After that an object of the proxy class is created and at last, the web service is accessed via that proxy object.


44) Brief few drawbacks of using GET and POST methods to communicate with the web service?

These methods are less secure and inhibit users to pass structures and objects as arguments. Also, it doesn’t allow users to pass ByRef arguments.


48) Can you name different kinds of web services?

There are two types of web services in total i.e. SOAP based web service and RESTful web service.


49) What’s different in RESTful web services?

The RESTful web services contains no contract or WSDL file.


50) Give me few reasons to use RESTful web service?

The RESTFul web services are simple to implement and test. It supports various data formats such as XML, JSON etc.


http://www.gointerviews.com/top-50-web-services-interview-questions/


What is WSDL?


WSDL is an XML-based language for describing Web services and how to access them.

WSDL Describes Web Services

WSDL stands for Web Services Description Language.

WSDL is a document written in XML. The document describes a Web service. It specifies the location of the service and the operations (or methods) the service exposes.

http://www.w3schools.com/wsdl/wsdl_intro.asp


Does Web Service call is synchronous or asynchronous ?

An asynchronous web service allows a client to submit a request, process the request and respond to the client after a given time -- the client would not block all activity on receiving a response.

Comparatively, a web service that is synchronous would provide a client directly with a response, expecting the client to block all activity until a response is returned. In this case the web service would limit the client to process requests one at a time.


What is the difference between Java RMI and JMS?

RMI is a form of Remote Procedure Call (RPC). It is a lightweight, Java specific API that expects the caller and receiver to be available at the time of communication.

JMS is a reliable messaging subsystem. Messages can be passed even if one of the parties is not available. It is an alternative to things like MQSeries.

RMI doesn't deal with guaranteed delivery or asynchronous responses, JMS does.




difference between RMI, WebService, CORBA

RMI is Java's native method of invoking methods on objects that are located in a different JVM - Remote Method Invocation. It passes objects over the wire in binary, and can run either over the JRMP (Java Remote Method Protocol) or via IIOP (CORBA's Internet Inter-ORB Protocol)

CORBA is a language neutral remote method invocation protocol specified by the OMG standards group, and works with C/C++, Smalltalk, etc as well as with Java. CORBA laos sends data across the wire in binary format, and specifies interfaces in a scheme known as IDL (Interface Definition Language)

Web Services are remote invocations that are sent across the wire usually via SOAP (a flavour of XML data) over HTTP, but they can also go as SOAP/JMS, or other bindings - SMTP, etc

No comments:

Post a Comment