Exeption handling: Difference between revisions

From services.krediidiinfo.ee
Jump to navigation Jump to search
(Created page with "= SOAP fault element= If the server encounters an exception during request processing, the Krediidiinfo SOAP server will always return a SOAP fault element ([http://www.w3scho...")
 
No edit summary
Line 1: Line 1:
{| align="right"
| [[Image:Flag of Estonia.svg|border|30px]] [[Main_Page|eesti keeles]]
|}
= SOAP fault element=
= SOAP fault element=
If the server encounters an exception during request processing, the Krediidiinfo SOAP server will always return a SOAP fault element ([http://www.w3schools.com/soap/soap_fault.asp|SOAP Fault Element]).
If the server encounters an exception during request processing, the Krediidiinfo SOAP server will always return a SOAP fault element ([http://www.w3schools.com/soap/soap_fault.asp|SOAP Fault Element]).

Revision as of 10:38, 13 June 2013

Flag of Estonia.svg eesti keeles

SOAP fault element

If the server encounters an exception during request processing, the Krediidiinfo SOAP server will always return a SOAP fault element (Fault Element).


Example of a SOAP fault element:

<?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>SOAP-ENV:Server</faultcode>
			<faultstring>certificate not found</faultstring>
			<faultactor/>
			<detail>
				<errorcode>-10011</errorcode>
				<line_no>33</line_no>
			</detail>
		</SOAP-ENV:Fault>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Reporting exceptions to the user

The tag faultstring contains a user-friendly error message, while the tag detail/errorcode contains the error code.

If the SOAP fault element contains a detail/errorcode, the exception occurred in the Krediidiinfo server. If there is no detail/errorcode, the exception is usually unrelated to the Krediidiinfo server.

If SOAP fault element is sent by the Krediidiinfo server, the end user must always be displayed both the error code (errorcode) as well as the fault element (faultstring)!

It is recommended that the message be displayed as follows:

Krediidiinfo AS web service (<name>) request failed!
[errorcode] faultstring 
For assistance, please contact Krediidiinfo: (372) 6659 600.

<name> to be replaced with the name of web service (KiDocExchange, KiReport, etc). Generally the reasons for such errors can be resolved by Krediidiinfo (e.g. if the user does not have the authorisation to make a certain request, etc.).