SecurID® Governance & Lifecycle Blog

Subscribe to the official SecurID Governance & Lifecycle community blog for information about new product features, industry insights, best practices, and more.

AFX SOAP Connector tutorial : WorkDay

MichaelBluteau
Employee
Employee
3 0 651

This is a quick example for how to build a new SOAP/Web Services connector from scratch.  We use WorkDay as an example.

Step-by-step guide

Step by step:

  1. Get the WSDL
  2. Import WSDL in SoapUI (get the free version from https://www.soapui.org/downloads/soapui.html )
  3. Create Mock Service
  4. Create AFX Connector using modified WSDL
  5. Create a few capabilities
  6. Test capabilities using SoapUI Mock Service

1- Get the WSDL for the Service.  For Workday, you can get them here for Hire_Employee:

https://community.workday.com/custom/developer/API/Staffing/v25.2/Hire_Employee.html

Workday-1.JPG

Import the WSDL in SoapUI:

Workday-2.JPG

Then right click on new Soap Project in tree, and select Create New Mock Service:

Workday-3.JPG

Then you can rename the Mock Service so it matches the real WorkDay service name, and change the path too:

Workday-4.JPG

Then you can modify the Mock Responses to include static text:

Workday-5.JPG

To save time, you can import my project attached WorkDay-Staffing-soapui-project.xml

You can start the Mock Service, and Test it within SoapUI first:

Workday-6.JPG

Then you will create a new AFX connector.  First you need to edit WSDL so the location matches your Mock Service location="http://Staffing:8088/Staffing" :

Workday-7.JPG

Then you can copy the file to /home/oracle/ftp.  Also add this line to /etc/hosts on your Via L&G server(I am using NAT and 192.168.1.0 for VMware WS):

192.168.1.1 Staffing

Then create the new AFX SOAP Connector, and point to your modified WSDL:

Workday-8.JPG

Then configure the Create Account capability using the Hire_Employee Request as an example:

Workday-9.JPG

Workday-10.JPG

You can import my connector here with 3 Capabilities(Create/Delete Account and Add Account to Role):  ConnectorPackage-WorkDay-Test.zip

Now you can test capabilities, e.g. Create Account:

Workday-11.JPG

Workday-12.JPG

You can check that the request made it into SoapUI, and see the Response:

Workday-13.JPG

Workday-14.JPG

You can also check AFX logs to see that the Response was returned:

Workday-15.JPG

Now you can add more tags to Requests in capabities for the connector.  If you are using this against a real Workday instance, some attributes/tags may be mandatory or required by the customer.  You can use the SoapUI Requests and copy more tags/sections or the whole Soap Request itself.

Here are the 3 capabilities for my connector:

Create Account:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bsvc="urn:com.workday/bsvc">
<soapenv:Header/>
<soapenv:Body>
<bsvc:Hire_Employee_Request xmlns:bsvc="urn:com.workday/bsvc" bsvc:version="string">
<bsvc:Hire_Employee_Data>
<bsvc:Applicant_Reference bsvc:Descriptor="string">
<!-- 1 or more repetitions: -->
<bsvc:ID bsvc:type="WID">${Account}</bsvc:ID>
</bsvc:Applicant_Reference>
<bsvc:Organization_Reference bsvc:Descriptor="string">
<bsvc:ID bsvc:type="WID">${Account}</bsvc:ID>
</bsvc:Organization_Reference>
<bsvc:Create_Workday_Account_Data>
<bsvc:User_Name>${Account}</bsvc:User_Name>
<bsvc:Account_Disabled>true</bsvc:Account_Disabled>
<bsvc:Password>${Password}</bsvc:Password>
</bsvc:Create_Workday_Account_Data>
<bsvc:Hire_Employee_Data>
<bsvc:Applicant_Data>
<bsvc:Legal_Name_Data>
<bsvc:Name_Detail_Data bsvc:Formatted_Name="?" bsvc:Reporting_Name="?">
<bsvc:First_Name>${FirstName}</bsvc:First_Name>
<!--Optional:-->
<bsvc:Middle_Name${MiddleName}></bsvc:Middle_Name>
<!--Optional:-->
<bsvc:Last_Name>${LastName}</bsvc:Last_Name>
</bsvc:Name_Detail_Data>
</bsvc:Legal_Name_Data>
<bsvc:Hire_Employee_Data>
</bsvc:Hire_Employee_Data>
</bsvc:Hire_Employee_Request>
</soapenv:Body>
</soapenv:Envelope>

--------------------------

Delete Account:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bsvc="urn:com.workday/bsvc">
<soapenv:Header/>
<soapenv:Body>
<bsvc:Terminate_Employee_Request bsvc:version="?">
<bsvc:Business_Process_Parameters>
<bsvc:Comment_Data>
<bsvc:Worker_Reference bsvc:Descriptor="?">
<!--Zero or more repetitions:-->
<bsvc:ID bsvc:type="?">${Account}</bsvc:ID>
</bsvc:Worker_Reference>
</bsvc:Comment_Data>
</bsvc:Business_Process_Parameters>
</bsvc:Terminate_Employee_Request>

-------------------

Add Role to Account:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bsvc="urn:com.workday/bsvc">
<soapenv:Header/>
<soapenv:Body>
<bsvc:Assign_Roles_Request bsvc:version="?">
<bsvc:Business_Process_Parameters>
<bsvc:Comment_Data>
<bsvc:Worker_Reference bsvc:Descriptor="?">
<bsvc:ID bsvc:type="?">${Account}</bsvc:ID>
</bsvc:Worker_Reference>
</bsvc:Comment_Data>
</bsvc:Business_Process_Parameters>
<bsvc:Assign_Roles_Event_Data>
<bsvc:Event_Target_Assignee_Reference bsvc:Descriptor="?">
<bsvc:ID bsvc:type="?">${Account}</bsvc:ID>
</bsvc:Event_Target_Assignee_Reference>
<bsvc:Assign_Roles_Role_Assignment_Data>
<bsvc:Assignable_Role_Reference bsvc:Descriptor="?">
<bsvc:ID bsvc:type="?">${Role}</bsvc:ID>
</bsvc:Assignable_Role_Reference>
</bsvc:Assign_Roles_Role_Assignment_Data>
</bsvc:Assign_Roles_Event_Data>
</bsvc:Assign_Roles_Request>
</soapenv:Body>
</soapenv:Envelope>