使用微软的net wsdl.exe工具将WSDL转换为C#类,但该工具无法转换WSDL文件的以下部分。非常感谢您提供正确方向的任何指针。
WSDL输入
<complexType name="Merchant">
<sequence>
<element name="iId" type="xsd:int" />
<element name="sName" type="xsd:string" />
<element name="sDescription" type="xsd:string" minOccurs="0" />
<element name="aSectors" type="api:ArrayOfMerchantSectors" minOccurs="0" />
</sequence>
</complexType>
<complexType name="ArrayOfMerchant">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="api:Merchant[]" />
</restriction>
</complexContent>
</complexType>
<complexType name="MerchantSector">
<sequence>
<element name="iSectorId" type="xsd:int" />
<element name="sSectorName" type="xsd:string" />
</sequence>
</complexType>
<complexType name="ArrayOfMerchantSectors">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="api:MerchantSector[]" />
</restriction>
</complexContent>
</complexType>
C#输出问题
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://api.someexampledomain.com/")]
public partial class ArrayOfMerchant : Array
{
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://api.someexampledomain.com/")]
public partial class ArrayOfMerchantSectors : Array
{
}
我想知道如何定义'Merchant'和'ArrayOfMerchant'这两个类。
谢谢。