A Web Service is programmable application logic accessible via standard Web protocols. One of these Web protocols is the Simple Object Access Protocol (SOAP). SOAP is a W3C submitted note (as of May 2000) that uses standards based technologies (XML for data description and HTTP for transport) to encode and transmit application data. Consumers of a Web Service do not need to know anything about the platform, object model, or programming language used to implement the service; they only need to understand how to send and receive SOAP messages (HTTP and XML). WCF Service Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application. An endpoint can be a client of a service that requests data from a service endpoint. The messages can be as simple as a single character or word sent as XML, or as complex as a stream of binary data.
Features | Web Service | WCF |
Hosting | It can be hosted in IIS. | It can be hosted in IIS, WAS (windows activation service), Self-hosting or Windows service |
Programming | Apply [WebService] attribute to the class to be exposed as a service. | Apply [ServiceContract] attribute to the class to be exposed as a service. |
Model | Apply [WebMethod] attribute to the method exposed to client. | Apply [OperationContract] attribute to the method exposed to client. |
Supported Operations | One-way and Request- Response. | One-Way, Request-Response and Duplex. |
Logging | Needs custom implementation. | No custom implementation needed. Can be configured in service config file. |
Serialization | System.Xml.serialization namespace is used. | System.Runtime.Serialization namespace is used. |
Supported Encoding | XML 1.0, MTOM(Message Transmission Optimization Mechanism), DIME, Custom. | XML 1.0, MTOM, Binary, Custom. |
Supported Transports | Can be accessed through HTTP, TCP and Custom. | Can be accessed through HTTP, TCP, Named pipes, MSMQ,P2P(Peer to Peer) and Custom. |
Service Types | ASMX, .Net Remoting | .ASMX, .Net Remoting, WSE(WS* Protocols), MSMQ and Enterprise Services |
Supported Protocols | Security | Security, Reliable messaging, Transactions |