【发布时间】:2012-09-30 00:23:54
【问题描述】:
我真的陷入了困境,并会尝试部分解释它。
1:我有一个包含一些服务的 WCF 类库项目。
2:我有一个类库项目。
3:我有一个使用类库项目的网站。
4:类库有一个来自 WCF 类库项目的服务引用,并且同样的 WCF 引用也添加到了网站
5:当我建立网站时,出现以下错误。
错误 1113 Reference.svcmap:无法为服务引用“VPServices”生成代码。无法导入 wsdl:portType 详细信息:运行 WSDL 导入扩展时引发异常:System.ServiceModel.Description.DataContractSerializerMessageContractImporter 错误:引用类型列表包含命名空间“http://”中具有数据协定名称“VpResponseData”的多个类型schemas.datacontract.org/2004/07/VPExternalCalls.CoreApi.MessageDefinitions'。需要排除除以下类型之一之外的所有类型。只有匹配的类型可以是有效的引用:
"WebApplication.Helpers.Class.ResponseData, WebApplication.Helpers, 版本=1.0.0.0,文化=中性,PublicKeyToken=null"(匹配) “VPExternalCalls.CoreApi.MessageDefinitions.VpResponseData, VPExternalCalls,版本=1.0.0.0,文化=中性, PublicKeyToken=559d4289d6c6d138"(匹配)XPath 到错误源: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IVPServices'] 无法导入 wsdl:绑定详细信息:导入一个错误 wsdl:binding 所依赖的 wsdl:portType。 XPath 到 wsdl:端口类型: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IVPServices'] 错误源的 XPath: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IVPServices'] 无法导入 wsdl:port 详细信息:导入一个错误 wsdl:port 所依赖的 wsdl:binding。 XPath 到 wsdl:绑定: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IVPServices'] 错误源的 XPath: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='VPServices']/wsdl:port[@name='BasicHttpBinding_IVPServices'] App_WebReferences/VPServices/
【问题讨论】:
标签: c# wcf web-services class-library