Difference between WCF And Web Service

Introduction

Both Web service and WCF Service are used to developement service orianted application and data transfer over internet. But huge differents are there between Web service and WCF Service. This article present some measure differences exists between WCF Service and WEB Service.Below i have discussed the main differences between WCF Service and Web Service.

  • Attributes:

    WCF service is defined by ServiceContract and OperationContract attributes, whereas a web service is defined by WebService and WebMethod attributes.

  • Binding:

    WCF supports 9 types of bindings like BasicHttpBinding, WSDualHttpBinding, WSHttpBinding, etc., while a web service supports only two types of binding like XML and SOAP.

  • Duplex Service Operations:

    WCF supports duplex service operations apart from supporting one-way and request-response service operations, whereas a web service does not support duplex service operations.

  • Exception Handling:

    WCF handles exceptions by using FaultContract. They do not return to the client like in a web service.

  • Hash Table:

    As XML Serialization doesn't support hash table web service doesn't support to serialize. where as WCF service support to serialize a hash table.

  • Hosting:

    Web service can be hosted only in IIS, where as Various activation mechanisms are there for WCF hosting, i.e., IIS (Internet Information Service), WAS (Windows Activation Service).

  • Multi threading:

    ServiceBehavior class enables WCF service for supporting multi threading whereas there is no such concept in web service.

  • Protocols:

    WCF supports a range of protocols, i.e., HTTP, Named Pipes, TCP, and MSMQ, whereas a web service only supports HTTP protocol.

  • Serializer:

    Web service supports XML serialization whereas WCF service supports Datacontract Serialization.

Summary

Above are the discussion about WCF Service and Web Service, hope you have got the measure differences between WCF service and Web service and this discussion helped you to find out the differences.

Thanks

Kailash Chandra Behera

An IT professional with over 13 years of experience in the full software development life cycle for Windows, services, and web-based applications using Microsoft .NET technologies. Demonstrated expertise in delivering all phases of project development—from initiation to closure—while aligning with business objectives to drive process improvements, competitive advantage, and measurable bottom-line gains. Proven ability to work independently and manage multiple projects successfully. Committed to the efficient and effective development of projects in fast-paced, deadline-driven environments. Skills: Proficient in designing and developing applications using various Microsoft technologies. Total IT Experience: 13+ years

Previous Post Next Post

نموذج الاتصال