首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法导入wsdl:portType、wsdl:binding、wsdl:port

无法导入wsdl:portType、wsdl:binding、wsdl:port
EN

Stack Overflow用户
提问于 2013-09-13 20:30:13
回答 2查看 38.5K关注 0票数 21

我得到错误时,为使用SVCUtil生成代理服务器配置文件。错误是

代码语言:javascript
复制
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.

在我在数据契约中添加枚举成员之前,一切都运行得很好。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-09-14 19:43:47

事实证明,我们在生成代理时重用了DataContract &旧的DataContract dll没有被替换到引用它的位置。

还可以从有问题的响应中获得帮助what-does-this-wcf-error-mean-custom-tool-warning-cannot-import-wsdlporttype?

票数 2
EN

Stack Overflow用户

发布于 2016-02-19 03:40:43

其他问题可能是,没有将所有XSD传递给svcutil。我们的问题是我们使用了

svcutil.exe service.wsdl

而不是

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

仅供参考,我们正在将java web服务集成到我们的wcf服务/.net客户端。

票数 14
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18786373

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档