Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Error handling 分配给变量的值的类型(空)_Error Handling_Ssis - Fatal编程技术网

Error handling 分配给变量的值的类型(空)

Error handling 分配给变量的值的类型(空),error-handling,ssis,Error Handling,Ssis,有什么方法可以避免SSIS包中出现此错误 该包使用web服务任务调用web服务方法。将响应放入字符串类型的SSIS变量中,然后进一步处理 有时,该方法返回一个空响应;我无法控制它,因为它不是我的web服务。这种响应是一种已知的可能性:当传递给方法的GUID在web服务后面的任何存储中都找不到任何匹配行时,就会发生这种情况。我想处理这个错误。问题是(请参阅相关内容),这个特定的错误阻碍了我的SSIS错误处理,直接转到包错误处理程序 错误全文如下: An error occurred with th

有什么方法可以避免SSIS包中出现此错误

该包使用web服务任务调用web服务方法。将响应放入字符串类型的SSIS变量中,然后进一步处理

有时,该方法返回一个空响应;我无法控制它,因为它不是我的web服务。这种响应是一种已知的可能性:当传递给方法的GUID在web服务后面的任何存储中都找不到任何匹配行时,就会发生这种情况。我想处理这个错误。问题是(请参阅相关内容),这个特定的错误阻碍了我的SSIS错误处理,直接转到包错误处理程序

错误全文如下:

An error occurred with the following error message: "Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: The type of the value (Empty) being assigned to variable "User::WSResponse" differs from the current variable type (String). Variables may not change type during execution. Variable types are strict, except for variables of type Object.   ---> System.Runtime.InteropServices.COMException: The type of the value (Empty) being assigned to variable "User::WSResponse" differs from the current variable type (String). Variables may not change type during execution. Variable types are strict, except for variables of type Object.       at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSVariable100.set_Value(Object pvValue)     at Microsoft.SqlServer.Dts.Runtime.Variable.set_Value(Object value)     --- End of inner exception stack trace ---     at Microsoft.SqlServer.Dts.Runtime.Variable.set_Value(Object value)     at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.saveOutputToVariable(Object output)     at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".  
我想的是:

  • 将响应放入[可以处理空的某些SSIS数据类型-有吗?]
  • 值是否为空?如果是这样,可以通过触发行为良好的SSIS错误来处理此问题
  • 否则,将该值转换为SSIS字符串并继续
  • 编辑 奇怪的是,如果我选择一个文件作为输出而不是变量,那么Web服务任务不会返回空。在这种情况下,它返回以下内容:

    <?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<Result>The result is null. Either the result is null or the Web method returns void.</Result>
    
    \r\n结果为空。结果为null或Web方法返回void。
    
    不过,我不确定是否要开始在SSIS包中写入/读取文件系统

    无论是web服务本身,还是web服务任务,都像****一样有缺陷