MPS Communication
Information exchange between the Client and Server
The communication between the mobile client and the server are done by exchanging XML documents over the HTTP protocol. I divided the XML documents into
Requests
Request documents are defined by the following DTD:
<!DOCTYPE root [
<!ELEMENT root (type , validationData , requestBody)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT validationData (user , password)>
<!ELEMENT user (#PCDATA)>
<!ELEMENT password (#PCDATA)>
<!ELEMENT requestBody (comment | post)>
<!ELEMENT comment (postid , content , user)>
<!ELEMENT postid (#PCDATA)>
<!ELEMENT content (#PCDATA)>
<!ELEMENT post (id , title , body , isGlobal , user , location?)>
<!ELEMENT id (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT body (#PCDATA)>
<!ELEMENT isGlobal (#PCDATA)>
<!ELEMENT location (cellid , lat , lon)>
<!ELEMENT cellid (#PCDATA)>
<!ELEMENT lat (#PCDATA)>
<!ELEMENT lon (#PCDATA)>
]>
The type of the document differs depending on the operation that has to be done. The following types are allowed:
XML responses from the server to the client are defined by the following DTD:
<!DOCTYPE root [
<!ELEMENT root (type , responseBody)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT responseBody (post+ | (level, message))>
<!ELEMENT post (id , title , body , isGlobal , creationDate , expiryDate , user , comments*)>
<!ELEMENT id (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT body (#PCDATA)>
<!ELEMENT isGlobal (#PCDATA)>
<!ELEMENT creationDate (#PCDATA)>
<!ELEMENT expiryDate (#PCDATA)>
<!ELEMENT user (#PCDATA)>
<!ELEMENT comments (comment)*>
<!ELEMENT comment (id , content , user)>
<!ELEMENT content (#PCDATA)>
<!ELEMENT level (#PCDATA)>
<!ELEMENT message (#PCDATA)>
]>
XML responses from the server can have the following types:
Comments (0)
You don't have permission to comment on this page.