This topic has not yet been rated - Rate this topic

Request-Reply Services

Request-reply services are the default type of operation contract in Windows Communication Foundation (WCF). Clients make calls to service operations and wait for a response from the service. You can perform calls to a service operation either synchronously, where the client blocks until it receives a response from the service or the call times, or asynchronously, where the client makes a call to the service operation, continues working, and receives the response from the service on another thread.

To create a request-reply service contract, define your service contract, and apply the OperationContractAttribute class to each operation, as shown in the following sample code.

[ServiceContract(Namespace="http://Microsoft.ServiceModel.Samples")]
public interface IRequestReplyCalculator
{
    [OperationContract]
    double Add(double n1, double n2);
}

You do not have to set the IsOneWay property to false because this is the default behavior.

See Also

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Clarification.
"until it receives a response from the service or the call times,"

What is meant by "call times"? Is it "call times out"?