Error Handling

This chapter will outline how error messages are sent from Moria2 to the client service through the SOAP interface. For more information please refer to the Axis documentation regarding server-side exception handling.

The information below is currently valid for v2.1 (and later) of the SOAP interface. The v2.0 interface will use the more generic RemoteExceptions, where the actual faultcode (see below) will always be Server and the faultstring will include the Java exception cause.

SOAP Faults

The SOAP Fault message from Moria2 will be on the form shown below:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
	<SOAP-ENV:Body>
		<SOAP-ENV:Fault>
			<faultcode>Client</faultcode>
			<faultstring>AUTHORIZATION FAILED</faultstring>
		</SOAP-ENV:Fault>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
In this example, the faultcode element shows that this was caused by the client service. The faultstring, using a set of pre-defined error strings, shows that in this case the client service was not authorized to perform the requested SOAP operation.

These are the possible values and combinations for the faultcode and faultstring elements, with descriptions:

faultcodefaultstringServer-side Java ClassDescription
ClientAUTHENTICATION FAILEDno.feide.moria.servlet.soap.AuthenticationFailedExceptionThe user's credentials did not pass authentication.
ServerAUTHENTICATION UNAVAILABLEno.feide.moria.servlet.soap.AuthenticationUnavailableExceptionMoria2 was unable to reach the third-party (LDAP) server responsible for user authentication.
ClientAUTHORIZATION FAILEDno.feide.moria.servlet.soap.AuthorizationFailedExceptionAn operation was attempted, or parameters were used, that the client service was not authorized for.
ClientILLEGAL INPUTno.feide.moria.servlet.soap.IllegalInputExceptionAn operation was attempted, or parameters were used, that the client service was not authorized for.
ServerMORIA INTERNALno.feide.moria.servlet.soap.InternalExceptionAn unexpected internal error occured in Moria2.
ClientUNKNOWN TICKETno.feide.moria.servlet.soap.UnknownTicketExceptionThe ticket used by the client service in a SOAP operation was unknown to Moria2.

For more information on these exception classes please refer to the JavaDoc.