本文介绍了服务引用错误:无法生成code的服务引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows服务解决方案,并在尝试添加服务引用爱马仕(开源ebMS消息服务器)在VS2010的Web服务。

I have a Windows Service Solution and am trying to add a service reference to a Hermes(Opensource ebms message server) Web Service in VS2010.

我可以通过它的网址找到Web服务,但是当我尝试和填充服务引用我得到Visual Studio中的以下错误:

I can find the Web Service using it's URL, but when I try and populate the Service reference I get the following errors in Visual Studio:

Error 8 Custom tool error: Failed to generate code for the service reference 'testService'.  Please check other error and warning messages for details. C:\Users\Admin\documents\visual studio 2010\Projects\MyProject\MyProject.MessageHandler\Service References\testService\Reference.svcmap 1 1 MyProject.MessageHandler


Warning 6 Custom tool warning: 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://service.ebms.edi.cecid.hku.hk/']/wsdl:portType[@name='EbmsStatusQuery']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://service.ebms.edi.cecid.hku.hk/']/wsdl:binding[@name='EbmsSoapHttpStatusQuery'] C:\Users\Admin\documents\visual studio 2010\Projects\MyProject\MyProject.MessageHandler\Service References\testService\Reference.svcmap 1 1 MyProject.MessageHandler

Warning 7 Custom tool warning: 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://service.ebms.edi.cecid.hku.hk/']/wsdl:binding[@name='EbmsSoapHttpStatusQuery']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://service.ebms.edi.cecid.hku.hk/']/wsdl:service[@name='EbmsMessageStatusQuery']/wsdl:port[@name='EbmsStatusQuery'] C:\Users\Admin\documents\visual studio 2010\Projects\MyProject\MyProject.MessageHandler\Service References\testService\Reference.svcmap 1 1 MyProject.MessageHandler

Warning 5 Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Error: Schema with target namespace 'http://service.ebms.edi.cecid.hku.hk/' could not be found.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://service.ebms.edi.cecid.hku.hk/']/wsdl:portType[@name='EbmsStatusQuery'] C:\Users\Admin\documents\visual studio 2010\Projects\MyProject\MyProject.MessageHandler\Service References\testService\Reference.svcmap 1 1 MyProject.MessageHandler

一些调查似乎表明这是由于svcutil.exe的未能建立proxys由于没有权限的目录(可能是C:\ WINDOWS \ TEMP)。我曾尝试分配不同的访问权限,但我真的不知道该用户所需要的权限,或者如果它仅仅是一个红鲱鱼。

Some investigation seemed to suggest it is due to svcutil.exe not been able to build the proxys due to not having permissions to a directory (possibly c:\windows\temp). I have tried assigning various access permissions, but I am not really sure which user needs the permission, or if it is just a red herring.

任何想法将大大AP preciated。

Any ideas would be greatly appreciated.

感谢

推荐答案

不得不取消重用类型的所有引用的程序从配置服务引用选项

Have to uncheck the Reuse types in all referenced assemblies from Configure service reference option

<一个href="http://smehrozalam.word$p$pss.com/2009/10/29/silverlight-update-service-reference-for-a-wcf-service-generting-empty-class/">Check本作的细节

这篇关于服务引用错误:无法生成code的服务引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 06:35