如何在脚本任务/SSIS中将用户凭据传递到WSDL(Web服务)? [英] How to pass user credentials to WSDL (web service) inside script task/SSIS?

查看:176
本文介绍了如何在脚本任务/SSIS中将用户凭据传递到WSDL(Web服务)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要求-我具有访问WSDL文件的用户凭据,并且可以通过浏览器访问该文件.

Requirement -I have user credentials to access a WSDL file and I can access the file via browser.

WSDL link - XYZ
userdID- asdf
pwd - *****

我需要在SSIS脚本任务中使用C#代码使用适当的用户凭据来调用此Web服务(特别是单个方法调用).

I need to use C# code inside SSIS script task to call this web service (specifically a single method call) using appropriate user credentials.

获取响应(以XML格式),解析XML以从中获取特定值,然后将其插入到SQL表中.

Get the response(which would be in XML) , parse the XML to get specific values from it and insert that into a SQL table.

如果有人知道/对如何达到上述要求有任何想法/参考链接,请告诉我.

If anyone know/have any idea/reference link on how to achieve the above requirement, please let me know.

推荐答案

使用SSIS可以使用两种方法来调用Web服务.

Using SSIS there are two methods to call a Web service.

我认为这是更可取的.

您可以创建一个HTTP连接管理器并指定凭据,然后在Web服务任务中使用它,有关详细示例,请参考以下链接:

You can create an HTTP connection Manager and specify the credentials then use it in Web Service Task, you can refer to the following link for detailed example:

还有更多有用的链接可供您参考:

Also there are more helpful links that you can refer to:

  • Example using Web Services with SQL Server Integration Services
  • SSIS Web Service Task
  • Web Service Task

您可以参考以下链接之一以获取更多信息:

You can refer to one of the following links for more information:

  • How to call and authenticate (pass user credentials) to a Web Service using console application at run-time (programmatically)
  • How to pass credentials to a SOAP webservice?
  • How can I call a webservice from C# with HTTP POST

这篇关于如何在脚本任务/SSIS中将用户凭据传递到WSDL(Web服务)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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