1

Message contract we can use when we have pass authentication detail to soap header instead passing as paratmeter in datacontract like ex. license key or user credentials. Passing parameter is not secure. But we can secure datacontract using security(transport or message). Why do we need messageContract? then what is difference bewteen message contract and data contract/

"Message contract has full control on SOAP message and we can also add Protection Level and message can encrypted and secure. It could be signing or encrypting SOAP header information. Mixing message and data contracts will cause a runtime error when you generate WSDL from the service."

sudhir
  • 33
  • 6
  • https://msdn.microsoft.com/en-us/library/ms730255(v=vs.110).aspx – tom redfern Jun 14 '16 at 10:03
  • @Tom : I am putting my questions in more better way :Message contract can be used for authentication in soap header instead passing as paratmeter in datacontract like ex. license key or user credentials.We can achieve same thing by Passing parameter in datacontract and provide security in datacontract using security(transport or message). Message contract is having full control over SOAP message Where datacontract is having less control. Why do we need the two contract ? – sudhir Jun 15 '16 at 04:46

0 Answers0