WCF : How to create a request-reply contract

Create the service contract by applying the ServiceContractAttribute class to the interface that defines the methods the service is to implement.

Indicate which methods in the interface the client can invoke by applying the OperationContractAttribute class to them.

The value of the IsOneWay property indicates whether an operation returns a reply message. If an operation has a request-reply contract, this property is set to false.

If the operation has a one-way contract, the property is set to true. All of the operations that carry the OperationContractAttribute class satisfy a request-reply contract by default because the IsOneWay property is false by default. So it is optional to explicitly specify the value of the attribute property to be false.

No comments:

Post a Comment