WEB SERVICE Vs WEB API
WEB SERVICE Vs WEB API
https://www.youtube.com/watch?v=WFtmCaqIjkA
https://www.youtube.com/watch?v=oTzNRv6X51o&list=PLhW3qG5bs-L9E2KV6vVdB-YTk-sRxmRAB
Web API: It acts as a interface between two different applications so that they can communicate with
each other.
: A set of routine, data structure, ,object classes, protocols provided by libraries ,operating
system service
to support the building of application.
**An API exactly defines method for one S/W program to interact with the other. An API generally
involves calling
functions from within a software program.
When this action involves sending data over a network, web services come in the picture. In case of web
application,
the API used is web based.
Example: Desktop application as spreadsheet and word document use VBA and COM based API which
does not invole web services.
**A web service is merely an API wrapped in HTTP. An API does not always need to be web based.
**An API can be exposed in a number of ways as COM object, DLL in C, Jar File in Java, XML and JSON
over HTTP.
** All Web services are API but vice versa is not correct.
** Web services uses three style: REST, SOAP and XML-RPC. API may use any style.
** Web services always needs a network for its operation but API does not.
**Web means http protocol, service means request/response, stateless protocol(send a request, receive
resposne and done)
Example: API
when you’re on a website, let’s say reading the news, and you see those little social media icons at the
top.
“Follow us on Facebook/Twitter/YouTube!” it says. Embedding social media plugins like this requires an
API.
Example: WebService
Oxford Dictionary API, in which you can send it a word, and it will reply with their meanings.
SOAP we Service: A web service which compiles to the SOAP web services specification is a SOAP web
service
All Information must exchange in Xml format. Xml message have a defined structure
SOAP MESSAGE
SOAP Message consist of : Envelop, Header, Body