Wednesday 6 October 2010

WCF Endpoint ABC

AS you probably know WCF stands for Windows Communication Foundation. If you want to make your WCF service accessible by clients you need to define at least one endpoint that would be used for communication. Each endpoint definition needs to answer 3 basic questions:
  1. Where?
  2. What?
  3. How?
To properly answer these 3 questions you need to specify so called "Endpoint ABC":

  • A - Address (Where?)
    This is the network address of your service saying where to find it. WCF support several address types/protocols. E.g. if you are creating a regular SOAP web service you would use an HTTP or HTTPS address. The type of the address depends directly on the binding type (see next definition).

  • B - Binding (How?)
    Binding defines how clients can communicate with our service. It specifies the transport protocol that should be used (HTTP, TCP, ...), web service protocol, encoding, security settins etc.

  • C - Contract (What?)
    Contract defines what functionality your service exposes. This is simply the interface that your WCF service implements.
In practice this could look as follows (SOAP web service endpoint):
Simple as ABC, isn't it? :)

2 comments:

Anonymous said...

I was searching for a good definition for WCF end point from past 1 hour and could not find anything better than this :)

Gaukhar said...

Very good stuff! Easy and simple explanations! Thanks=)