XProtect Mobile Server communication channel is used for sending commands to the server.
Each command contains ConnectionId and one or multiple Commands. Every command has Type, Name, Input parameters (plus output parameters, result and error string in response part).
XML Node description:
- unique GUID given from the server for every client connection (empty for the Connect command);
command sequence number;
- type of the command ā Request, Response, Processing. Every response contains same fields as request plus additional - output parameters, result and error string;
- name of the command.
- list of the input parameters;
- key/value pair (name-value attributes) for the parameter
- list of the output parameters;
- general request result ā OK or Error;
- general error string description;
Commands are made in such common way in order to write one and only parsing component, which to be easily extensible to support more/less needed input/output parameters. There is a commands separator (separator between different XMLs send on the link), which is two new lines (ā\r\n\r\nā). It should be possible for the client to send multiple commands before to retrieve any server response).
Each request is matched by a corresponding response:
Xprotect Mobile Server supports a mode in which a response may be received as a sequence of messages. This mode is controlled via ProcessingMessages input parameter of the Connect command. When enabled and a command execution takes time, intermediate messages will be send by the server:
Note that only the final message will be tagged
signaling end of transaction. Intermediate messages will be labeled
.
Like the rest,
messages will repeat the command
but will only contain
.
With these two attributes, processing messages can be uniquely matched to the corresponding instance of the request.