How to create Message types and Data Contract ?

Topics: General Discussion Forum, July and December Releases Forum
Feb 11, 2008 at 9:35 AM

I am following web service software pattern December 2006 Release. I installed the wssf dec 2006 release. I created a project called Sample. Inside the Solution Explorer, when i right click Sample.DataContracts-->Create DataContracts-->
i am getting a dialog box...(data contract Properties). I am not so clear about this, i know that it can be a class or struct, which contains some data members...

But can you please clarify that Is this the parameters i have to pass it to the operation contracts...

Also i would like to know How to create Message Types ? The Message Contract and Message Types are both Same or not ?

Thanks and Regards
Nimesh Prabhakar

Feb 11, 2008 at 3:13 PM
In a nutshell, the Data Contracts maps to the types used to get/return data from service operations. When you set a Message shape element to a Request or Response property of an Operation, you also set the element property of that Message to a Data Contract already defined in a DC model or simply reference that element to a CLR primitive type, depending on the DataType you created on that Message element.

Message Types (ASMX) and Message Contracts (WCF) are the same and from a Service Contract model standpoint, they basically encapsulate the data in a Request/Response message pattern used in the SC model.
Feb 12, 2008 at 4:28 AM
Edited Feb 12, 2008 at 4:28 AM

Hi Charly,
Thanks for your Response.
I have another one questions..
After Creating the service, how can we use it in the Website which we are creating..
I would like to get clarification regarding this too..

Thanks and Regards,
Nimesh Prabhakar