zoukankan      html  css  js  c++  java
  • WCF

    https://www.tutorialspoint.com/wcf/wcf_versus_web_service.htm

    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故障返回给客户端

  • 相关阅读:
    更换惠普G32笔记本的风扇和硬盘,内存条, 谨记 要做好CPU和显卡的 导热硅脂工作!
    怎么更新 WIN10里的SMBv1协议
    ubuntu-12.04.5-desktop-amd64 安装vmwaretools
    如何解决“ VMware Workstation 不可恢复错误: (vcpu-0) vcpu-0:VERIFY vmcore/vmm/main/cpuid.c:386 bugNr=1036521”
    联想移动硬盘无法访问 解决方法1
    阮一峰 ---开发者手册
    Earth Wind 一个查看全球风向的网站
    Linux帮助用法
    Linux历史命令管理以及用法
    Linux操作练习
  • 原文地址:https://www.cnblogs.com/chucklu/p/4628502.html
Copyright © 2011-2022 走看看