我們嘗試使用ServiceContractGenerator生成Web服務代理類。
我們在使用返回DataTable的Web服務時遇到問題。ServiceContractGenerator類型問題
生成以下
public partial class MethodResultOfDataTableymujubN2Result
{
private System.Xml.XmlElement[] anyField;
private System.Xml.XmlElement any1Field;
/// <remarks/>
[System.Xml.Serialization.XmlAnyElementAttribute(Namespace="http://www.w3.org/2001/XMLSchema", Order=0)]
public System.Xml.XmlElement[] Any
{
get
{
return this.anyField;
}
set
{
this.anyField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlAnyElementAttribute(Namespace="urn:schemas-microsoft-com:xml-diffgram-v1", Order=1)]
public System.Xml.XmlElement Any1
{
get
{
return this.any1Field;
}
set
{
this.any1Field = value;
}
}
}
的DataTable代碼References.cs類可以處理數據表,並返回DataTable對象
[System.Runtime.Serialization.DataMemberAttribute()]
public System.Data.DataTable Result { ...
我們如何處理數據表生成Web服務代理類?