
|
Java |
The following errors can be handled by SAPNetWeaver Process Integration:
Error handling is essentially of interest in the synchronous case. In this case, an application can report application errors to the caller application. In the asynchronous case, you can catch an error that has occurred during transfer and, on the inbound side, forward an error to monitoring.
Handling System Errors
SystemFaultException
com.sap.aii.proxy.xiruntime.core.SystemFaultException
Handling Application Errors in Java
In the Enterprise Services Repository, you can define fault messages to handle application errors. The proxy generation functions then generate exception classes. Using fault messages, you can handle errors triggered by the called application:
| Message Interface | Error Handling Options |
|---|---|
|
Synchronous Communication (Inbound/Outbound) |
An exception is triggered at the receiver that is providing a service; the exception is handled by the sender that called the service. |
|
Asynchronous Inbound Interface |
Error handling is only possible using acknowledgements . The sender must request an acknowledgement message of type ApplicationError. If the application on the receiver side triggers an exception of type ApplicationFaultException, the Java proxy runtime sends a negative application acknowledgement to the receiver that contains the fault message. |
Exception classes for application errors are derived from the basis exception class ApplicationFaultException. You can use this exception class to determine an error situation, independently of the exact error, or in an else branch, you can use it to catch all the errors that have not yet been handled.
com.sap.aii.proxy.xiruntime.core.ApplicationFaultException
More information: Reporting and Handling Errors