SOAP faults with traditional error handling
- Last Updated: June 2, 2021
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
When the Web service returns a SOAP fault, OpenEdge responds depending on how the request
is coded. As with ABL errors, if you do not specify the NO-ERROR option on
a RUN statement that invokes a Web service operation or if the operation is
invoked using a user-defined function, OpenEdge converts the SOAP fault into a standard ABL
error message displayed as follows:

The error box displays the operation that generated the SOAP fault and the contents of the
<faultstring> element in the SOAP fault message.
If the statement that invokes a Web service operation traps an error using the
NO-ERROR option, this message and the information for any SOAP fault
detail appears in the ERROR-STATUS system handle, and as with all ABL
errors remains available until the next statement is invoked using the
NO-ERROR option. The following table lists the
ERROR-STATUS handle attribute that help you to detect and return the
information for a SOAP fault. All other attributes and methods on this handle work as they
do for any ABL error condition.
| Attribute | Type | Description |
|---|---|---|
ERROR
|
LOGICAL
|
Indicates that an ERROR condition was returned as
a result of processing a Web service request |
ERROR-OBJECT-DETAIL
|
HANDLE
|
References the SOAP-fault object for any Web service request that
returns a SOAP fault trapped using ABL NO-ERROR option |
Once you have detected an error (ERROR-STATUS:ERROR=TRUE), you can
determine if it is the result of a SOAP fault using the ERROR-OBJECT-DETAIL
attribute. If a SOAP fault caused the error, this attribute returns a handle to a SOAP-fault
object containing the SOAP fault information. Otherwise, it has the Unknown value
(?).
Note that Web service operations that are invoked as user-defined functions do not
raise the ERROR condition. For a SOAP fault resulting from an
operation invoked as a user-defined function, ERROR-STATUS:ERROR is
FALSE. But, in this case, ERROR-STATUS:NUM-MESSAGES is
greater than zero.