【问题标题】:SSIS 2012 Web Service Task - String is not of type Primitive TypeSSIS 2012 Web 服务任务 - 字符串不是原始类型
【发布时间】:2014-03-11 18:22:50
【问题描述】:

我正在使用 SSIS 2012 并尝试调用以下公共 Web 服务: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()".

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

提前致谢。

【问题讨论】:

    标签: ssis dts ssis-2012


    【解决方案1】:

    有同样的问题。经过数小时的故障排除后弄清楚了。

    当运行 SSIS 包从 ASC 网络服务中提取许可证数据时,它失败并出现以下错误消息:

    您指定的 WebMethodInfo 不正确。字符串不是原始类型

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

    要解决此问题,请使用记事本编辑 dtsx 文件。搜索 Datatype="String"。共有三个匹配项,只有一个是大写的。将“String”中的大写 S 替换为小写 s -->“string”。保存 dtsx 文件。

    【讨论】:

    • 感谢慧勇的关注。由于我问这个问题已经 3 年多了,我不再有办法验证这确实是解决方案,但无论如何我都会将此标记为答案!
    猜你喜欢
    • 2013-04-05
    • 1970-01-01
    • 2010-10-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多