Introduction
WCF Endpoint is defines how WCF client will interact with WCF service,This article describes details about WCF Endpoint and the elements of Endpoint available.
Getting Started
WCF Endpoint contains the details of the WCF service, like where the service resides (address), how to access it and what the WCF service exposes to the client. Every service must have an address defining the service's residence, a binding that defines how a client communicates with the service and a contract that defines what the service does. The combination of Address, Contract, and Binding is called an endpoint. The elements of an endpoint are called A, B and C as in the following.
Elements of an Endpoint
- Address
The address defines where the service resides, it's how the client determines where a service is located. Every service has a unique address, the address format of WCF is as in the following.
Example-1 : HTTP Address Format[Transport] ://[Domain Name]:[Port]//[Service Name]
Example-2 : TCP Address Formathttp://localhost:80//Myservice.cs
Net.tcp//localhost:80//MyService.cs
- Binding
WCF has a couple of built-in bindings that are designed to fulfill some specific needs. You can also define your own custom bindings in WCF to fulfill your needs. All built-in bindings are defined in the System.ServiceModel Namespace. Here is the list of 10 built-in bindings in WCF that we commonly use.
- Contracts
The WCF contract defines what a service does or what action a client can perform in a service. The contract is one of the elements of WCF endpoints that contain information about the WCF service. The contract also helps to serialize service information. These are the types of contracts available in WCF service, Service Contract, Data Contract, Fault Contract and Message Contract.
Related Articles
Summary
In the above of this article we have discussed about the WCF endpoint and the elements of endpoint, hope you have got the detail of this discussion.
Thanks