Symptom
- 500 error in Onboarding API.
Environment
- Applicable To All DataCenters.
- API
- Onboarding
Cause
- When posting a record thorugh postnewhirerecordAPI,below is response obtained:
"<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <PostNewhireRecordResponse xmlns="http://ATS.online-onboarding.com/Client/HRDataServiceEx"> <PostNewhireRecordResult><PostNewhireRecordResult><NewhireId>00000000-0000-0000-0000-000000000000</NewhireId><Errors><Error><ErrorCode>500</ErrorCode><ErrorDescription>'xsl:when' must precede the 'xsl:otherwise' element.</ErrorDescription></Error></Errors></PostNewhireRecordResult></PostNewhireRecordResult> </PostNewhireRecordResponse> </soap:Body></soap:Envelope>"
Resolution
- If there is 500 error in response,then issue is with respect HRXML.Newimportfile.xslt.
- In this example,<xsl:choose> element is not closed properly in xslt file.
- If code in xslt file is not maintained properly,then 500 error will occur when you are posting records.
- You can use below debugging method to find correct format of xslt file:
http://www.utilities-online.info/xsltransformation
Keywords
- API
- REST API
- Onboarding
- SOAP API