Thursday, May 31, 2012

Developing WCF Service

 To develop a WCF Service,we have to Follow below Steps:

  1. Creating a .Net Component which is compatable to WCF (WCF Runtime Enabled) to do this wcf provides different closes in the form of attributes, sothat we can attach them to component content.All these libraries and WCF Runtime is provided in System.ServiceModal.dll.  

    Eg:
    [ServiceContract]
    class Demo
    {
    [OperationContract]
     -------
    -------
    }

  2. Every service requires Hosting sothat it can manage the operating system and Other environment related issues.Remoting webservices provider simple (or)  single hosting options,which is restricting user to particular process.WCF provides rich hosting options,sothat  user can plan service where good management capabilities.

    WCF provides the following hosting options:

    •     Self Hosting.
    •     Windows Server Hosting
    •     IIS hosting
    •     WAS Hosting(Windows Activation Services)
  3. Endpoints for Accessing the Service:In Wcf a service is exposed to clients using an endpoint every client understands as well as communicater with wcf service using endpoint only.WCF provides endpoint as a type with 3 Parts:

    • Address: Here we specify the location where ourservice is available.Wcf follows industry standards addressing pattern so while writting addressing instead of .net style addressing .We have to write wcf style of address. 

    • Binding: It defines how to communicate with service.It includes the formatter channel and other information with just the binding name,that we specify.

      Eg: basicHttpBindind  means SOAP formate of coomunication using Http Channel.

    •  Contract: This is .Net type that we provide for clients for request and resonse.what methods and other content is provided in this contract.

      Eg: Google Search Service provides do google search method with many inputs and outputs,which are known to us with contract.

 


No comments:

Post a Comment