How to pass user credentials to WSDL (web service) inside script task/SSIS?

﹥>﹥吖頭↗ 提交于 2020-02-05 03:28:41

问题


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

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

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

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.


回答1:


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

Using SSIS Web Service Task

I think this is more preferable.

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:

  • Example using Web Services with SQL Server Integration Services

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

Using C# Script

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


来源:https://stackoverflow.com/questions/54187153/how-to-pass-user-credentials-to-wsdl-web-service-inside-script-task-ssis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!