none
Message Contract RRS feed

  • Question

  • Hi All,

     As we know there are four contract in WCF. So, Here i want to have more information about one of the contract that is "Message Contract".

    What/Why/How we use Message Contract?

    Thanks.
    Cheers, Vivek YJA
    • Changed type VIVEK YJA Tuesday, January 19, 2010 8:29 AM
    Tuesday, January 19, 2010 8:26 AM

Answers

  • Hi Vivek, message contracts are used when you have to control the format of your SOAP message explicitly and they basically allow you to specify where to put your data (to header or body part). When to use them? For one thing, you can use them in order to achieve interoperable communication with a specific platform or maybe to support some security mechanisms, etc.

    Hope this helped!

    Regards,
    Stipe Ivan
    • Marked as answer by Bin-ze Zhao Monday, January 25, 2010 6:24 AM
    Tuesday, January 19, 2010 8:44 AM
  • Hi,
    have a look at this link
    http://msdn.microsoft.com/en-us/library/ms752255.aspx
    Best Regards, C.Gnanadurai ----------------------- Please mark the post as answer if it is helpfull to you
    • Marked as answer by Bin-ze Zhao Monday, January 25, 2010 6:23 AM
    Wednesday, January 20, 2010 9:59 AM

All replies

  • Hi,
    Message contract is used to control the messages in which the data is carried.
    for detail information have a look at this link
    http://msdn.microsoft.com/en-us/library/ms730255.aspx
    Best Regards, C.Gnanadurai ----------------------- Please mark the post as answer if it is helpfull to you
    Tuesday, January 19, 2010 8:37 AM
  • Hi Vivek, message contracts are used when you have to control the format of your SOAP message explicitly and they basically allow you to specify where to put your data (to header or body part). When to use them? For one thing, you can use them in order to achieve interoperable communication with a specific platform or maybe to support some security mechanisms, etc.

    Hope this helped!

    Regards,
    Stipe Ivan
    • Marked as answer by Bin-ze Zhao Monday, January 25, 2010 6:24 AM
    Tuesday, January 19, 2010 8:44 AM
  • Thanks Stipe for your valuable reply.

    It would be appreciable and helpful if you can provide a sample regarding this.


    Cheers, Vivek YJA
    Wednesday, January 20, 2010 9:29 AM
  • Hi,
    have a look at this link
    http://msdn.microsoft.com/en-us/library/ms752255.aspx
    Best Regards, C.Gnanadurai ----------------------- Please mark the post as answer if it is helpfull to you
    • Marked as answer by Bin-ze Zhao Monday, January 25, 2010 6:23 AM
    Wednesday, January 20, 2010 9:59 AM