
Since the Web page cannot be permanently connected, a timer is started to poll messages from the server. The J# connector is constantly listening for messages and accumulated them in a queue. When the mobile client connects to the webserver, via the GET method of XMLHTTP, a J# ASP.NET page connects to the J# Remote object, downloads the message queue and then sends it to the mobile client. This message queue takes the form of an XML document.
In order to send messages, the mobile client assembles an XML message and then sends this information to the webserver using the POST method. The web server receives this XML and then forwards it to the Remote object which in turns sends it to the Virtual Classroom Server
An example of the XML message set is shown below:
<?xml
version="1.0" encoding="ISO-8859-1" ?>
<MsgList>
<Msg>
<Item><Key>MsgID</Key><Value>2</Value></Item>
<Item><Key>IsAudio</Key><Value>false</Value></Item>
<Item><Key>Color</Key><Value>0</Value></Item>
<Item><Key>FromName</Key><Value>any</Value></Item>
<Item><Key>Text</Key><Value>Hi there</Value></Item>
</Msg>
<Msg>
<Item><Key>MsgID</Key><Value>2</Value></Item>
<Item><Key>IsAudio</Key><Value>false</Value></Item>
<Item><Key>Color</Key><Value>0</Value></Item>
<Item><Key>FromName</Key><Value>any</Value></Item>
<Item><Key>Text</Key><Value>The J# version works great!</Value></Item>
</Msg>
</MsgList>
|