在ssis中编写脚本任务以使用wcf服务 [英] Script task in ssis to consume wcf service

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

问题描述

是否有人在ssis中使用脚本任务成功调用wcf服务?

我收到错误



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

Does anyone succeed in calling wcf service using script task in ssis?
I am getting error

Could not find default endpoint element that references contract 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.

推荐答案

如上所述这里 [ ^ ]:

如果您出现此错误正在调用类库中的服务并从另一个项目调用类库。



在这种情况下,您需要将WS配置设置包含到主项目中app.config如果它是一个winapp或web.config,如果它是一个Web应用程序。这是使用PRISM和WPF / Silverlight的方法。



解决方案建议:使用 contract =IMySOAPWebService在您的配置文件中。



另一个 thread [ ^ ]讨论相同内容。
As mentioned here[^]:
"This error can arise if you are calling the service in a class library and calling the class library from another project."

In this case you will need to include the WS configuration settings into the main projects app.config if its a winapp or web.config if its a web app. This is the way to go even with PRISM and WPF/Silverlight.

Solution suggested: Use contract="IMySOAPWebService" in your config file.

Another thread[^] discussing the same.


消息msg =新消息();

sender.Send(msg);
Message msg = new Message();
sender.Send(msg);


这篇关于在ssis中编写脚本任务以使用wcf服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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