Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awGet | awGet<type>Field
 
awGet<type>Field
Functions such as awGetBooleanField and awGetShortField have the following general syntax:
BrokerError awGet<type>Field(
BrokerEvent event,
char *field_name,
<Field_value_type> value);
event
The event whose field is to be returned.
field_name
The name of the field to be returned. Note that field_name can directly identify any field in the event, no matter how deeply nested that field may be.
value
The value associated with the field that is output from this function.
The following functions are provided to return the value associated with a specific field type.
Function Name
Field Value Type
awGetBooleanField
BrokerBoolean *
awGetByteField
char *
awGetCharField
char *
awGetDateField
BrokerDate *
awGetDoubleField
double *
awGetFloatField
float *
awGetIntegerField
int *
awGetLongField
BrokerLong *
Note:
Available only on platforms which support 64-bit integral representations.
awGetLongFieldNative
NativeLong *
awGetShortField
short *
awGetStringField
char **
Note:
The caller is responsible for calling free on the value.
awGetUCCharField
charUC *
awGetUCStringField
charUC **b
See Specifying Field Names for complete information on specifying field_name.
If you get a field whose value was not set by the event's publisher, the field will contain one of the following default values:
*Boolean values will have a value of 0 (false).
*Integral data types (such as int, long, and short) will have a value of zero.
*Floating point types will have a value of 0.0.
*String types will have a contain a zero-length string.
*BrokerDate types will be empty. See awNewEmptyBrokerDate for more information.
Note:
When awGetStringField is used to obtain the value of a field whose type is FIELD_TYPE_UNICODE_STRING, the value returned will automatically be converted to an ANSI string.
Possible BrokerError major codes
Meaning
AW_ERROR_FIELD_NOT_FOUND
The event is associated with a Broker client and field_name does not exist in the event or an attempt was made to obtain the value of an envelope field that has not been set.
AW_ERROR_FIELD_TYPE_MISMATCH
The field's type does not match the type of value or the field_name incorrectly accesses a type.
AW_ERROR_INVALID_EVENT
The event is invalid.
AW_ERROR_INVALID_FIELD_NAME
The field_name is invalid.
AW_ERROR_NULL_PARAM
The parameter field_name or value is NULL.
See also: