为 Web 服务任务创建复杂类型变量 [英] Create complex-type variables for a Web Service Task

查看:32
本文介绍了为 Web 服务任务创建复杂类型变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 SSIS 中,我已经有一个使用 WSDL 发送 SMS 的 Web 服务任务.我确实可以使用此任务发送短信.

In SSIS, I already have a Web Service Task using a WSDL for sending SMS. I am indeed able to send SMS using this task.

我想从数据库中为此任务提供值,例如手机号码、消息正文、用户 ID 等.

I want supply values to this task from the database, such as Mobile Number, Message body, User ID, etc.

如何创建可作为输入传递给 Web 服务任务的复杂类型用户变量?

推荐答案

更简单"的方法是使用脚本组件将变量绕过到 Web 服务.检查 http://amolpandey.com/2016/09/26/ssis-script-task-to-obtain-geo-cordinates-from-address-text-via-google-api/ &http:///www.sqlmusings.com/2011/03/25/geocode-locations-using-google-maps-v3-api-and-ssis/.测试和工作.使用此任务,您可以绕过 SSIS 变量/参数.示例:通过执行 SQL 任务从表中获取 ID、地址、邮政编码、城市、国家/地区.更改结果集:常规选项卡上的完整结果集.然后在结果集选项卡上添加 Result_Name:0 &变量名称:用户::您的对象.那么接下来的任务将是一个Forlooptask编辑器(Foreach ADO Enumerator ,Collection tab - Ado object source variable: User::YourObject, enumeration mode: rows in the first table, variable Mapping tab - Variable User::Id, 0 | address,1 等).在 Forlooptask 编辑器中,您添加了一个数据流任务,该任务的源将是一个脚本组件.如果您更具体地了解您的逻辑,我们可能会为您提供更多帮助.

The more 'easy' way is to use the script component for bypassing variables to a web service. Check http://amolpandey.com/2016/09/26/ssis-script-task-to-obtain-geo-cordinates-from-address-text-via-google-api/ & http://www.sqlmusings.com/2011/03/25/geocode-locations-using-google-maps-v3-api-and-ssis/. Tested and working. Using this task you can bypass the SSIS variables/parameters. Example: Getting ID, addreess, zipcode, city, country from a table with an execute SQL Task. Change Resultset:Full result set on General tab. Then on resultset tab add Result_Name:0 & Variable_Name: User::YourObject. Then the next task will be a Forlooptask editor (Foreach ADO Enumerator ,Collection tab - Ado object source variable: User::YourObject, enumeration mode: rows in the first table, variable Mapping tab - Variable User::Id, 0 | address,1 etc.). Inside the Forlooptask editor you add a data flow task, which the source of this task will be a script component. If you be more specific about your logic,we may assist you more.

这篇关于为 Web 服务任务创建复杂类型变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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