Wcf-versus Web Service

Source: Internet
Author: User
Tags hosting wsdl

There is some major differences that exist between WCF and a Web service which is listed below.

Here's a summary of the main differences between WCF and network services

    • 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 is there for WCF Hosting, i.e., IIS (Internet information Ser Vice), was (Windows Activation Service), self-hosting and Windows service, but a Web service are hosted only by IIS.

  • Services -WCF supports a robust security, trustworthy messaging, transaction and interoperability, while a Web s Ervice only supports security services.

  • Serializer -WCF Supports datacontract serializer by employing System.Runtime.Serialization, whereas a Web Servic E supports XML serializer by making use of System.Xml.Serialization.

  • Tools -servicemetadata tool (SvcUtil.exe) is used for the 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 is handled in a better the by making use of faultcontract. They does not return to the client as a Web service as SOAP faults.

  • Has

1. Attributes: WCF services are defined by service contracts and operational contracts, whereas Web services are defined by the WebService and WebMethod properties

2. Protocol: WCF supports a range of protocols, such as HTTP, named pipes, message queues, but Web services only support HTTP protocols

3. Hosting mechanism: WCF has a variety of mechanisms available, such as IIS (Internet Information Services), was (Windows Activation Service), self-hosting (self-hosted), and Windows services, but webservice only supports IIS

4. Services: WCF provides a robust security, reliable messaging, transactional, and interoperability. However, WebService only supports security services

5. Serializer: WCF provides a data contract serializer by using System.Runtime.Serialization, however WebService is supported by using System.Xml.Serialization to support the XML serializer

6. Tool: SvcUtil.exe is used by the client to generate a WCF service, however WebService uses the WSDL.EXE tool

7. Exception handling: In WCF, unhandled exceptions are handled in a better way by Faultcontract. WCF does not return unhandled exceptions as SOAP faults to the client as WebService does

How are you doing

Wcf-versus Web Service

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.