我們必須調用特定的soap web服務,並且無法生成所需的.NET代理類。我們試圖用svcutil.exe來做到這一點,並簡單地在Visual Studio中添加服務引用,但我們得到的錯誤是相同的。我們只是不知道這個wsdl有什麼問題。錯誤是:如何爲特定的WSDL生成WCF
Custom tool warning: Cannot import wsdl:portTypeDetail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporterError: These members may not be derived.XPath to Error Source: //wsdl:definitions[@targetNamespace=' http://localhost:8000/ibis/ws/Tasklist ']/wsdl:portType[@name='TaskControl_-WSC-_MainPortType']
Custom tool warning: Cannot import wsdl:bindingDetail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.XPath to wsdl:portType: //wsdl:definitions[@targetNamespace=' http://localhost:8000/ibis/ws/Tasklist ']/wsdl:portType[@name='TaskControl_-WSC-MainPortType']XPath to Error Source: //wsdl:definitions[@targetNamespace=' http://localhost:8000/ibis/ws/Tasklist ']/wsdl:binding[@name='TaskControl-WSC-_MainBinding']
Custom tool warning: Cannot import wsdl:portDetail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.XPath to wsdl:binding: //wsdl:definitions[@targetNamespace=' http://localhost:8000/ibis/ws/Tasklist ']/wsdl:binding[@name='TaskControl_-WSC-_MainBinding']XPath to Error Source: //wsdl:definitions[@targetNamespace=' http://localhost:8000/ibis/ws/Tasklist ']/wsdl:service[@name='externalinterfacetasks_v10']/wsdl:port[@name='TasklistPort']
SoapUi似乎沒有問題。
鏈接到有問題的WSDL:https://drive.google.com/open?id=0B0PhgwgtgEbRX3U3c05WRW5LbU0
沒有任何人有一個想法是什麼問題?
http://stackoverflow.com/questions/21682947/svcutil-does-not-generate-soap-client –
如果您可以使用visual studio在客戶端應用程序中添加引用(.dll),請確保添加引用數據成員和數據合同DLL以及它們是否在單獨的程序集中定義。通過擴展ClientBase創建代理類,並在C#或app.config/web.config文件中設置客戶端配置。 –
可能重複的[svcutil不生成肥皂客戶端](http://stackoverflow.com/questions/21682947/svcutil-does-not-generate-soap-client) –