com.WebService.createHeader

Defines the header for the Web Service object.

Syntax

createHeader(
   header RECORD,
   encoded INTEGER )
  1. header defines the header for the Web Service object.
  2. encoded defines an integer value specifying 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 the parameter encoded is true (1), the SOAP Section 5 encoding mechanism is used. False (0) indicates the XML Schema mechanism.

Important:

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

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