簡體   English   中英

無法導入wsdl:portType,wsdl:binding,wsdl:port

[英]Cannot import wsdl:portType, wsdl:binding, wsdl:port

我在使用SVCUtil為WCF生成代理時遇到錯誤。 錯誤是

Attempting to download metadata from 'net.pipe://localhost/WebServices/Mgmt.svc' using WS-Metadata Exchange. This URL does not support DISCO.
Error: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Referenced type 'SearchCriteria, Service.DataContracts, Version=2.5.0.0, Culture=neutral, PublicKeyToken=null
t be used since it does not match imported DataContract. Need to exclude this type from referenced types.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IMgmt']


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='http://tempuri.org/']/wsdl:portType[@name='IMgmt']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='NetNamedPipeBinding_IMgmt']


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='http://tempuri.org/']/wsdl:binding[@name='NetNamedPipeBinding_IMgmt']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='Mgmt']/wsdl:port[@name='NetNamedPipeBinding_I


Generating files...
Warning: No code was generated.
If you were trying to generate a client, this could be because the metadata documents did not contain any valid contracts or services
or because all contracts/services were discovered to exist in /reference assemblies. Verify that you passed all the metadata documents to the tool.

Warning: If you would like to generate data contracts from schemas make sure to use the /dataContractOnly option.

一切都工作正常,直到我在數據合同中添加枚舉成員。

其他問題可能是,沒有將所有XSD傳遞給svcutil。 我們的問題是我們正在使用

svcutil.exe service.wsdl

代替

svcutil.exe service.wsdl first.xsd second.xsd ......

僅供參考,我們正在將java Web服務集成到我們的wcf服務/ .net客戶端。

原來,我們正在重用DataContract而生成代理和舊的DataContract dll並沒有被替換它所引用的位置。

還可以從有問題的響應中獲得幫助- 這是什么-wcf-error-mean-custom-tool-warning-can-import-wsdlporttype?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM