SSIS Web服务任务,无法执行Web服务

时间:2021-04-07 16:36:19

I have a web service that is called from my ssis.

我有一个从我的ssis调用的Web服务。

Used to work fine in test mode, when moved to live environment I get the error :

用于在测试模式下正常工作,当移动到实时环境时,我收到错误:

[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: Object reference not set to an instance of an object.. 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服务任务]错误:出现以下错误消息时出现错误:“Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException:无法执行Web方法。错误是:对象引用未设置为对象的实例.. 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, VariableSispenser taskVariableDispenser)在Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()“。

We are using a proxy to access the web. Could this be a proxy problem. how to solve ?

我们正在使用代理来访问网络。这可能是代理问题。怎么解决 ?

Thanks

5 个解决方案

#1


It was simple proxy issue.

这是简单的代理问题。

Don't forget to configure the proxy tab in your Http Connection Manager

不要忘记在Http Connection Manager中配置代理选项卡

#2


To help diagnose this, you might try using a script task and adding a Service Reference or Web Reference to the web service. Call the service within a try/catch block and log ex.ToString() if you get an exception. That way, you'll be sure to have all the details, and you can post them here in an edit to your question.

为帮助诊断此问题,您可以尝试使用脚本任务并向Web服务添加服务引用或Web引用。在try / catch块中调用服务,如果出现异常,请记录ex.ToString()。这样,您将确保获得所有详细信息,并且可以在此处将其发布到您的问题的编辑中。

#3


It's also worth noting that SSIS cannot invoke services with spaces in the names. See the following for details:

值得注意的是,SSIS不能在名称中调用带空格的服务。有关详细信息,请参阅以下

http://connect.microsoft.com/SQLServer/feedback/details/368606/ssis-web-service-task-cannot-call-services-with-a-space-in-the-name

This answer would have saved me time so I'm adding it in the hope it saves someone else some time.

这个答案可以节省我的时间,所以我添加它,希望它能节省一些时间。

#4


I had the same problem, except my cause was that I was attempting to pass an integer (Int32) as a web service parameter. It looks like web service parameters in SSIS should always be strings.

我有同样的问题,除了我的原因是我试图传递一个整数(Int32)作为Web服务参数。看起来SSIS中的Web服务参数应该始终是字符串。

#5


I'm using SSIS 2017 and none of the solutions worked for me. But, after changing the SQL Server used by the project, from 2017 to 2016 (or whatever version of SQL is installed), I was able to run the WebService task successfully.

我正在使用SSIS 2017,但没有一个解决方案适合我。但是,在更改项目使用的SQL Server后,从2017年到2016年(或安装了任何版本的SQL),我能够成功运行WebService任务。

Hope will help somebody.

希望会帮助别人。

SSIS Web服务任务,无法执行Web服务

#1


It was simple proxy issue.

这是简单的代理问题。

Don't forget to configure the proxy tab in your Http Connection Manager

不要忘记在Http Connection Manager中配置代理选项卡

#2


To help diagnose this, you might try using a script task and adding a Service Reference or Web Reference to the web service. Call the service within a try/catch block and log ex.ToString() if you get an exception. That way, you'll be sure to have all the details, and you can post them here in an edit to your question.

为帮助诊断此问题,您可以尝试使用脚本任务并向Web服务添加服务引用或Web引用。在try / catch块中调用服务,如果出现异常,请记录ex.ToString()。这样,您将确保获得所有详细信息,并且可以在此处将其发布到您的问题的编辑中。

#3


It's also worth noting that SSIS cannot invoke services with spaces in the names. See the following for details:

值得注意的是,SSIS不能在名称中调用带空格的服务。有关详细信息,请参阅以下

http://connect.microsoft.com/SQLServer/feedback/details/368606/ssis-web-service-task-cannot-call-services-with-a-space-in-the-name

This answer would have saved me time so I'm adding it in the hope it saves someone else some time.

这个答案可以节省我的时间,所以我添加它,希望它能节省一些时间。

#4


I had the same problem, except my cause was that I was attempting to pass an integer (Int32) as a web service parameter. It looks like web service parameters in SSIS should always be strings.

我有同样的问题,除了我的原因是我试图传递一个整数(Int32)作为Web服务参数。看起来SSIS中的Web服务参数应该始终是字符串。

#5


I'm using SSIS 2017 and none of the solutions worked for me. But, after changing the SQL Server used by the project, from 2017 to 2016 (or whatever version of SQL is installed), I was able to run the WebService task successfully.

我正在使用SSIS 2017,但没有一个解决方案适合我。但是,在更改项目使用的SQL Server后,从2017年到2016年(或安装了任何版本的SQL),我能够成功运行WebService任务。

Hope will help somebody.

希望会帮助别人。

SSIS Web服务任务,无法执行Web服务