GetMessage method: IntBroker class

Syntax

GetMessage([TransactionId, DataType])

Description

Use the GetMessage method to return a message object.

If you specify a transaction ID and data type, the GetMessage method populates the message object with the data from that message.

If you do not specify any parameters, the GetMessage method doesn't populate the message with data. Instead, it creates a new instance of a message object. In this case, you must use another method, such as GetRowset, to populate the message object. You must always populate the message object with data before running any methods on it.

Parameters

Parameter Description

TransactionId

Specify the transaction ID for the message that you want returned.

DataType

Specify the type of message that you want returned. The valid values are:

Constant Value Description

%IntBroker_BRK

Get the message for the web services gateway.

%IntBroker_PUB

Get the message for the publication contract.

%IntBroker_SUB

Get the message for the subscription contract.

Returns

A reference to a message object if successful, Null if not successful.

Example

The following example returns a populated message object:

Local Message &MSG;
Local string &TransactionId;

&TransactionId = "0f3617dl-c6f4-11d9-a4bd-c12cbalbc2f9"
&MSG = %IntBroker.GetMessage(&TransactionId, %IntBroker_BRK);