different between web api and web service
Answer1
A web service typically offers a WSDL from which you can create client stubs automatically. Web Services are based on the SOAP protocol. ASP.NET Web API is a newer Microsoft framework which helps you to build REST based interfaces. The response can be either JSON or XML, but there is no way to generate clients automatically because Web API does not offer a service description like the WSDL from Web Services. So it depends on your requirements which one of the techniques you want to use. Perhaps even WCF fits your requirements better, just look at the MSDN documentation.
Answer2
The basic difference between Web Services and Web APIs
Web Service:
1) It is a SOAP-based service and returns data as XML.
2) It only supports the HTTP protocol.
3) It is not open source but can be used by any client that understands XML.
5) It requires a SOAP protocol to receive and send data over the network, so it is not a light-weight architecture.
Web API:
1) A Web API is an HTTP based service and returns JSON or XML data by default.
2) It supports the HTTP protocol.
3) It can be hosted within an application or IIS.
4) It is open source and it can be used by any client that understands JSON or XML.
5) It is light-weight architectured and good for devices which have limited bandwidth, like mobile devices.
different between web api and web service的更多相关文章
- http服务 WCF、Web API、Web service、WCF REST之间的区别
http服务 WCF.Web API.Web service.WCF REST之间的区别 在.net平台下,有大量的技术让你创建一个HTTP服务,像Web Service,WCF,现在又出了Web ...
- Web API和Web Service
首先,Web API是由Web Service演变而来,它们两者关系就是所有Web Service都是API,但并非所有API都是Web Service.其次,两者都有利于信息的传输,但Web API ...
- Web APi之Web Host消息处理管道(六)
前言 我们知道Web API本身是无法提供请求-响应的机制,它是通过Web Host以及Self Host的寄宿的宿主方式来提供一个请求-响应的运行环境.二者都是将请求和响应抽象成HttpRespon ...
- 返璞归真 asp.net mvc (11) - asp.net mvc 4.0 新特性之自宿主 Web API, 在 WebForm 中提供 Web API, 通过 Web API 上传文件, .net 4.5 带来的更方便的异步操作
原文:返璞归真 asp.net mvc (11) - asp.net mvc 4.0 新特性之自宿主 Web API, 在 WebForm 中提供 Web API, 通过 Web API 上传文件, ...
- NET Web API和Web API Client Gen使Angular 2应用程序
使用ASP.NET Web API和Web API Client Gen使Angular 2应用程序的开发更加高效 本文介绍“ 为ASP.NET Web API生成TypeScript客户端API ” ...
- 不写画面的网页程序设计,Web API、Web Service、WCF Service
客户有一个系统,经常要连上我方,查询数据 以前的作法是给对方一个账号,让他可以连上我们的DB来查询. 所以,早期的同仁,真的给他们DB链接字符串 客户的Windows程序.网站就真的靠这么危险的方式, ...
- ASP.NET Web API——选择Web API还是WCF
WCF是.NET平台服务开发的一站式框架,那么为什么还要有ASP.NET Web API呢?简单来说,ASP.NET Web API的设计和构建只考虑了一件事情,那就是HTTP,而WCF的设计主要是考 ...
- Web API学习——Web API 强势入门指南
Web API是一个比较宽泛的概念.这里我们提到Web API特指ASP.NET Web API. 这篇文章中我们主要介绍Web API的主要功能以及与其他同类型框架的对比,最后通过一些相对复杂的实例 ...
- 使用BaiDu Java Script Web Api 在Web开发中嵌入地图使用步骤
前言 很多做企业网站的朋友,都喜欢有一个关于我们.联系我们的栏目,那么这个栏目放什么内容才能饱满那,只有放个地图才显得有点高大上. 一.产生并复制访问Api的密钥(AK) 1.首先我们需要注册一个百度 ...
随机推荐
- Laravel5.1 Middleware中间件(初级)
中间件?什么鬼? 大家第一次接触这个词都会有这么个疑问,但它其实没那么神秘. 一句话就可以解释它:过滤HTTP请求专用机制. 为什么要使用中间件? 过滤HTTP请求是可以写在别的地方,比如说控制器中 ...
- GUN C中的socket学习(一)
socket是用于通信的工具. 套接字其实是一个广义上的进程间通信的信道.就像pipe一样,在GUN环境下socket也被用一个文件表示.不同的socket文件可以用于不同的进程间通信,甚至可以用来在 ...
- 动软生成的WCP DAO层模板(不使用接口)
本实战是博主初次学习Java,分析WCP源码时,学习HibernateTools部分的实战,由于初次接触,难免错误,仅供参考,希望批评指正. 开发环境: Eclipse Version: Photon ...
- 【BZOJ1912】[Apio2010]patrol 巡逻 树形DP
[BZOJ1912][Apio2010]patrol 巡逻 Description Input 第一行包含两个整数 n, K(1 ≤ K ≤ 2).接下来 n – 1行,每行两个整数 a, b, 表示 ...
- debug_backtrace final catch
<?php function backtrace_str(){ $str = ''; $w = 0; $backtrace = debug_backtrace(); foreach($backt ...
- Extract, Transform, Load
w https://en.wikipedia.org/wiki/Extract,_transform,_load
- Qt Creator 如何支持并行?
PRO 文件中加入以下语句即可 #OpenMP QMAKE_CXXFLAGS += -openmp QMAKE_LFLAGS += -openmp
- 什么是PHP闭包???
闭包函数:临时创建一个没有名称的函数,经常作为回调函数来用. 通俗的说就是:子函数可以使用父函数中的局部变量,这种行为叫做闭包. 1.匿名函数赋值 $demo=function($str){ echo ...
- hive批量执行sql命令及使用小技巧
root@hadoop-senior hive-0.13.1]$ bin/hive -helpusage: hive -d, --define <key=value> Variable s ...
- 【生产问题】-dbcc checkdb报错-数据页故障
更多操作参考:https://www.cnblogs.com/gered/p/9435282.html [生产问题]-dbcc checkdb报错-数据页故障 数据页故障,索引页故障 use db_t ...