Try OpenEdge Now
skip to main content
Error Handling
Using ABL Error Classes : Progress.Lang.SoapFaultError class
 

Progress.Lang.SoapFaultError class

This class wraps the ABL built-in SOAP-fault system object. The SOAP-fault object contains the information from a SOAP fault generated by a Web service call from an ABL application. Progress.Lang.SoapFaultError inherits from Progress.Lang.SysError and is a FINAL class.
SoapFaultError is a type of system error, and therefore you cannot instantiate the object with the NEW or DYNAMIC NEW function or create a user-defined class that inherits from it. The class constructors are reserved for system use only.
Properties and methods table describes the properties and methods inherited by this class. The following table describes the additional property of this class.
Table 11. SoapFaultError properties
Member
Description
SoapFault property
In traditional error handling, SOAP-fault information is available from the ERROR-OBJECT-DETAIL property of the ERROR-STATUS handle after a Web service call is invoked with the NO-ERROR option. In structured error handling, you can access the same information using a CATCH statement for the Progress.Lang.SoapFaultError object. The SoapFault property in this object contains the handle to the SOAP-fault object. The Soap-Fault-Detail property of the system handle provides the full detail about the original SOAP fault.
See the chapter on error handling in OpenEdge Development: Web Services for more detailed information on handling SOAP faults.
Caution: Like other error objects, objects of SoapFaultError type can be thrown from an AppServer to an ABL client. However, the handle-based object that the SoapFault property points to is not recreated during the deserialization of the SoapFaultError object. For more information on serialization rules for class-based objects, see Throwing class-based error objects from an AppServer to an ABL client.
A CATCH block that references this type handles all SoapFaultError objects. Since SoapFaultError is a subclass of SysError, you may need two CATCH blocks to handle both general errors and SOAP faults. If this is the case, the more specific error type must come before the general type, as shown in the example below. The AVM executes the first compatible CATCH block it encounters.
DO ON ERROR UNDO, THROW:
  .
  .
  .
  CATCH anySoapFaultErrorObject AS Progress.Lang.SoapFaultError:
    .
    .
    .
  END CATCH.
  CATCH anySystemErrorObject AS Progress.Lang.SysError:
    .
    .
    .
  END CATCH.
END. /* DO */