com.WebService.createFault

Creates a new object to implement a Web Service.

Syntax

createFault(
   fault fault-type,
   encoded BOOLEAN )
  1. fault defines the header for the Web Service object.
  2. fault-type is a simple data type, a RECORD or an ARRAY.
  3. encoded specifies the encoding mechanism.

Usage

The createFault() method creates a global fault for this Web Service object.

The fault parameter can be of any type and defines the SOAP fault in a SOAP response. In case of SOAP fault, the client for this Web Service will receive a variable with the same structure.

When encoded is TRUE, the SOAP Section 5 encoding mechanism is used, when FALSE, the XML Schema mechanism is used.

In case of error, the method throws an exception and sets the STATUS variable. Depending on the error, a human-readable description of the problem is available in the SQLCA.SQLERRM register. See Error handling in GWS calls (STATUS).