Follow by Email

OperationContract attributes/properties of the WCF in .net framework 4.0


OperationContract attributes/properties
 
1.      Action:
 
2.      AsycnPattern:
 
3.      IsInitiating:If we are using this attribute the SessionMode attribute of the ServiceContract 
      should be defined.It has two modes
a.      True:It is default mode .If IsInitiating property is true then that method can be 
called at the beginning.
b.      False: If IsInitiating property is false then that method cannot be called at the 
beginning.
 
4.      IsTerminating: If we are using this attribute the SessionMode attribute of the 
      ServiceContract should be defined.It has two modes
a.      True:If IsTerminating property is true then session will end after implementation 
of that method.
b.      False: IsTerminating property is true then session will not end after implementation 
of that method.
 
5.      Name: This is used to provide the name to the method by which client will call it.
 
6.      ProtectionLevel:It is System.Net.Security.ProtectionLevel which defines the protection 
      level of the service contract. It has three modes.
a.      EncryptAndSign: It ensures that data will be encrypted & signed before it 
is transmitted.
b.      None: Data will not be signed nor encrypted & it is transmitted as it is.
c.       Sign: Data will only signed before it is transmitted.
 
7.      ReplyAction:
 
8.      IsOneWay:It has two modes 
a.      True: It specifies that the method will not return anything. Method’s return type 
should be “void” if IsOnwWay is true.
b.      False: It is default value for the OperationContract. No need to specify this if 
method returns anything. 

0 comments:

Post a Comment