CreateSOAPSchema
Generates a custom schema file that performs a specific SOAP operation, allowing Workday data to be queried or integrated through a tailored SOAP-based interface.
Overview
The connector allows you to create tables from SOAP operations using the CreateSOAPSchema stored procedure. Like ExecuteSOAPOperation you can execute any SOAP operation, even those that are not dynamically mapped as tables. The difference is that CreateSOAPSchema allows you to configure input columns for providing dynamic values in the request body, and output columns for parsing the response. Tables created with CreateSOAPSchema are similar to dynamic SOAP tables but fully configurable.
Prerequisites
Before creating custom SOAP tables, you should enable the ExposeCustomTableSchema connection property. By default the connector hides the CustomTables schema that custom tables are assigned to.
You need to know the following to create a table for a SOAP operation. This information is available from the Workday Web Services Operation Directory.
- The Service the operation belongs to.
- The schema of the request message, so that you can create an XML RequestTemplate. The connector sends this XML to Workday when you query the table.
- The Parameters present in your request template. The connector exposes these as input columns that you provide filters for using WHERE conditions.
- The schema of the response message. This will help you determine the RepeatElement, a repeated element in the response XML that you want to treat as separate rows.
- In addition to the repeat element, the response schema is also used to determine the Columns of the operation. Each column has a name, a SQL type, and an XPath that determines where the value is in the response XML.
Creating a Custom Table
In this example we create a table that exposes the Find_Organization operation. It is part of the Human_Resources service.
According to the Workday documentation for this operation, the request element is called Organization_Find.
The body of this element is entirely optional but for the purposes of this example we expose the effective date and organization name as parameters.
This is the request template:
<wd:Organization_Find xmlns:wd="urn:com.workday/bsvc" wd:version="v44.1"> <wd:As_Of_Date><<AsOfDate>></wd:As_Of_Date> <wd:Organization_Name><<OrgName>></wd:Organization_Name> </wd:Organization_Find>
The <<AsOfDate>> and <<OrgName>> are locations where parameters are substituted when invoking the operation. All occurrences of <<ParamName>> in the request template are treated as parameters.
Keep the following in mind when writing request templates:
- Make sure to namespace every element and attribute correctly. All Workday elements and attributes are defined in the urn:com.workday/bsvc namespace.
- If you use a parameter multiple times in the request template, the connector replaces all occurrences with the same value.
- Parameter names are case-insensitive: <<ParamName>> and <<paramname>> refer to the same parameter.
- All parameters are required when invoking the operation. There is no way to specify optional parameters with CreateSOAPSchema.
- Parameters are treated as simple values that are XML encoded as needed. You cannot use parameters to insert new XML values. For example, WHERE SomeParam_Prompt = '<wd:element />' inserts the value <wd:element /> into the template.
Every unique parameter in the request template must have a corresponding parameter declaration, so the connector knows what type of value it is.
The parameter list is a comma-delimited list of colon-separated pairs.
Each pair contains the name of the paramter and the SQL type of the parameter.
The connector has type-specific rules for formatting DATE, TIME, TIMESTAMP and BOOLEAN values according to Workday requirements.
AsOfDate:date,OrgName:varchar
Now that we have the information needed for the connector to build a request, we can move on to configure response processing. In this example we want to treat each Organization ID as a row and read the text of that element, along with its type attribute. To get to that element, we have to traverse the followig path:
- Organization_References
- Organization_Reference
- Organization_ID_Reference
- ID
The following XPath tells the connector to perform that traversal.
It is our repeat element because we want each ID element to be its own row.
Organization_References/Organization_Reference/Organization_ID_Reference/ID
For the columns of the table, we want to expose the value of the ID element itself as well as its type attribute.
Columns are provided as a comma-delimited list of colon-separated values.
This is similar to parameters but each entry consists of a column name, column type, and XPath where the column name is found:
Organization_ID_Reference:varchar:/Organization_References/Organization_Reference/Organization_ID_Reference/ID, Organization_ID_Type:varchar:/Organization_References/Organization_Reference/Organization_ID_Reference/ID@type
Keep the following in mind when writing repeat elements and column declarations:
- Repeat element and column XPaths do not include namespaces. The connector ignores XML namespaces when processing responses, since all elements and attributes are part of the Workday namespace.
- The connector supports absolute XPaths that start with a slash, and relative XPaths that do not. The repeat element is always a relative XPath.
- Column XPaths may be relative or absolute. An absolute column path is treated as being directly under the response element. A relative column path is treated as starting under the repeat element.
- The last path element may contain an at (@) symbol followed by attribute name to read that attribute.
- You may want to expose a column that contains an element and all its attributes and content. The connector supports this using a special type called aggregate. The value of an aggregate columns is the targetted element rendered as XML text. Note that aggregate columns are not supported as parameters, only as response columns.
This is all the information we need to invoke the CreateSOAPSchema procedure and create a table:
EXEC CreateSOAPSchema TableName='FindOrg', Service='Human_Resources', RequestTemplate=' <wd:Organization_Find xmlns:wd="urn:com.workday/bsvc" wd:version="v44.1"> <wd:As_Of_Date><<AsOfDate>></wd:As_Of_Date> <wd:Organization_Name><<OrgName>></wd:Organization_Name> </wd:Organization_Find>', Parameters = 'AsOfDate:date,OrgName:varchar', RepeatElement = 'Organization_References/Organization_Reference/Organization_ID_Reference/ID', Columns = 'Organization_ID_Reference:string:/Organization_References/Organization_Reference/Organization_ID_Reference/ID,Organization_ID_Type:string:/Organization_References/Organization_Reference/Organization_ID_Reference/ID@type', WriteToFile = true
Using a Custom Table
The table can be queried once the stored procedure completes.
By default the table is saved to a file and can be queried on other connections with the same Location setting.
SELECT * FROM CustomTables.FindOrg WHERE AsOfDate_Prompt = '2025-11-01', OrgName_Prompt = 'Global Modern Services'
Input
| Name | Type | Description |
| TableName | String | The name of the table that will be generated to represent the results of the SOAP operation. This table acts as the queryable interface for the operation’s output. |
| Service | String | The name of the Workday SOAP service that defines the target operation, such as Human_Resources or Financial_Management. |
| RequestTemplate | String | The XML body of the SOAP request, containing placeholders for parameter values. These placeholders are marked using paired angle brackets and are replaced at runtime. |
| Parameters | String | A comma-delimited list of entries in the form 'name:type'. Each entry defines an input column in the generated table. Setting these input column values through a WHERE clause inserts them into the RequestTemplate before the request is made. |
| RepeatElement | String | The XPath expression that identifies the repeating element in the SOAP response. Each instance of this element becomes a row in the generated table, allowing structured tabular output. |
| Columns | String | A comma-delimited list of entries in the form 'name:type:xpath'. Each entry defines an output column in the generated table and maps it to a value extracted using the provided XPath. The XPath may be absolute (rooted at the SOAP Body element) or relative to the RepeatElement. |
| WriteToFile | String | Indicates whether the generated schema should be written directly to a file. If the value is 'false', the schema is returned through either FileStream or FileData. |
Result Set Columns
| Name | Type | Description |
| Result | String | Indicates whether the schema creation process completed successfully. |
| FileData | String | A Base64-encoded string containing the generated schema. Returned only when the value of WriteToFile is 'false' and no output stream is provided through FileStream. |