How to edit WSDL (XML) in SSIS

Viewed 69

is there a way to edit the xml file during the package? I have WSDL file and 1 table with 1 column (short int) in MSSQL. In SSIS I have foreach loop container which has every iteration different value from my 1 the msssql table. And this value (value in variable) I need to paste into WSDL file and get response from WSDL.

Is there an easy way to do this?

For example:

start xml.... < Number>?< /Number> end xml....

And during execution of package insert my variable instead of a question mark?

Like this - first iteration of my foreach loop:

start xml.... < Number>1< /Number> end xml....

.. get answer from WSDL .. Second iteration of my foreach loop:

start xml.... < Number>2< /Number> end xml....

Thank you, J

1 Answers

When you configure your web service task, in the input and output tabs you can specify that you want to use variables. For the input tab there is a checkbox to specify a variable instead of a value, while in the output tab you can specify the output type as a variable. You can read about it in the documentation or see this tutorial for some images: https://www.tutorialgateway.org/ssis-web-service-task/

enter image description here

enter image description here

Finally, I should point out that you are not invoking the WSDL, you are invoking a SOAP web service. The WSDL serves another purpose. See this article for an explanation: The WSDL is not the SOAP web service.

So you don't edit the WSDL or the XML, the SSIS web service task handles the SOAP protocol for you, and allows you to call a method on the web service by sending it some parameters, in your case the number of each iteration.

Related