What is the difference between a webservice and an API? Is the difference more than the protocol used to transfer data? thanks.
相关问题
- Google places autocomplete suggestion without coun
- Karate API Testing - Access variable value across
- How to verify laravel passport api token in node /
- Converting byte array output into Blob corrupts fi
- How to handle “App is temporarily blocked from log
相关文章
- 我用scrapy写了一个蛮简单的爬虫怎么封装成一个api啊
- 后端给前端的API接口是怎么用代码写的
- Using JAX-WS 2.2.5 client with JDK/JRE 1.5
- Convert C# Object to Json Object
- Cannot use org.jvnet.jax-ws-commons.jaxws-maven-pl
- Android camera2 API get focus distance in AF mode
- How to create base64Binary data?
- Getting all listing images from an Etsy shop
API's are a published interface which defines how component A communicates with component B.
For example, Doubleclick have a published Java API which allows users to interrogate the database tables to get information about their online advertising campaign.
e.g. call GetNumberClicks (user name)
To implement the API, you have to add the Doubleclick .jar file to your class path. The call is local.
A web service is a form of API where the interface is defined by means of a WSDL. This allows remote calling of an interface over HTTP.
If Doubleclick implemented their interface as a web service, they would use something like Axis2 running inside Tomcat.
The remote user would call the web service
e.g. call GetNumberClicksWebService (user name)
and the GetNumberClicksWebService service would call GetNumberClicks locally.
API(Application Programming Interface), the full form itself suggests that its an Interface which allows you to program for your application with the help or support of some other Application's Interface which exposes some sort of functionality which is useful to your application.
E.g showing updated currency exchange rates on your website would need some third party Interface to program against unless you plan to have your own database with currency rates and regular updates to the same. This set of functionality is when already available with some one else and when they want to share it with others they have to have an endpoint to communicate with the others who are interested in such interactions so they deploy it on web by the means of web-services. This end point is nothing but interface of their application which you can program against hence API.
Check this http://en.wikipedia.org/wiki/Web_service
As the link mentioned then Web API is a development in Web services that most likely relates to Web 2.0, whereas SOAP based services are replaced by REST based communications. Note that REST services do not require XML, SOAP, or WSDL service-API definitions so this is major different to traditional web service.