我試圖加設在這裏這個SOAP端點:http://ds.hitpromo.net/product
.NET SOAP客戶端使用:陣
不過,我得到以下錯誤:
Scaffolding Code ... Error:Error: Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter Error: The datatype ' http://schemas.xmlsoap.org/soap/encoding/:Array ' is missing. XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:ProductControllerwsdl']/wsdl:portType[@name='ProductControllerPortType'] 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='urn:ProductControllerwsdl']/wsdl:portType[@name='ProductControllerPortType'] XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:ProductControllerwsdl']/wsdl:binding[@name='ProductControllerBinding'] 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='urn:ProductControllerwsdl']/wsdl:binding[@name='ProductControllerBinding'] XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:ProductControllerwsdl']/wsdl:service[@name='ProductControllerService']/wsdl:port[@name='ProductControllerPort'] Error: No endpoints compatible with .Net Core apps were found. An error occurred in the tool.
Failed to generate service reference.
據我瞭解,這是因爲.NET的SOAP生成代碼不理解爲包含xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
的類型我已閱讀過關於手動包含它的內容,但方向不明(包括有關此主題的其他StackOverflow答案),下載WSDL並使用import/include不起作用。
任何想法?
嗯,不用於.NET核心AFAIK工作,我必須找到一個解決辦法。 – StrangeWill