Search code examples
soapworkday-api

Workday Human Resources API - Invalid request service version


I'm trying to make an example GET request to the Get_Employee endpoint but I am receiving an "Invalid request service version" error.

I followed the WorkDay provided tutorial and it is still not working: https://community.workday.com/articles/6120?page=1.

This is the endpoint that I am hitting: https://services1.myworkday.com/ccx/service/MYTENANTNAME/Human_Resources/v32.1

I expected to receive an XML payload and am instead receiving the following error

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Body>
      <SOAP-ENV:Fault xmlns:wd="urn:com.workday/bsvc">
         <faultcode>SOAP-ENV:Client.validationError</faultcode>
         <faultstring>Invalid request service version</faultstring>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Solution

  • Make sure that the version that you're specifying in the first node within soapenv:Body is referencing the version that you're submitting the request to. In my example below, you'll see it as an attribute in the bsvc:Get_Change_Work_Contact_Information_Request node below:

       <soapenv:Header>
          <bsvc:Workday_Common_Header>
             <bsvc:Include_Reference_Descriptors_In_Response>false</bsvc:Include_Reference_Descriptors_In_Response>
          </bsvc:Workday_Common_Header>
       </soapenv:Header>
       <soapenv:Body>
          <bsvc:Get_Change_Work_Contact_Information_Request bsvc:version="v31.2">
             <bsvc:Request_References>
                <bsvc:Person_Reference>
                   <bsvc:ID bsvc:type="Employee_ID">139420</bsvc:ID>
                </bsvc:Person_Reference>
             </bsvc:Request_References>
          </bsvc:Get_Change_Work_Contact_Information_Request>
       </soapenv:Body>
    </soapenv:Envelope>