ServiceContractAttribute Class
Base Namespace: System.ServiceModel
using System; using System.Collections.Generic; using System.Net.Security; using System.ServiceModel; using System.Text; namespace Microsoft.WCF.Documentation { [ServiceContract( Namespace="http://microsoft.wcf.documentation", Name="SampleService", ProtectionLevel=ProtectionLevel.EncryptAndSign )] public interface ISampleService{ [OperationContract] string SampleMethod(string msg); }
Use the ServiceContractAttribute properties to modify the service contract.
The ConfigurationName property specifies the name of the service element in the configuration file to use.
The Name and Namespace properties control the name and namespace of the contract in the WSDL element.
The SessionMode property specifies whether the contract requires a binding that supports sessions.
The CallbackContract property specifies the return contract in a two-way (duplex) conversation.
The HasProtectionLevel and ProtectionLevel properties indicate whether all messages supporting the contract have a explicit ProtectionLevel value, and if so, what that level is.
0 Response to "ServiceContractAttribute Class"
Post a Comment