Message Exchange Patterns in WCF

Wcf Service support three Message exchange pattern.


1. Request-Reply (Default)
2. One-Way
3. Duplex.


Defining Request Reply into service .Client issue a request then service response based on client request. 

 [ServiceContract]
public interface ICompanyService
{
    [
OperationContract(IsOneWay=false)]
   
string Add();
    

}

One-Way operation, only one message is exchanged between the client and the service. The client makes a call to the service method, but does not wait for a response message.

[OperationContract(IsOneWay = true)]
string Add();

Duplex message pattern can be implemented Request- Replay or One-Way operations. 

No comments:

Post a Comment