管道组件 - 服务参考 [英] Pipeline Component - Service Reference

查看:67
本文介绍了管道组件 - 服务参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为BizTalk创建了一组管道组件,它们位于自己的类库中。


我已经为类添加了一个名为KSWebService240的服务引用。 / p>

但是,当管道组件中的以下行`var dtWS = new KSWebService240.MessageServiceSoapClient();`失败并显示以下消息时:


System.InvalidOperationException :无法在ServiceModel客户端配置部分中找到引用合同"KSWebService240.MessageServiceSoap"
的默认端点元素。这可能是因为没有为您的应用程序找到配置文件,或者因为在客户端元素中找不到与此合同匹配的端点元素。


这意味着我的配置缺少包含绑定的文件。

但是,在BizTalk中,部署了包含管道组件的DLL。

我认为您不需要部署配置文件。 / p>


注意:SOAP服务是包含描述的磁盘上WSDL文件的链接。




如何让管道组件发挥作用并与SOAP服务连接?




亲切的问候,

解决方案

....除了你没有,意味着不要使用管道组件调用服务。


这是常规的.Net规则,但是......


直接告诉你,没有可靠的理由从管道组件调用服务。 没有架构,没有性能,没有可维护性,没有。 所有这些都会增加不必要的复杂性并在现在和将来产生问题。


BizTalk Server通过业务流程和适配器内置了对SOAP的支持。


I have created a set of Pipeline Components for BizTalk, which lives in their own Class Library.

I have added a service reference to the class, named KSWebService240.

However, when the following line `var dtWS = new KSWebService240.MessageServiceSoapClient();` in the Pipeline Component does fail with the following message:

System.InvalidOperationException: Could not find default endpoint element that references contract 'KSWebService240.MessageServiceSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

This means that my configuration file containing the binding is missing.
However, in BizTalk the DLL containing the Pipeline Components is deployed.
I don't think you need to deploy the configuration file.

NOTE: The SOAP service is a link to a WSDL file on disk containing the description.

How can I let the Pipeline Component do it's work and connect with the SOAP service?

Kind regards,

解决方案

Well....other than you don't, meaning do not call services withing Pipeline Components.

It's regular .Net rules but...

Telling you straight up, there is no credible reason to call services from Pipeline Components.  No architectural, no performance, no maintainability, none.  All this does is add unnecessary complexity and create problems, now and in the future.

BizTalk Server has built in support for SOAP through Orchestrations and Adapters.


这篇关于管道组件 - 服务参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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