引用类型仅对编码的 SOAP 有效

Y. *_*van 5 .net c# wcf soap svcutil.exe

我正在尝试使用 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 时出错。wsdl:portType 的 XPath: //wsdl:definitions[@targetNamespace='Feed']/wsdl:portType[@name='FeedPortType'] 错误源的 XPath: //wsdl:definitions[@targetNamespace='Feed']/ wsdl:绑定[@name='FeedBinding']

错误:无法导入 wsdl:port 详细信息:导入 wsdl:port 所依赖的 wsdl:binding 时出错。wsdl:binding 的 XPath: //wsdl:definitions[@targetNamespace='Feed']/wsdl:binding[@name='FeedBinding'] 错误源的 XPath: //wsdl:definitions[@targetNamespace='Feed']/ wsdl:service[@name='Feed']/wsdl:port[@name='FeedPort']

我发现出现此错误的原因如下: 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>
Run Code Online (Sandbox Code Playgroud)

可以修复吗?