WCF - Versus Web Service
There are some major differences that exist between WCF and a Web service which are listed below.
这里总结了WCF和网络服务之间主要的不同之处
Attributes - WCF service is defined by ServiceContract and OperationContract attributes, whereas a web service is defined by WebService and WebMethod attributes.
Protocols - WCF supports a range of protocols, i.e., HTTP, Named Pipes, TCP, and MSMQ, whereas a web service only supports HTTP protocol.
Hosting Mechanisms - Various activation mechanisms are there for WCF hosting, i.e., IIS (Internet Information Service), WAS (Windows Activation Service), Self-hosting and Windows Service, but a web service is hosted only by IIS.
Services - WCF supports a robust security, trustworthy messaging, transaction and interoperability, while a web service only supports security services.
Serializer - WCF Supports DataContract serializer by employing System.Runtime.Serialization, whereas a web service supports XML serializer by making use of System.Xml.Serialization.
Tools - ServiceMetadata tool (svcutil.exe) is used for client generation for a WCF service, while WSDL.EXE tool is used for generating the same for a web service.
Exception Handling - In WCF, unhandled exceptions are handled in a better way by making use of FaultContract. They do not return to the client like in a web service as SOAP faults.
Has
1.特质:WCF服务由服务契约和操作契约定义,然而web服务是由WebService以及WebMethod属性来定义的
2.协议:WCF支持一系列的协议,例如HTTP、命名管道、消息队列,然而web服务仅仅支持HTTP协议
3.托管机制:wcf有各种可用的机制,例如IIS(互联网信息服务)、WAS(windows激活服务)、Self-hosting(自托管)以及windows服务,但是webService仅仅支持IIS
4.服务:wcf提供了一个稳健的安全,可靠的消息,事务以及互操作性。然而webService仅仅支持安全服务
5.序列化器:wCF通过使用System.Runtime.Serialization提供数据契约序列化器,然而webservice是通过使用System.Xml.Serialization来支持XML序列化器的
6.工具:svcutil.exe被客户端用来生成一个wcf服务,然而webservice使用WSDL.EXE工具
7.异常处理:在wcf中,未处理的异常会由faultContract来以一种较好的方式来处理。wcf并不会像webservice那样将未处理的异常作为soap故障返回给客户端
你好
WCF - Versus Web Service的更多相关文章
- wcf和web service的区别
1.WebService:严格来说是行业标准,不是技术,使用XML扩展标记语言来表示数据(这个是夸语言和平台的关键).微软的Web服务实现称为ASP.NET Web Service.它使用Soap简单 ...
- WCF和Web Service的 区(guan)别(xi)
参考文献:http://social.microsoft.com/Forums/zh-CN/c06420d1-69ba-4aa6-abe5-242e3213b68f/wcf-webservice 之前 ...
- Web API、WCF和Web Service的区别
[转载] Web Service 1.它是基于SOAP协议的,数据格式是XML 2.只支持HTTP协议 3.它不是开源的,但可以被任意一个了解XML的人使用 4.它只能部署在IIS上 WCF 1.这个 ...
- WCF与 Web Service的区别是什么?各自的优点在哪里呢?
这是很多.NET开发人员容易搞错的问题.面试的时候也经常遇到,初学者也很难分快速弄明白 Web service: .net技术中其实就指ASP.NET Web Service,用的时间比较长,微软其实 ...
- Web Service和WCF的区别。其实二者不属于一个范畴!!!
Web Service和WCF的区别 [1]Web Service:严格来说是行业标准,也就是Web Service 规范. 它有一套完成的规范体系标准,而且在持续不断的更新完善中. 它使用XML扩展 ...
- Web Service和WCF的到底有什么区别
[1]Web Service:严格来说是行业标准,也就是Web Service 规范,也称作WS-*规范,既不是框架,也不是技术. 它有一套完成的规范体系标准,而且在持续不断的更新完善中. 它使用XM ...
- (转)Web Service和WCF的到底有什么区别
[1]Web Service:严格来说是行业标准,也就是Web Service 规范,也称作WS-*规范,既不是框架,也不是技术. 它有一套完成的规范体系标准,而且在持续不断的更新完善中. 它使用XM ...
- 【转载】Web Service和WCF的到底有什么区别
[1]Web Service:严格来说是行业标准,也就是Web Service 规范,也称作WS-*规范,既不是框架,也不是技术. 它有一套完成的规范体系标准,而且在持续不断的更新完善中. 它使用XM ...
- Web Service和WCF的区别
[1]Web Service:严格来说是行业标准,也就是Web Service 规范,也称作WS-*规范,既不是框架,也不是技术. 它有一套完成的规范体系标准,而且在持续不断的更新完善中. 它使用XM ...
随机推荐
- Json字符与Json对象的相互转换
Json字符与Json对象的相互转换方式有很多,接下来将为大家一一介绍下,感兴趣的朋友可以参考下哈,希望可以帮助到你 1>jQuery插件支持的转换方式: 复制代码 代码如下: $.parseJ ...
- gradle使用国内源
// 设置 maven 库地址 repositories { maven { url 'http://maven.oschina.net/content/groups/public/' } } ...
- free -m
free -m total used free shared buffers cached Mem: 7760 1572 6187 0 9 ...
- NHibernate多对多关联映射的实现
上次用EF演示了数据库多对多关系的操作,这次我们还是引用上次的案例,来演示如何在C#当中使用NHibernate. 首先介绍一下NHibernate框架的来源.熟悉Java编程的读者肯定知道Hiber ...
- google map android api v2
我在这主要列举几个需要注意的问题: 1.需要注意使用的api版本的问题,例如google map android api v1就和v2差别很大,包括申请key方面,所以在搜索资料的时候一定注意版本问题 ...
- 手机的touch事件(基于jquery)
javascript代码: $.swipe=function(opt){ var o = $.extend({ mainSelector:"", swipeLe ...
- Binding的源和路径
书上写着:Binding的源也就是数据的源头.Binding对于源的要求很简单-只要他是一个对象!并且通过属性(Property)公开自己的数据,它就可以作为Binding的源了.就像上一篇我写的那个 ...
- python 脚本
mag3.py 1,import import sys from org.eclipse.jface.dialogs import MessageDialogfrom org.eclipse.core ...
- js: get event handler bound to the element
jQuery._data(jQuery(this)[0], "events" ).click[0].handler $._data( $("#myabc")[0 ...
- Grails默认首页的修改
有些人使用IDEA开发Grails,开发阶段使用Grails自带的默认首页可以方便我们开发,但是开发结束后想要修改默认的首页,如何修改呢? 1.打开grails-app 文件下conf下的UrlMap ...