How to consume AIF service(即WCF service) in SSIS project
最近在使用AIF做connectors時遇到一個問題,就是無法在SSIS里調到script component里C#code引用的AIF service。
SSIS script component project: dtsx
|
Edit Script
|
Go into C# project, Add AIF service to a service reference. A config file is generated in? the component project.
錯誤:
原因:
在SSIS啟動時無法調到C#的AIF service的app.config文件,導致沒有訪問到AIF service。
?
解決方案:
在SSIS package里通過WCF client的方式來調用WCF service。
1. Specify a SSIS variable for the web service URL. 我們將會把這個變量作為參數
?
2. Create WCF client in code in script component.
private CompanyListService serviceClient;
???? private ChannelFactory<CompanyListService> companyViewChannelFactory;
在SSIS PreExecute() 實例化這個channelFactory,調用CreateChannel()去訪問WCF service。
在CreateServiceBinding() method里,構造netTcpBinding。
?
3. Close service client after execute the AIF operations.?
近期在做與SSIS相關的project,期待有更深入的學習!
轉載于:https://www.cnblogs.com/ivyliu/p/3735515.html
總結
以上是生活随笔為你收集整理的How to consume AIF service(即WCF service) in SSIS project的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Fatal error: cannot
- 下一篇: T端音乐盒子-NPC脚本