Show/Hide Toolbars

Therefore Web API Programming Interface 1.0

In case of an error on the server an error detailed information is returned in the response.

 

For SOAP protocol, the response contains SOAP Fault with WSFaultDetails in detail section. Please see sample below for more details.

For JSON formated messages, the response contains WSFaultDetails JSON data. Please see sample below for more details.

For XML formated messages, the response contains WSFaultDetails XML data. Please see sample below for more details.

 

If you get HTTP error code 400 (Bad request) this normally means that data in request is incorrect. In this case check ErrorSource, ErrorCode and ErrorMessage in WSFaultDetails.

 

WSFaultDetails:

 ErrorSource:

         0 or Unknow (ErrorCode is undefined),

         1 or API (ErrorCode contains API error code),

         2 or WebAPI (ErrorCode contains BusinessError = 0xA0000002L or SystemError = 0xA0000001L or NotSpecifiedError = 0),

         3 or Other (ErrorCode is undefined);

 ErrorId: for internal use;

 ErrorMessage: contains error message;

 

HTTP 500 (Internal Server Error) means that something has gone wrong on the server or a Web API method is improperly used.

Check Web API log files and Windows Event Log for more details (see Event Logging).

 

 

Response samples:

Sample server response for in JSON format as WSError

 

HTTP/1.1 500 Internal Server Error

Content-Length: 732

Content-Type: application/json; charset=utf-8

Server: Microsoft-HTTPAPI/2.0

Date: Fri, 27 Jan 2017 12:27:11 GMT

 

{

 "WSError": {

         "ErrorCode": -1073741704,

         "ErrorCodeHex": "0xC0000078",

         "ErrorCodeString": "ServerError",

         "ErrorId": "izNm0a9G1Ag=",

         "ErrorMessage": "The server reported an error.\u000d\u000aApplication: TheXMLServer\u000d\u000aUsername: SYSTEM\u000d\u000aStack:\u0009twdbcase.cpp line 99\u000d\u000a\u0009twrightsserver.cpp line 1584\u000d\u000a\u0009twrightsserver.cpp line 1597\u000d\u000a\u0009twclient.cpp line 8847\u000d\u000a\u0009twasconnection.cpp line 1455\u000d\u000a\u0009thecase.cpp line 45\u000d\u000aThereforeĆ¢ā€žĀ¢ Server error 106: No row was found. \u000d\u000a\u000d\u000aVersion: ThereforeĆ¢ā€žĀ¢ 2017 - Beta (15.0.0)\u000d\u000aAdditional information:\u000d\u000a\u0009CaseNo = 2147483647\u000d\u000a\u000d\u000a",

         "ErrorSource": 1

 }

}

 

Sample server response for in XML format as WSError

 

HTTP/1.1 400 Bad Request

Content-Length: 465

Content-Type: application/xml; charset=utf-8

Server: Microsoft-HTTPAPI/2.0

Date: Fri, 27 Jan 2017 12:24:28 GMT

 

<WSFaultDetails xmlns="http://schemas.therefore.net/webservices/interop/v0001/types" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

 <WSError>

         <ErrorCode>2684354562</ErrorCode>

         <ErrorCodeHex>0xA0000002</ErrorCodeHex>

         <ErrorCodeString>2684354562</ErrorCodeString>

         <ErrorId>zWQocK9G1Ag=</ErrorId>

         <ErrorMessage>Parameter of the web service operation cannot be null. Operation name: 'CloseCase'</ErrorMessage>

         <ErrorSource>WebAPI</ErrorSource>

 </WSError>

</WSFaultDetails>

 

Sample server response for in XML format as SOAP Fault

 

HTTP/1.1 500 Internal Server Error

Content-Length: 1089

Content-Type: text/xml; charset=utf-8

Server: Microsoft-HTTPAPI/2.0

WWW-Authenticate: oRswGaADCgEAoxIEEAEAAACj+4oUX29P6QAAAAA=

Date: Fri, 27 Jan 2017 12:29:05 GMT

 

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

 <s:Body>

         <s:Fault>

                 <faultcode>s:Client</faultcode>

                 <faultstring xml:lang="en-US">The server reported an error.&#xD;

Application: TheXMLServer&#xD;

Username: SYSTEM&#xD;

Stack:        twdbcase.cpp line 99&#xD;

Thereforeā„¢ Server error 106: No row was found. &#xD;

&#xD;

Version: Thereforeā„¢ 2017 - Beta (15.0.0)&#xD;

Additional information:&#xD;

 CaseNo = 2345&#xD;

&#xD;

.&#xD;

Error code: 0x-1073741704, Error name: ServerError.</faultstring>

                 <detail>

                         <WSFaultDetails xmlns="http://schemas.therefore.net/webservices/interop/v0001/types" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

                                 <WSError>

                                         <ErrorCode>-1073741704</ErrorCode>

                                         <ErrorCodeHex>0xC0000078</ErrorCodeHex>

                                         <ErrorCodeString>ServerError</ErrorCodeString>

                                         <ErrorId>lkSyFbBG1Ag=</ErrorId>

                                         <ErrorMessage i:nil="true"/>

                                         <ErrorSource>API</ErrorSource>

                                 </WSError>

                         </WSFaultDetails>

                 </detail>

         </s:Fault>

 </s:Body>

 

</s:Envelope>

 

 

 

 

 

 

 

Ā© 2024 Therefore Corporation, all rights reserved.