| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

MPS_XML

This version was saved 16 years, 7 months ago View current version     Page history
Saved by Juri Strumpflohner
on September 13, 2007 at 9:21:16 pm
 

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
  • XML strings from the mobile client to the server (Requests)
  • XML strings from the server to the client (Responses)

 


 

Requests

An XML request has an element type, which is used on the server-side to identify which kind of information is needed by the mobile client.

Currently the following types are used:

  • commit:post

    Used to indicate that the XML document contains posts which have to be stored to the DB

  • retrieve:post

    Used to indicate that the client wants to retrieve posts stored in the DB

 

Type: "commit:post"

<!DOCTYPE root [

    <!ELEMENT root (type , validationData , requestBody)>

    <!ELEMENT type (#PCDATA)>

    <!ELEMENT validationData (user , password)>

    <!ELEMENT user (#PCDATA)>

    <!ELEMENT password (#PCDATA)>

    <!ELEMENT requestBody (post)>

    <!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)>

]>

 

Type: "retrieve:post"

The parameter can be
  • "all": for retrieving all posts from the server
  • "location:cellid": for retrieving all posts that match the current location of the mobile phone
  • "search": for searching for posts on the server that match the specified query
 
<!DOCTYPE root [

    <!ELEMENT root (type , validationData , requestBody)>

    <!ELEMENT type (#PCDATA)>

    <!ELEMENT validationData (user , password)>

    <!ELEMENT user (#PCDATA)>

    <!ELEMENT password (#PCDATA)>

    <!ELEMENT requestBody (requestParam , includeGlobal? , beginData , dataAmount , searchQuery? , location?)>

    <!ELEMENT requestParam (#PCDATA)>

    <!ELEMENT includeGlobal (#PCDATA)>

    <!ELEMENT beginData (#PCDATA)>

    <!ELEMENT dataAmount (#PCDATA)>

    <!ELEMENT searchQuery (#PCDATA)>

    <!ELEMENT location (cellid)>

    <!ELEMENT cellid (#PCDATA)>

]>

 

 

Responses

XML responses from the server can have the following types:
  •  
  • alert
  • data:post

    For indicating that a list of posts can be transmitted to the client

     

 

Type: "alert"

<!DOCTYPE root [

    <!ELEMENT root (type , responseBody)>

    <!ELEMENT type (#PCDATA)>

    <!ELEMENT responseBody (level , message)>

    <!ELEMENT level (#PCDATA)>

    <!ELEMENT message (#PCDATA)>

]>

 

Type: "data:post"

 

<!DOCTYPE root [

    <!ELEMENT root (type , responseBody)>

    <!ELEMENT type (#PCDATA)>

    <!ELEMENT responseBody (post+)>

    <!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)>

]>

Comments (0)

You don't have permission to comment on this page.