How to get data from Workday in SSIS using SOAP/REST API

Introduction

In this article you will learn how to get data from WorkDay SOAP web service in few clicks using SSIS SOAP XML Source. All you need to know how to create SOAP Request correctly and provide Authorization (e.g. Userid, Password) inside your request (You can generate that easily using Free tools like SoapUI). Once you do that you can call virtually any WorkDay API using our SSIS XML Source. If you need more help contact our Support and we will be happy to help you step by step.

 

How to call Workday API in SSIS (Read or Write Data)

Here are high level steps to read or write Workday data in SSIS.

  1. Obtain Workday WSDL URL (Service Metadata) and API URL for your tenant
  2. Craft POST request XML using tool like SoapUI for desired operation (e.g Get_Employee )
  3. Configure SSIS HTTP Connection (for SOAP WSS) using API url and workday Userid / password.
  4. Call Workday API using any of these tasks or components SSIS XML Source or SSIS REST API TASK or SSIS Web API Destination to read / write data.

Now lets look at each step in detail in the following sections

NOTE: If you are trying to get data from Workday report instead (your Workday admin created a report and gave you a link) then skip Soap UI part, use the URL with GET method and Basic authentication instead of SOAP WSS.

Obtain Workday SOAP WSDL URL (API Metadata URL)

First step to consume workday api using SSIS is download SOAP WSDL file. WSDL is XML file which describes available API operations and structure of request and response. Here is the list of available WSDL for various Workday API Services. Right click on WSDL icon and save to local disk. We will use this WSDL in next section to craft SOAP Request using SoapUI tool

You can find more information about Other Workday API here.

Obtain Workday API URL

Once you have WSDL file, next step is craft correct URL for API service you like to call. Service name can be obtained from here (Check service column)

Syntax: https://<workday host name>.workday.com/ccx/service/<tenant name>/<service-name>
Example:
https://MY-INSTANCE.workday.com/ccx/service/MY-TenantID/Human_Resources

Craft SOAP Body (XML API Request) using SoapUI

Now its time to craft some SOAP Request. Check steps outlined here (Use SoapUI tool) . Once you have Request Body XML you can change parameters as per your need.

Here is sample  SOAP XML Body for Get Employee call from Human_Resopurces service.

Create SOAP Request Body from WSDL (Using SoapUI tool)

Create SOAP Request Body from WSDL (Using SoapUI tool)

 

Creating SSIS Connection for Workday SOAP API call using WSS Security

To create new connection for workday perform the following steps.

  1. Two ways you can create HTTP connection for workday
    First approach: Right click in the connection managers panel and click “New Connection…” and Select ZS-HTTP connection from the connection type list and click OK.
    — OR —
    Second approach: If you are already on SSIS XML Source or SSIS REST API TASK or SSIS Web API Destination UI then click [New] next to the Connection Dropdown.
  2. Once HTTP Connection UI is visible configure following way.
    1. Enter API URL for Workday (Make sure you don’t enter WSDL URL found here ). Your API URL will be something like below.
      Syntax: https://<workday host name>.workday.com/ccx/service/<tenant name>/<service-name>
      Example:
      https://wd1-impl-services1.workday.com/ccx/service/MyTenantID/Human_Resources
    2. Select credential type as SOAP WSS (This setting is only found in v2.6.4 or Higher)
    3. Enter your workday userid and password
    4. For WSS password type setting you leave it default (Not set) or change to PasswordHash for more secure communication.
    5. Click OK to save.
SSIS Workday Integration - Create New SAOP Service Connection for Workday API Service (SOAP WSS)

SSIS Workday Integration – Create New SOAP Service Connection for Workday API Service (SOAP WSS)

 

Calling Workday sample API using SSIS REST API Task

Here is how you can call any Workday API action from control flow using SSIS REST API TASK. Below is simple way to execute API in SSIS but if you need to parse API response into rows and column then check next section on how to use SSIS XML Source

Configure following settings

  1. Select URL Access Mode to URL from Connection
  2. Select HTTP Connection created in the previous section
  3. Change Request Method to POST
  4. Change Content Type to XML (text/xml;charset=UTF-8)
  5. Enter SOAP Body (Obtained in the previous section using SoapUI )
  6. Click Raw Edit above Headers grid. Enter below string
  7. Click Test Request / Response. You should see Response data.
Calling workday API using SSIS REST API Task

Calling workday API using SSIS REST API Task

 

Write workday data using SSIS XML Task (Import from SQL Server to Workday)

Check this article to learn how to load sql server data data to workday

Reading Workday data using SSIS XML Task (Export from workday to SQL Server)

In this section we will not use Here are high level steps.

  1. Drag Data Flow Task from SSIS Toolbox
  2. Drag SSIS XML Source  from the toolbox.
  3. Enter the API URL (Do not enter WSDL URL)
    Example URL => https://wd5-impl-services1.workday.com/ccx/service/{{tenant}}/Human_Resources
  4. Select HTTP Connection created in the previous section
  5. Check Use Credentials Option and Select HTTP connection created in the previous section
  6. Change Request Method to POST
  7. Change Content Type to XML (text/xml;charset=UTF-8)
  8. Enter SOAP Body (Obtained in the previous section using SoapUI )
  9. Click Raw Edit above Headers grid. Enter below string
  10. Click Preview to see the data
  11. Click OK to save the UI
  12. Now you can connect your XML Source to any target such as OLEDB Destination (SQL Server Table)

Here is the example screenshot …

Get data from WorkDay Web Service (Call XML SOAP API in SSIS)

Workday API Pagination – Retrieve more than 100 rows

By default Workday API will return only 100 records unless you specify Page / Count in Response_Filter . Regardless it will only send you 999 maximum rows. To fetch more records after first page you have to setup pagination in XML Source as below. You will need latest version to use this feature (version 2.7.8 or higher).

Workday SOAP API Pagination Settings in SSIS XML Source

Workday SOAP API Pagination Settings in SSIS XML Source

And one more thing you have change in Body as below. Pass Response_Filter parameter as below. See how we used <%page%> placeholder. You can use tool like fiddler to see multiple response at runtime. Run package and check fiddler.

Workday API Pagination - Supply Response_Filter (Page Size and Current Page Number)

Workday API Pagination – Supply Response_Filter (Page Size and Current Page Number)

Sample SOAP Request for Workday API Call

Here is sample request. You have to fill out placeholders (e.g. xxxxxxxx ) when you submit it

There are two ways to pass userid/password inside SOAP Header. WSS PlainText Password or Password Digest. If you using second method to hash password then use Tool like SoapUI.

Video Tutorial (See Part#4) – Create XML and POST data to SOAP Web Service or REST API

Now lets look at examples of creating XML from multiple data sources and POST XML request to SOAP Web Service URL or any other XML Based REST API URL. This video has 5 parts to cover full length tutorial but if you want to fast forward to see XML Generator Transform and Web API Destination then see part#4.

Manually Passing WSS Credentials (UserID / Password)

When you use HTTP connection using SOAP Setting you dont have to worry about generating WSS Security Header. But for some reason you have to do that manually not to worry. See below section to add UserID / Password Header manually. Again Skip this section if you are using SSIS HTTP Connection along with SOAP WSS Option.

To generate correct Credentials Header in SOAP Request use tool like SoapUI. Check this article to learn more how to generate WSS Security header.

  1. Assuming that you already gone through this article to learn how to use SoapUI.
  2. Open SoapUI. Click on the request you want to generate SOAP Request Code.
  3. Enter username and password in request properties grid
  4. Now right click in the XML Request Pane and click “Add WSS UserName Token”
    SoapUI Example - Adding credentials to Workday API call.

    SoapUI Example – Adding credentials to Workday API call.

  5. Select Password Method (e.g. PasswordText or PasswordDigest)
    SoapUI- Using PasswordDigest Method to insert userid / password inside Workday SOAP Request Body

    SoapUI- Using PasswordDigest Method to insert userid / password inside Workday SOAP Request Body

  6. Once you done. You may see new tags inserted under <soapenv:header> tag (For example see below section). You can now use the SOAP Request as your Body in your SSIS XML Source, REST API Task or Web API Destination.

Passing WSS Credentials in SOAP Header – PasswordText Method

If you select PasswordText Method then your SOAP code may look like below.

Passing WSS Credentials in SOAP Header – PasswordDigest Method

If you select PasswordDigest Method then your SOAP code may look like below. This is for example purpose to give you idea. Technically hardcoding Hash which is signed by Creation Timestamp is useless. Always use SSIS HTTP connection Manager if you like to use this method.

Truncation related error

The most common error you may face when you run an SSIS package is truncation error. During the design time only 300 rows are scanned from a source (a file or a REST API call response) to detect datatypes but at runtime, it is likely you will retrieve far more records. So it is possible that you will get longer strings than initially expected. For detailed instructions on how to fix common metadata related errors read an article “How to handle SSIS errors (truncation, metadata issues)“.

Authentication related error

Another frequent error you may get is an authentication error, which happens when you deploy/copy a package to another machine and run it there. Check the paragraph below to see why it happens and how to solve this problem.

 

Other Useful connectors for SOAP/XML and JSON REST API

SSIS XML Source (FILE, SOAP, REST API Connector)
SSIS JSON Source (File, REST Connector)

Here are few more useful links on how to Call SOAP API in general:

Calling SOAP Web Service in SSIS (XML Source)

How to get data from Google AdWords using SSIS

Also check this link to learn how to hand craft SOAP request to call Workday API.

Workday XML SOAP API Reference:

Workday REST API reference link

Conclusion

In this article we have learned how to load data from SQL Server to Workday using SSIS ( drag and drop approach without coding). Combination of few ZappySys Components (e.g. Web API Destination, XML Generator ) makes it super simple to call any Web API to load data from one system to API endpoint. Download SSIS PowerPack to try many other automation scenarios not discussed in this article.

Posted in REST API Integration, SSIS REST API Task, SSIS XML Source (File / SOAP) and tagged , , , , , , , , , .