Troubleshooting

SOAP APIs

Exceptions within WCA web service operations are returned to the client as SOAP fault messages with an HTTP status code of 500. The following briefly describes the three types of errors and how they are handled.

Client Exceptions

Client exceptions are those exceptions (or errors) made by the client that cause the operation to fail. They are distinguished from server exceptions in that the client can change the inputs to be correct and the operation is then successful (the cause of the error(s) is usually related to business rules.) For example, if the client is calling an insert employee method and is missing data, then a message detailing what data is missing is returned. If the client then sends the needed information, the operation is successful. Any details about the error(s) is returned in the MbiExceptions element of the SOAP fault detail section.


<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>An exception has occurred, please view details for more information.</faultstring>
<faultactor>http://localhost/MBIWebServices/Card/Card.asmx</faultactor>
<detail>
<MbiExceptions xmlns="http://tempuri.org/">
<MbiException>
<Code>10002</Code>
<Message>
The record you are trying to update does not exist. It may have been deleted by another user.
</Message>
</MbiException>
</MbiExceptions>
</detail>
</soap:Fault>

Server Exceptions

Server exceptions are exceptions unrelated to business rules and may be caused by the client’s code depending on the nature of the problem. For example, if the client sends an incorrectly formatted SOAP message, a SOAP fault code of type server is returned. In this case, the client’s code should be changed and the request could be successfully re-submitted. Another example of a server code type exception is if the WCA server hosting the web service had an internal error. In this case, the client cannot fix the problem and Alegeus should be notified.

Warnings

There are times in which the client may need more information about the results that are returned from a WCA web service than can be provided by a normal method. For example, if the client calls a search method that returns more records from the system than WCA allows to be sent to a client (300 records for example, but in this case only 100 records are allowed) WCA sends back the first 100 records and includes a message informing the client that the query returned too many results and that they should resubmit the query with different parameters. To relay these messages to the client, a WCA warnings SOAP header is used as shown below.


<MbiWarnings>
<MbiWarning>
<Code>10002</Code>
<Message>
The query returned too many records. Please resubmit the query with different parmeters.
</Message>
</MbiWarning></MbiWarnings>