Creating classes from XSD

You are contracting for the first web service development in the SOA world.

After editing an XSD file, the best way to automatically (re) generate .net classes from XSD files?

+2
source share
4 answers

xsd.exe will create new classes for you.

Depending on how Visual Studio is configured, adding xsd.exe to โ€œProperties / build events / post build eventsโ€ will regenerate every time you rebuild.

+3
source

If you are using .net 1.1 or 2.0, xsd.exe. When using 3.0 or 3.5, svcutil.exe. If you don't mind using unsupported code, LINQ-to-XSD ( http://blogs.msdn.com/xmlteam/archive/2008/02/21/linq-to-xsd-alpha-0-2.aspx ) is cool . Keep in mind that some schemas do not translate well to .NET classes automatically. If you find this to be the case, enter the classes manually and implement IXmlSerializable.

+2
source

We use WSCF, the first Thinktecture web services contract, to create a web service that first creates an XSD circuit and then creates service interfaces using this tool. We have been using this tool for the past 2 years and I highly recommend it.

The same guys also started the WSCF.blue project, which is the successor to their original tool and allows you to first sign a contract (read the XSD first). WSCF.blue is designed to support the Windows Communication Foundation (WCF).

+1
source
0
source

All Articles