1

我正在尝试向 Get_Employee 端点发出示例 GET 请求,但我收到“无效请求服务版本”错误。

我按照 WorkDay 提供的教程进行操作,但仍然无法正常工作:https ://community.workday.com/articles/6120?page=1 。

这是我要达到的端点:https ://services1.myworkday.com/ccx/service/MYTENANTNAME/Human_Resources/v32.1

我希望收到 XML 有效负载,但收到以下错误

<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>
4

1 回答 1

4

确保您在其中的第一个节点中指定soapenv:Body的版本引用了您将请求提交到的版本。在下面的示例中,您将在bsvc:Get_Change_Work_Contact_Information_Request下面的节点中将其视为一个属性:

   <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>
于 2019-05-20T19:07:48.667 回答