2.2 Message Syntax

Messages outside the Groove RDB Commands Protocol MUST be ignored. The Groove RDB Commands Protocol uses XML to encode its messages. The following specifies how data types for RDB messages are encoded as XML attributes:

Type

Encoding

String

A Unicode string

Int

An Int attribute MUST be a decimal string representation of an integer in the range -2147483648 to 2147483647.

Double

A Double attribute MUST be a decimal string representation of a floating point number that is representable without loss of information as a double-format floating point number as specified in [IEEE754].

ID

An ID attribute represents a unique identifier for a Record, record definition, or Table Definition. An ID is encoded identically to a Double, with the additional constraint that it MUST NOT have a value of -1, or be of any form of infinite number, NaN, -0, or denormalized number as specified in [IEEE754].

Timestamp

A Timestamp represents the number of milliseconds elapsed between 12:00 Midnight January 1, 1970 GMT and the moment in time represented by the timestamp. A Timestamp attribute is encoded identically to a Double attribute.

Each message is XML that MUST consist of an element with the name "urn:groove.net:Cmd". This is the command element created by the Groove Dynamics Protocol, as specified in [MS-GRVDYNM] section 2.2.1.4.4. This element has a series of attributes maintained by the Groove Dynamics Protocol. In addition, all RDB command elements MUST have the following attribute:

DBName (String): The name of the database being modified by the execution of the command.

Each RDB message SHOULD contain the following attribute on the command element:

TableDefID (Double): The identifier of a table in the database. This is the table being modified by the execution of the command. The value of the identifier follows the restrictions for the ID type (specified earlier in this section), with the exception that -1 is a valid value <1>. If the value of this attribute is -1, the record MUST be applied to all tables in the repository.

Wherever messages encode fields as XML, the XML representation for each of the supported field data types is as follows. The fields are represented by XML attributes for all but the XML element type, which uses a content element. Fields within a record, and the fields described in a Set Field message, conform to one of the following field types:

Field Type

Encoding

String

Encoded as String.

Boolean

Encoded as String, with "0" indicating False and "1" indicating True.

Four Byte Signed Integer

Encoded as Int.

Double

Encoded as Double.

Binary

Encoded as String, with binary content Base64 encoded, as defined in [RFC4648].

Date/Time

Encoded as Timestamp.

XML element

Encoded as XML as follows:

A content element MUST be appended to either a serialized record for Add Record and Add Records messages, or to the command element for Set Field messages. For Add Record and Add Records messages the name of the content element MUST match the name of the field.