How to consume AIF service(即WCF service) in SSIS project
最近在使用AIF做connectors時遇到一個問題,就是無法在SSIS里調(diào)到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啟動時無法調(diào)到C#的AIF service的app.config文件,導(dǎo)致沒有訪問到AIF service。
?
解決方案:
在SSIS package里通過WCF client的方式來調(diào)用WCF service。
1. Specify a SSIS variable for the web service URL. 我們將會把這個變量作為參數(shù)
?
2. Create WCF client in code in script component.
private CompanyListService serviceClient;
???? private ChannelFactory<CompanyListService> companyViewChannelFactory;
在SSIS PreExecute() 實(shí)例化這個channelFactory,調(diào)用CreateChannel()去訪問WCF service。
在CreateServiceBinding() method里,構(gòu)造netTcpBinding。
?
3. Close service client after execute the AIF operations.?
近期在做與SSIS相關(guān)的project,期待有更深入的學(xué)習(xí)!
轉(zhuǎn)載于:https://www.cnblogs.com/ivyliu/p/3735515.html
總結(jié)
以上是生活随笔為你收集整理的How to consume AIF service(即WCF service) in SSIS project的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Fatal error: cannot
- 下一篇: AI 趋势