End Point
Address + Binding + Contract = End Point
Address:
It is URL, Specifies where the WCF is hosted. Client will use the URL to connect to the service.
http://localhost:8080//MyService.Svc
Binding:
It describes how client will communicate with the service.
There are different protocols available for the WCF to communicate to the client. The protocol will be based on our requirements.
Binding having several characteristics as mentioned below,
a. Transport: It defines the base protocol to be used like Http, TCP, Named Pipes, MSMQ, P2P and Custom are the protocols.
b. Encoding (Optional): Three types of encoding are available – Text, Binary, or Message Transmission Optimization Mechanism (MTOM). MTOM is an interoperable message format that allows the effective transmission of large attachments or larger messages(Greater than 64K)
c. Protocol (Optional): Defines information to be used in the binding such as security, Reliable Messaging capability & Transactions.
Binding |
Description |
BasicHttpBinding |
Basic Web service Communication. No Security by default. |
WsHttpBinding |
Web service with WS-* support. It supports transactions. |
WsDualHttpBinding |
Web service with duplex contract and transaction support. |
WsFederationHttpBinding |
Web service with federated security. Supports Transactions. |
MSMQIntegrationBinding |
Communication directly with MSMQ applications. Support Transactions. |
NetMSMQBinding |
Communication between WCF applications by using Queuing. Supports Transaction. |
NetNamedPipeBinding |
Communication between WCF applications on same computer. Support duplex contracts and transactions. |
NetPeerTCPBinding |
Communication between computers across peer to peer service. Support Duplex Contracts. |
NetTCPBinding |
Communication between WCF applications across computers. Supports duplex contracts and transactions. |
Contract:
Collection of operation that specifies what the endpoint will communicate with outside world. Usually name of the Interface will be mentioned in the Contract, so the client application will be aware of the operations which are exposed to the client. Each operation is a simple exchange pattern such as one-way, duplex and request/reply. |