For every document that is passed to an XML Web service, you need to create a corresponding C# class. The following steps illustrate this process:
The Retrieve from WebDAV dialog box appears.
The Export XSD Schema dialog box appears.
The Visual Studio .NET Command Prompt window appears.
XSD filename.xsd /c
This command creates a new C# class named filename.cs.
namespace namespacename { <contents of file> }
For example, using the following output:
/// <remarks/> [System.Xml.Serialization.XmlRootAttribute("Seller", Namespace="", IsNullable=false)] public class Seller { /// <remarks/> [System.Xml.Serialization.XmlElementAttribute("Address", typeof(Address))] [System.Xml.Serialization.XmlElementAttribute("ContactInfo", typeof(ContactInfo))] public object[] Items; }
Previous Next |