Back to Questions

What are the Contract attributes of WCF Services and their properties?

Your Answer

  • 12/17/2012 10:55:36 AM
  • Biju
  • 1

What are the Contract attributes of WCF Services and their properties?

1. OperationContractAttribute

Action - Gets or sets the WS-Addressing action of the request message

AsyncPattern - Indicates that an operation is implemented asynchronously using a Begin<methodName> and End<methodName> method pair in a service contract.

HasProtectionLevel - Gets a value that indicates whether the messages for this operation must be encrypted, signed, or both.

IsOneWay - Gets or sets a value that indicates whether an operation returns a reply message.

IsTerminating - Gets or sets a value that indicates whether the service operation causes the server to close the session after the reply message, if any, is sent.
 

ProtectionLevel - Gets or sets a value that specifies whether the messages of an operation must be encrypted, signed, or both.


ReplyAction - Gets or sets the value of the SOAP action for the reply message of the operation


2. ServiceContractAttribute

CallbackContract - Gets or sets the type of callback contract when the contract is a duplex contract.

Protectionlevel - Specifies whether the binding for the contract must support the value of the System.ServiceModel.ServiceContractAttribute.ProtectionLevel property.

namespace - Gets or sets the namespace of the <portType> element in Web Services Description Language (WSDL).

SessionMode -   Gets or sets whether sessions are allowed, not allowed or required.

3. DataContractAttribute

NameSpace, Name, IsReference:

 

  • 12/17/2012 11:00:41 AM
  • test

Back to Questions