5

I'm trying to generate C# proxy class from wsdl file by using svcutil. But I get a lot errors: Error: Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter Error: Referenced type 'http://schemas.xmlsoap.org/soap/encoding/:Array' is only valid for encoded SOAP. XPath to Error Source: //wsdl:definitions[@targetNamespace='Feed']/wsdl:portType[@name='FeedPortType']

Error: Cannot import wsdl:binding Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on. XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='Feed']/wsdl:portType[@name='FeedPortType'] XPath to Error Source: //wsdl:definitions[@targetNamespace='Feed']/wsdl:binding[@name='FeedBinding']

Error: Cannot import wsdl:port Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on. XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='Feed']/wsdl:binding[@name='FeedBinding'] XPath to Error Source: //wsdl:definitions[@targetNamespace='Feed']/wsdl:service[@name='Feed']/wsdl:port[@name='FeedPort']

I have discovered that reason way I get this error is next: 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>

Is it possible to fix it?

Y. Ivan
  • 109
  • 1
  • 9

0 Answers0