Search This Blog

Thursday, November 29, 2012

Difference between http call and webservice


HTTP call is a pure HTTP Request/Reponse using GET and POST. 

Webservice can be implemented via HTTP/JMS/MQ 

As far as the transport protocol is concerned, HTTP is pretty similar to both XML and Web Service. In case of a general HTTP call, XML message is transported over HTTP protocol, and SOAP message is transported over HTTP protocol in case of a web service. 

But, the kind of message that's being transported over this HTTP protocol really matters. XML differs a lot from a SOAP Message. While XML is specific to one transaction and to one particular system, a SOAP Message can be made generic to multiple systems. 

Difference between web application and web service?


Web application: 
================
any application which resides on a server, but meant for use by humans,
which uses web pages as the presentation layer. All user interactivity (the GUI) is done
through web pages, but all data is stored and (mostly) manipulated on the server.

Web service:
===========
server-based application (as above) which may be accessed over the web via HTTP, but is
meant primarily for interaction with other programs. Thus, it will have a clearly-defined API
which consists of providing responses to HTTP GET and POST requests made by a remote application.
Now, this doesn't mean you can't access a web service from your browser, but it means that the
application won't necessarily have a GUI user interface. You will most likely, for example,
receive all results of GET and POST requests as strings of XML, which requires a client-side parser.

So, think of web applications as completed user interfaces, while web services are more intended to
be application components or "libraries" which can be used by other applications. Essentially,
web services are to distributed applications what DLLs or class libraries are to most traditional
compiled applications.

Also, this means that a web service has to have a more organized design that most web applications,
because there won't necessarily be a human at the other end who can figure out through trial and
error what the app does. This is why the whole concept of "web services" has brought a whole new
set of acronyms such as SOAP, UDDI, etc...