SSIS 2012 Web服务任务 - 字符串不是Primitive Type类型

时间:2014-03-11 18:22:51

标签: ssis dts ssis-2012

我正在使用SSIS 2012并尝试拨打以下公共网络服务:https://www.asc.gov/wsvc/ASCQuerySvc.asmx?WSDL

我能够成功调用GetQueryableFields()方法但是当我尝试调用RunQuery()方法时,我收到以下错误:

[Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: The WebMethodInfo you have specified is incorrect. String is not of type Primitive Type..
   at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)
   at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser)
   at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".

我搜索过网页,我唯一能找到的就是Web Service任务存在自定义复杂对象的问题,没有进一步的解释。我发现的唯一解决方法是执行脚本任务,我可以这样做。我只是问,因为如果我可以使用Web服务任务而不是自定义 C#,那么我的BI人员在构建这些SSIS包之前不必等待开发人员。

提前致谢。

1 个答案:

答案 0 :(得分:2)

有同样的问题。经过数小时的故障排除后计算出来。

运行SSIS包以从ASC webservice中提取许可证数据时,它失败并显示以下错误消息:

您指定的WebMethodInfo不正确。字符串不是Primitive Type

类型

因为dtsx文件中的数据类型定义区分大小写。

要解决此问题,请使用记事本编辑dtsx文件。搜索 数据类型="字符串" 。有三个匹配,只有一个匹配大写。将" String"中的大写字母S替换为用小写字母s - > "串&#34 ;.保存dtsx文件。