SAP Knowledge Base Article - Public

2494349 - System error 500 on onboarding API-Onboarding

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-envelopexmlns:xsi="http://www.w3.org/2001/XMLSchema-instancexmlns:xsd="http://www.w3.org/2001/XMLSchema">    <soap:Body>        <PostNewhireRecordResponse xmlns="http://ATS.online-onboarding.com/Client/HRDataServiceEx">            <PostNewhireRecordResult>&lt;PostNewhireRecordResult&gt;&lt;NewhireId&gt;00000000-0000-0000-0000-000000000000&lt;/NewhireId&gt;&lt;Errors&gt;&lt;Error&gt;&lt;ErrorCode&gt;500&lt;/ErrorCode&gt;&lt;ErrorDescription&gt;'xsl:when' must precede the 'xsl:otherwise' element.&lt;/ErrorDescription&gt;&lt;/Error&gt;&lt;/Errors&gt;&lt;/PostNewhireRecordResult&gt;</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
, KBA , LOD-SF-OBD-API , Webservices & API's , Problem

Product

SAP SuccessFactors HCM Core 1705