com.WebService.createHeader

Defines the header for the Web Service object.

Syntax

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

Usage

The createHeader() method creates a global header for the current Web Service object.

The Web Service header is defined by the first parameter. This will define SOAP headers exchanged by the client and server.

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

Important: Since Web Services headers are generally in Document Style, we recommend to set the encoded parameter to FALSE.

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).