Endpoint in a WCF Service

A WCF service exposes its contract via collection of Endpoints (one or more endpoints). An endpoint in WCF is an entity which facilitates access of a client to a WCF service. All communication with the WCF service occurs through the endpoints exposed by the service.

In simple terms, it's an URL on which clients can communicate to the service.

An endpoint consists of the following four properties:
  1. Address – The Endpoint's Address is a network address where the Endpoint resides. It indicates the location of the endpoint, i.e.; where it can be found. The address uniquely identifies the endpoint.
    The address of an endpoint is represented in the WCF object model by the EndpointAddress class.
    An EndpointAddress class contains:
    1. A URI property which represents the address of the endpoint.
    2. An Identity property, which represents the security identity of the service and a collection of optional message headers. The optional message headers are used to provide additional and more detailed addressing information to identify or interact with the endpoint.
  2. Binding – The binding specifies how a client can communicate with the endpoint and includes:
    1. Transport protocol (ex – TCT or HTTP).
    2. Message encoding (text or binary).
    3. Security requirements (SSL or SOAP message security).
    A binding is represented in the WCF object model by the abstract base class Binding
  1. Contracts – The contract outlines the functionality exposed by the endpoint to the client. It specifies:
    1. The operations available for the client.
    2. The form of the message.
    3. The type of input parameters or data required to call the operation.
    4. The expected type of processing or response message for the client.
  2. Behaviors – The endpoint has a set of behaviors that specify local implementation details of the endpoint. The local behavior of the service endpoint can be customized by using endpoint behaviors (which achieves this by participating in the process of building a WCF runtime).

Endpoint in a WCF Service - Explained by Mr. Sandeep Karan

Endpoint in a WCF Service

No comments:

Post a Comment