when we decide datacontract and message contract

Posted by Jameschowdare under WCF on 1/22/2010 | Views : 9200 | Status : [Member] | Replies : 4
Hi Folks,

can you peoople explain (US)when we decide datacontract and message contract UNDER WHICH CIRCUMSTANCE WE GO FOR THEM




Responses

Posted by: K.sharma78 on: 4/12/2010 [Member] Starter

Up
0
Down
Yes that's right. Message Contracts used for SOAP.

Jameschowdare, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 1/22/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Data contracts are used to define the data types passed to and from the service. Avoid Message Contract they add no value but complexity. here is the Reason we use them
http://msdn.microsoft.com/en-us/library/ms730255.aspx

Thank you for posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Jameschowdare, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jameschowdare on: 1/22/2010 [Member] Starter

Up
0
Down
with out datacontract also we can use types

Jameschowdare, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nishithraj on: 1/22/2010 [Member] Bronze

Up
0
Down
DataContracts are used to descibe the data types used by a service. Interoperability is possible through this since it uses metadata of the services in background.DataContracts can be used to describe either parameters or return values.

MessageContracts are used for the SOAP formats. We can have message header and other elements over here.



Mark this as answer, if it is.....

With regards
Nishithraj Narayanan

Jameschowdare, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response