The difference between WCF and WebService

Source: Internet
Author: User
Tags hosting managed hosting msmq

1.WebService: Strictly industry standard, not technology, uses XML Extensible Markup language to represent the data (this is the key to the Kua language and the platform). Microsoft's Web service implementations are called ASP. It uses the SOAP simple Object Access protocol to implement data interactions between applications in a distributed environment. WSDL to implement a service interface-related description.     In addition, Web services can be registered with the UDDI Center for use by its customers. Later, Microsoft made ASP. NET Web service security, performance, data encryption, decryption, managed hosting, and many other extensions, called the WSE series, this is over-product, up to WSE3.0. And then it was the WCF era.

2.WCF: To a certain extent, ASP. NET Web service, because it supports the industry standard and core protocols of Web service, so what ASP. NET Web service and WSE can do, it is almost capable,   Cross-platform and language is not a problem (the data also supports XML formatting and provides its own formatter). But WCF, as Microsoft's main push for a communications component or platform, aims not only to support and integrate Web Service, because it is also compatible and has the features of many of Microsoft's early technologies.

According to Microsoft's official explanation, WCF (previously known as "Indigo") is a unified framework for building and running service-oriented services (oriented) applications using managed code. It enables developers to build a secure, trustworthy, transactional solution across platforms that can be compatible with existing systems. WCF is the integrator of Microsoft's distributed application development, which integrates. NET platform, all technologies related to distributed systems, such as Enterprise Sevices (COM +). NET Remoting, Web Service (ASMX), WSE3.0, and MSMQ Message Queuing. In the context of communication (communiation), it can span processes, across machines, across subnets, corporate networks and the Internet, and in the host program, you can host Asp.net,exe,wpf,windows forms,nt service,com+ (Host). WCF can support protocols including tcp,http, cross-process and custom, and security mode includes SAML, kerberos,x509, user/password, custom and many other standards and patterns. That is, under the WCF framework, it is easy to develop a distributed system based on SOA, and Microsoft has included all the technical elements associated with it, mastering WCF as the key to opening the door to SOA.

WCF has the following advantages:

1, Unity has been described before, WCF is for asmx,.net Remoting,enterprise SERVICE,WSE,MSMQ and other technology integration. Because WCF is written entirely by managed code, the application that develops WCF is not much different from developing other. NET applications, and we can still use WCF to create service-oriented applications like creating object-oriented applications.

2. Interoperability because the most basic communication mechanism for WCF is soap (Simple Object access Protocol), which guarantees interoperability between systems, even when running in a different context. This communication can be based on the. NET to. NET communication, as shown in: Can cross-process, cross-machine and even cross-platform communication, as long as the standard web Service support, such as the Java EE Application Server (such as Websphere,weblogic). The application can run under the Windows operating system, or it can run on other operating systems, such as Sun solaris,hp unix,linux and so on. As shown in the following:

3, security and trustworthy ws-security,ws-trust and ws-secureconversation are added to the SOAP message for user authentication, data integrity verification, data privacy and many other security factors. Added ws-reliablemessaging in the header of soap to allow trustworthy end-to-end communication. In the case of Ws-coordination and Ws-atomictransaction-based information exchanged in SOAP format, two-phase transaction commits (two-phase commit transactions) are supported.

Many of the above Ws-policy are supported in WCF. For messaging, SOAP is the basic Protocol for Web service, which contains the message header (header) and the body of the message (body). In the message header, the address information that Ws-addressing uses to locate the SOAP message is defined, along with the MTOM (message transfer optimization mechanism, MSG transmission optimization mechanism). :

4, compatibility WCF fully takes into account the compatibility with the old system. Installing WCF does not affect legacy technologies such as ASMX and. Net Remoting. Even for WCF and ASMX, although both use SOAP, WCF-developed-based applications can still interact directly with ASMX.

More The Difference

WCF supports multiple communication protocols Http/https, TCP/UDP, MSMQ, Named Pipes, Peers,

Messaging accessibility, transaction flow, and so on.

WCF can integrate with ASP, share a context (HttpContext).

WCF supports a variety of message transmission formats: Text,binary,mtom,json, and so on.

WCF security is stronger: supports symmetric security, asymmetric security, message security, transport security,

SSL streaming security, Windows streaming security, and so on.

WCF supports multiple session modes: one-way, two-way, request/response.

WCF supports rest.

WCF supports a variety of formatting methods. DataContractSerializer, XmlSerializer,

DataContractJsonSerializer and so on.

WCF supports was hosting, Windows service hosting, Self-hosting, IIS hosting, and so on.

WCF supports multiple concurrency modes: singleton, monotonic, session.

Original link: http://www.68study.com/Article/ArticleDetails/ec575e13-e838-4c55-bd04-fc4c63549876

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.