Differences between WCF and WebService

Source: Internet
Author: User
Tags windows hosting msmq

1. WebService: strictly speaking, it is an industry standard, not a technology. XML extension markup language is used to represent data (this is the key to boast of languages and platforms ). Microsoft's Web Service implementation is called ASP. NET Web Service. It uses the Simple Object Access Protocol Soap to implement data interaction between applications in a distributed environment. Description of the service interface. In addition, Web services can be registered to the UDDI Center for customers to find and use. Later, Microsoft implemented ASP. NET Web Service Security, performance, data encryption, decryption, hosting host and other aspects of the extension, called the WSE series, this is an over-product, up to WSE3.0. later is the WCF era.

 

2. WCF: to some extent, it is ASP. NET Web Service, because it supports the industry standard and Core Protocol of Web Service, ASP. NET Web Service and WSE can do almost all the things they can do. cross-platform and language are not a problem (data also supports XML formatting and provides their own formatter ). However, as a communication component or platform promoted by Microsoft, WCF aims not only to support and integrate Web Services, because it is also compatible with and has many features of Microsoft's early technology.

 

According to Microsoft's official explanation, WCF (formerly called "Indigo") is a unified framework for building and running Service-Oriented applications using managed code. It enables developers to build a secure, trusted, and transactional solution across platforms, and to be compatible with existing systems. WCF is a set of developers for Microsoft Distributed Application Development. It integrates. net platform, such as Enterprise Sevices (COM + ). net Remoting, Web Service (ASMX), WSE3.0, and MSMQ message queues. In terms of the scope of communication (Communiation), it can be cross-process, cross-machine, cross-subnet, enterprise network, or Internet; in terms of host programs, it can be ASP. NET, EXE, WPF, Windows Forms, NT Service, COM + as the Host (Host ). The protocols supported by WCF include TCP, HTTP, cross-process, and custom. Security modes include SAML, Kerberos, X509, user/password, and custom. That is to say, it is easy to develop a SOA-based Distributed System under the WCF framework. Microsoft includes all the technical elements related to this, and has mastered the concept, it is equivalent to mastering the key to open the SOA door.

 

WCF has the following advantages:

1. uniformity as described earlier, WCF is an integration of ASMX,. Net Remoting, Enterprise Service, WSE, MSMQ, and other technologies. Since WCF is fully written by the managed code, developing the WCF application and developing other. there is no big difference between. Net applications. We can still use WCF to create service-oriented applications like creating object-oriented applications.

2. Interoperability since the most basic communication mechanism of WCF is SOAP (Simple Object Access Protocol), this ensures the interoperability between systems, even if it is running in different contexts. This communication can be based on. net. net Communication, as shown in: Cross-process, cross-machine, or even cross-platform communication, as long as standard Web services such as J2EE application servers (such as WebSphere and WebLogic) are supported ). Applications can run in Windows or other operating systems, such as Sun Solaris, HP Unix, and Linux. As shown in:

3. Security and trustworthy WS-Security, WS-Trust, and WS-SecureConversation are added to SOAP messages for user authentication and data integrity verification, data Privacy and other security factors. WS-ReliableMessaging is added to the SOAP header to allow trusted end-to-end communication. The SOAP-based information exchange based on WS-Coordination and WS-AtomicTransaction supports two-phase commit transactions ).

The preceding WS-policies are supported in WCF. For Messaging, SOAP is the basic protocol of Web Service. It contains the header and body ). In the Message header, WS-Addressing is defined to locate the address information of the SOAP Message, and MTOM (Message Transmission Optimization Mechanism, Message Transmission Optimization Mechanism) is also included ). :

4. Compatibility WCF fully considers the compatibility with old systems. Installing WCF does not affect existing technologies such as ASMX and. Net Remoting. Even though both of them use SOAP, applications developed based on WCF can still directly interact with ASMX.

 

Differences

 

WCF supports multiple communication protocols: Http/Https, TCP/UDP, MSMQ, named pipe, peer network,

Message accessibility and transaction flow.

WCF can be integrated with ASP. NET and share a context (HttpContext ).

WCF supports multiple message transmission formats: text, binary, mtom, and Json.

Strong WCF security: supports Symmetric Security, asymmetric security, message security, transmission security,

SSL Stream Security and Windows Stream Security.

WCF supports multiple session modes: unidirectional, bidirectional, and request/response.

WCF supports REST.

WCF supports multiple formatting methods. DataContractSerializer, XmlSerializer,

DataContractJsonSerializer.

WCF supports WAS hosting, Windows hosting, Self-Hosting, and IIS hosting.

WCF supports multiple concurrency modes: Singleton, monotonous, and session. W

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.