The callback handler method is used with an asynchronous method call
to retrieve the information requested by the call. The asynchronous call initiates
the callback handler and then returns a TransactionID
.
This ID is used to map the asynchronous call to the correct callback handler
instance and the result information it returns. You can call the result handler
method from within the callback handler.
Define a callback handler method for any Service API method that is called asynchronously. Use the following method signature:
callback(transId, eventCode, result)
The system supplies the expected arguments:
Argument |
Description |
Value |
---|---|---|
|
This is a number representing the transaction that called the callback handler.
|
|
|
This is a number representing the callback return status. |
Value - Description:
|
|
This is an object for holding the callback return value. |
See the following table. |
The callback handler returns an object that contains the requested information, an error code, and an error message:
Property |
Description |
Value |
---|---|---|
|
This contains the information requested by the asynchronous call that initiated the callback handler. If an asynchronous call does not request any information to be returned,
this property is not included in the callback return value. In this case,
the callback handler only returns |
Depends on the Service API and the asynchronous method that was called. Not all calls return this property. See the appropriate method definition. |
|
This is a number that specifies a predefined error code. |
|
|
This is a text string that describes the error. |
Depends on the Service API and the asynchronous method that was called. See the appropriate method definition. |