Windows Communication Foundation: Steroids for your Enterprise Service-Oriented Architecture (Part I)
page 3 of 5
by Tom Fuller
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 30121/ 44

Defining Endpoints: Then and Now

One of the most inflexible aspects for distributed development today is endpoint definition. Whether we are talking about the tight coupling introduced by interface definition languages or the rigidity of an ASMX endpoint, a service has very little flexibility once it is being consumed. WCF has made some huge strides in this area. Endpoints are no longer limited to a single transport or a single contract version. More importantly, services are no longer limited to a single endpoint.


Anatomy of an Endpoint

The popular mnemonic being used to remember what an endpoint is comprised of is: Endpoints contain the ABCs of a service. Specifically the ABC portion of that statement is being used to reinforce endpoint definition.

  1. A is for Address: A WCF service endpoint has a unique address. Addresses are not necessarily something we have not seen with distributed technologies all along. However, in the past this was one of the only qualifying characteristics of an endpoint. In web services, the address was a defined URI; with .NET Remoting, it would be a TCP address.
  2. B is for Binding: Bindings are a portion of the Policy that a service and consumer have to agree on if they want to exchange messages. This binding will contain the information to support the features being exposed by the service. I will cover bindings in more detail in the following section.
  3. C is for Contract: There are a number of different types of contracts with WCF. The primary contract that defines service behavior is the service contract. This is analogous to the portType within WSDL today. This also rounds out the Policy definition of a service.


Why Is This Better Than What I Have Today?

Endpoint definition up until now has had little to no flexibility. With the introduction of WCF, multiple endpoints can be defined, allowing service consumers to satisfy a variety of application requirements. If you have a .NET to .NET scenario where you would like to leverage TCP transports and Binary message encoding, then go ahead. Of course, you could do this before with .NET remoting, but what you could not do is have a parallel endpoint that was exposed via HTTP and used text-based SOAP encoding to service a Java client. The flexibility for service invocation has the potential to truly allow services to use policy-based communication. If you wanted to do this today, you would likely have two versions of the service, which would lead to an increased maintenance costs.


Here is an example of an endpoint definition that is hosted in IIS. Use some creativity to envision a scenario where I might want to communicate to this service with a client on the same machine and use named pipe transports. Also notice that when hosting in IIS the address can be left blank and it will default to the location where it is hosted within IIS. This is not much different than what we would do in ASMX today. In the case of the configuration below an appropriate address would be http://localhost/Service/FamilyGuyQuotes.svc.


IIS Hosted Service Config



<service serviceType="FamilyGuy.FamilyGuyQuotes">

<endpoint address="" bindingSectionName="basicProfileBinding"






View Entire Article

User Comments

Title: All i need to create a contact page like this one   
Name: Moutlou
Date: 2011-10-03 5:20:27 PM
I am looking for a resource to learn and create a contact us page for my sl4 web project please help me! thanks.
Title: SOA in WCF   
Name: Seshu Babu Barma
Date: 2009-08-26 3:10:20 AM
Excellent article, this has given a light on WCF with SOA
Title: WCF Delights from an Informed Technologist   
Name: Manpret Singh
Date: 2009-01-15 5:52:30 AM
Definitely worth the time spent on your article and to inspire me towards WCF.

Heading off straight to part 2. Cheers.
Title: Have Sufficient information   
Name: Senthil Valavan
Date: 2008-09-09 4:13:33 AM
We can feel WCF as an overhelming technology
Title: Excellent   
Name: Thomas K Augustin
Date: 2008-04-29 5:46:44 AM
Very informative.
Title: Good Overview   
Name: Ravindra K Dewangan
Date: 2008-03-20 2:37:27 PM
Short and sweet overview.
Title: Fantastic   
Name: Irzana
Date: 2008-02-25 1:43:47 PM
very much usesful content
Title: Very good   
Name: Rujith Anand
Date: 2005-11-25 4:52:56 AM
Fantastic article..
Very useful for starters like me..
..waiting for the 'Part 2'.

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-04-15 2:34:11 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search