我尝试使用svcutil从wsdl文件生成C#代理类。 但是我得到了很多错误: 错误:无法导入wsdl:portType 详细信息:运行WSDL导入扩展时抛出异常:System.ServiceModel.Description.XmlSerializerMessageContractImporter 错误:引用的类型' http://schemas.xmlsoap.org/soap/encoding/:Array'仅对编码的SOAP有效。 XPath到错误来源:// wsdl:definitions [@targetNamespace =' Feed'] / wsdl:portType [@name =' FeedPortType']
错误:无法导入wsdl:binding 详细信息:导入wsdl:binding依赖的wsdl:portType时出错。 XPath到wsdl:portType:// wsdl:definitions [@targetNamespace =' Feed'] / wsdl:portType [@name =' FeedPortType'] XPath到错误来源:// wsdl:definitions [@targetNamespace =' Feed'] / wsdl:binding [@name =' FeedBinding']
错误:无法导入wsdl:port 详细信息:导入wsdl:port依赖的wsdl:binding时出错。 XPath到wsdl:binding:// wsdl:definitions [@targetNamespace =' Feed'] / wsdl:binding [@name =' FeedBinding'] XPath到错误来源:// wsdl:definitions [@targetNamespace =' Feed'] / wsdl:service [@name =' Feed'] / wsdl:port [@name =&# 39;进料口']
我发现接下来会出现此错误的原因: 的xmlns:SOAP-ENC =" HTTP://schemas.xmlsoap.org/soap/encoding/"
<xsd:complexType name="gameWST">
<xsd:all>
<xsd:element name="game" type="xsd:string"/>
<xsd:element name="amountWagers" type="xsd:float"/>
<xsd:element name="amountSettlements" type="xsd:float"/>
<xsd:element name="amountTips" type="xsd:float"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="gameWSTArray">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:gameWST[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
是否可以修复它?