Tuesday, April 24, 2012

WCF Contracts – an overview


As we know WCF is used to build service oriented applications. It’s been part of .net framework 3.0 and 3.5. Now we have few questions in mind like where to contact for a service, in which format I should send the message to the service, what happens if something goes wrong etc. In order to answer all these questions we have WCF defines contract to its consumers.
We can classify them into the three categories as follows
  • Service contract : Defines the operations that service exposes to its consumers
  • Data contract : Defines the structure of the data in message flow
  • Message contract : Defines the headers included in the message and how its structured
As a whole we can categorize the contracts as
  • Behavioral Contract :It defines how the service behaves, what operations it exposes, what kind of faults it issues and about the MEP (Message Exchange Pattern) to be used in interacting with the service etc
  • Structural Contracts:It simply defines the Data and Message contracts used by your WCF service. 
Well in my coming posts, we will define each of the above ones in details. Keep watching the blog posts.




No comments:

Post a Comment

Installing ASP.NET MVC

Installing ASP.NET MVC Before we dive deep into the ASP.NET MVC, let’s install it our development machine. This is very straight forwa...