Exceptions in REST Processing

An exception that occurs during the execution of a JadeRestService method results in a Fault object being returned formatted in the style specified in the URL. When the output format is:

The following example displays the JSON XML that is returned if exception 1035 (String too long) is raised.

<?xml version="1.0" encoding="UTF-8"?>
<Fault>
    <errorCode>1035</errorCode>
    <errorItem>NormalException</errorItem>
    <errorText>String too long</errorText>
</Fault>

The XML style is required because JSON does not identify the name of the entity being returned.

There are a number of exceptions that are specific to the processing of a REST request. The following example displays the XML that is returned if the JSON request contains the wrong number of parameters; in this example, two primitive parameters were supplied instead of one.

<?xml version="1.0" encoding="UTF-8"?>
<Fault>
    <errorCode>11106</errorCode>
    <errorItem>The signature of Method 'RestService::getClient' does not match
               the url data provided: (2) primitive parameters.</errorItem>
    <errorText>The signature of the called Rest Services method does not match
               the supplied url entities</errorText>
</Fault>

For more details about the exceptions that are specific to JADE REST requests, see "11100 Through 11199 - JADE Rest Service Errors", in the JADE Error Messages and System Messages document.