我正在尝试向 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>
确保您在
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>
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wd="urn:com.workday/bsvc">
<faultcode>SOAP-ENV:Client.validationError</faultcode>
<faultstring>Invalid request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
得到这个我已经完成了上述解决方案但不起作用