无法从vs2010向导中使用wcf服务 [英] Cannot consume wcf service from vs2010 wizard

查看:104
本文介绍了无法从vs2010向导中使用wcf服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好,我是b $ b $
我正在尝试使用visual studio 2010向导为我创建的WCF服务添加架构(对于BizTalk) 。我正在替换同一项目中的现有定义。我收到以下错误:



使用WCF服务元数据时出错。

无法继续由于类型名称冲突。

名称"IDiscountsWcfService_InsertDiscounts_InputMessage"已存在于命名空间中。

Good morning,

I'm trying to use the visual studio 2010 wizard to add a schema for a WCF service I created (for BizTalk). I'm replacing an existing definition in the same project. I'm getting the following error:

Error consuming WCF service metadata.
Cannot proceed due to type name clash.
The name "IDiscountsWcfService_InsertDiscounts_InputMessage" already exists in the namespace.

我尝试过的内容:



我有一个单元测试,它使用该服务并指示该服务已部署并正常工作。

我删除了旧的向导生成的文件,重新编译,退出IDE,并重新组装了程序集没有旧代码。

我重命名了服务方法等。

我在整个解决方案中搜索了向导生成类型的实例,它说它是冲突而没有发现任何内容。

任何建议都会受到赞赏。



这里是wsdl的服务摘录:



  < / wsdl:types>

  < wsdl:message name =" IDiscountsWcfService_InsertDiscounts_InputMessage">

  < wsdl:part name =" parameters"元素= QUOT; TNS:InsertDiscounts" /> 

  < / wsdl:message>

  < wsdl:message name =" IDiscountsWcfService_InsertDiscounts_OutputMessage">

  < wsdl:part name =" parameters"元素= QUOT; TNS:InsertDiscountsResponse" /> 

  < / wsdl:message>

  < wsdl:portType name =" IDiscountsWcfService">

  < wsdl:operation name =" InsertDiscounts">

  < wsdl:input wsaw:Action =" http://www.xxx.com/services/2012/10/Discounts/IDiscountsWcfService/InsertDiscounts"消息= QUOT; TNS:IDiscountsWcfService_InsertDiscounts_InputMessage" /> 

  < wsdl:output wsaw:Action =" http://www.xxx.com/services/2012/10/Discounts/IDiscountsWcfService/InsertDiscountsResponse"消息= QUOT; TNS:IDiscountsWcfService_InsertDiscounts_OutputMessage" /> 

  < / wsdl:operation>

  < / wsdl:portType>

  < wsdl:service name =" DiscountsWcfService">

  < wsdl:port name =" BasicHttpBinding_IDiscountsWcfService" binding =" i0:BasicHttpBinding_IDiscountsWcfService">

  < soap:address location =" http://localhost/DiscountsWcfService/DiscountsWcfService.svc" /> 

  < / wsdl:port>

  < / wsdl:service>

  < / wsdl:definitions>

What I've tried:

I have a unit test that consumes the service and indicates that the service is deployed and working.
I've removed the old wizard generated files, recompiled, exited the IDE, and reGAC'ed the assembly without the old code.
I renamed the service method, etc.
I searched the entire solution for an instances of the wizard generated type it says is clashing and found nothing.
Any suggestions would be appreciated.

Here's an excerpt from the wsdl for the service:

  </wsdl:types>
  <wsdl:message name="IDiscountsWcfService_InsertDiscounts_InputMessage">
  <wsdl:part name="parameters" element="tns:InsertDiscounts" /> 
  </wsdl:message>
  <wsdl:message name="IDiscountsWcfService_InsertDiscounts_OutputMessage">
  <wsdl:part name="parameters" element="tns:InsertDiscountsResponse" /> 
  </wsdl:message>
  <wsdl:portType name="IDiscountsWcfService">
  <wsdl:operation name="InsertDiscounts">
  <wsdl:input wsaw:Action="http://www.xxx.com/services/2012/10/Discounts/IDiscountsWcfService/InsertDiscounts" message="tns:IDiscountsWcfService_InsertDiscounts_InputMessage" /> 
  <wsdl:output wsaw:Action="http://www.xxx.com/services/2012/10/Discounts/IDiscountsWcfService/InsertDiscountsResponse" message="tns:IDiscountsWcfService_InsertDiscounts_OutputMessage" /> 
  </wsdl:operation>
  </wsdl:portType>
  <wsdl:service name="DiscountsWcfService">
  <wsdl:port name="BasicHttpBinding_IDiscountsWcfService" binding="i0:BasicHttpBinding_IDiscountsWcfService">
  <soap:address location="http://localhost/DiscountsWcfService/DiscountsWcfService.svc" /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

推荐答案

您是否删除了在消费期间生成的业务流程WCF服务。

have you deleted the orchestration generated during consume WCF Service .

问候

Mohit


这篇关于无法从vs2010向导中使用wcf服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆