Server Protocol |
|
The Room Status Interface (RSI) server protocol uses XML sent via the HTML POST method.
HTTP HeadersIn addition to the standard Content-type and Content-Length fields, the server sends the field User-Agent, which specifies both the DV2000/DV4 version number and the ISI version number (as a three-digit number). See the example POST packet below.
Document RootThe document root is defined as room_status, and may contain one or more room elements. See the Example POST Packet section, below, for an example of how this element is composed.
Room ElementThe room element contains the information being updated for a given room. Depending on configuration, more than one room element may be contained in a single POST. See the Example POST Packet section, below, for an example of how this element is composed. The following table lists the possible attributes for a room element.
User ElementA room element will contain a single user element which specifies the user who generated the posting. The user's first and last name, if specified, will be included as separate elements within the user element and will be denoted as fname and lname, respectively. See the Example POST Packet section, below, for an example of how this element is composed. The following table lists the possible attributes for a user element.
Example POST PacketThe following is an example POST packet demonstrating all possible elements and attributes previously described:
POST / HTTP/1.0 Content-type: text/xml User-Agent: DuVoice/4.01.028 RSI/100 Content-Length: length
<?xml version="1.0" encoding="ISO-8859-1"?> <room_status> <room number="1003" date="20100422" time="09:41:12" status="1" sequence="7"> <user id="225"> <fname>Jack</fname> <lname>Smith</lname> </user> </room> </room_status> </xml>
The following is an example response to the above POST packet:
HTTP/1.1 200 OK Content-type: text/xml Content-Length: length
<?xml version="1.0" encoding="ISO-8859-1"?> <room_status> <room number="1003" sequence="7" result="0"/> </room_status> </xml>
|