ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now

Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

How to easily Create a Soap Request using Alteryx Download Block and Open Source SoapUI


Hi everybody!


If you ever had the need of connecting to an API using a SOAP request, you probably have stumbled across the fact of how to create the request using the Alteryx Download Block so that it works in the end, as a SOAP Request needs to follow a specific XML structure given by actual API. These requests are quite often described in a so called .WSDL file. Unfortunately you cannot just copy out the information of the wdsl file into the Alteryx Download Block, its needs a little different format for the request itself.


If you for example look at the website , which allows you to manually check if a specific VAT Number is valid or not and for many valid ones it will also provide the Address information, there is also a Service offered by the EU to use a SOAP Request to get this information out for any given VAT number, which you can find here:


The above technical information page will also give hint you to #18 on the FAQ Page, which gives you access to the actual production .WSDL file here:


Now, Alteryx APA Platform comes into play, because Alteryx would allow you to automatically feed in VAT Numbers (for example through a Batch Macro) to check a bigger list of VAT Numbers all at once and automatically, but the question is, how can we generate the needed request for this?


Here a very nice Open Source tool called SoapUI ( ) comes into play. This tool allows you to read-in a WSDL file like the one above, and then generate a Sample Request which you can just copy into the rate place in the Alteryx Download Tool.


Let's go through the individual steps that you need to actually go through now:


1) Download and install SoapUI from the link above (of course)

2) Download / Get your needed WSDL file (for example for the EU VAT Check from the URL above)


3) In SoapUI do the following:

a) Click on "File" and then use the option "New SOAP Project"



b) In the Pop-up provide a "Project Name" and browse to the WSDL file that you have saved locally on your machine. Then make sure that the Checkbox for "Create Requests: Create sample requests for all operations?" is set and then click on "OK".




Afterwards your screen should look something like this (depending on the WSDL File you used):



Basically the above lists you all the possible requests that are defined in the WSDL file. If you open the tree of one of it, you should see at least one request like "Request 1"



Once you double-click on the Request 1, you can now see the actual request that is being done as well as the URL that you would need to use.



You can verify this request if you fill in the "?" in the different needed variables (in this example "countryCode" and "vatNumber") , so for example DE and 114880688 for my favorite football club Eintracht Braunschweig, and then hit the green "Play" button at the top



The result will then be displayed on the right side, in this example telling us, that this is a valid VAT number



Knowing now that this request is working, we can move to Alteryx and use this request in the Download building Block. All we need to do is copy the full input request as Text from SoapUI to the "Payload" tab in the Alteryx Download Block using the "Use Following for Query String/Body"  option



Of course we then also need to add a Text Input Block in front of it providing the URL to the Download Block, which we can as mentioned before also obtain from SoapUI



Et voila, if we run the Workflow, it should now nicely connect to the API using SOAP and retrieve the information, which you then can parse in Alteryx to get the relevant information out of the downloaded Data.



Using then for example the Alteryx (Batch) Macro or Analytic App functionality, you can create a new Alteryx APA Building Block to be used by any Alteryx User in their Workflow or to be run as an Analytic App through the Alteryx Server by non-Alteryx Designer Users.


For a downloadable Example Macro (or if you are interested in the EU VAT Check yourself), feel free to just use the Batch Macro that I have built, which you can find in our Public Alteryx Gallery:!app/EU-VAT-Number-Check/606dae800462d71a2ceddb51


I hope this lilttle guide is helpful.


Best wishes



16 - Nebula
16 - Nebula

Great topic!!!

It would be great if this was moved to the knowledge base.