Generating Data Contracts from Xsd Schema

Topics: Service Factory Modeling Edition Forum
Dec 24, 2009 at 2:08 PM


I am very new at this. I have the Web Service Software Factory Modeling edition. I was wondering if there was a way to generate data contracts from existing schema. I found some reference on the internet that mentions the existance of a recipe "Create Data Contract from Xsd Recipe". But the problem is when I check the "available guidance" in the Guidance Navigator window, I dont see any such recipe.  All I can see are New Model, Add Asmx Implementation Project, Add Wcf Implementation Projects, Create Transator and Run WCF semantic Code Analysis.

In the article posted here : I found this information.

The Windows Communication Foundation guidance package provides a few ways to generate data contracts. In cases where you already have XML schema definitions in place, you can generate data contract types from the XML schema definition (XSD) itself. The recipe is similar to the ASMX recipe called Create XML Serializable type from Schema, only it generates [DataContract] types when possible. The DataContractSerializer in Windows Communication Foundation only supports a subset of the XML schema language so if the schema uses something outside of that subset (like an XML attribute, for example), the recipe will fall back to generating XmlSerializer-compatible types.


I must be missing something. Can any one help?



Dec 24, 2009 at 5:05 PM
Hi, The article that you reference, is a bit outdated since it is for the rpevious version of WSSF. The last version which is the Modeling Edition fro VS2008, you can model all your contracts with a designer UI. However, you may not generate this model from an existing XSD. What you can do is to install an add on for importing an existing WSDL and create the Serivce Contract along with the XSD type references. You can find this (The Import WSDL Add-on) and other contrib projects here: BTW, the articale that makes reference to the latest version if WSSF is this: Regards and happy holiday! Hernan