OW2 Consortium mobiot


Rev 2 | Blame | Compare with Previous | Last modification | View Log | RSS feed


The PhoneServicesProxy web app is work-around to allow REST access to mobile devices that are connected to the internet using 3g mobile networks. This is due to a number of issues that 3g networks introduce , such as the use of NAT, transient IP addesses, enforcement of asymmetrical communication and temporary disconnections. 

Mobile devices retrieve, in a pull-based fashion, client requests that have 
been issued towards them via the proxy, and in turn send replies to these requests in order for them to be forwarded to the respective clients.

Available methods:
1. Get all pending requests for a device:                                       [GET] http://{proxyURL}/pendingrequests/{deviceID}
        -> Responds with a JSON array
2. Request a value from a service on a specified device:        [GET]: http://{proxyURL}/{deviceID}/{serviceName}
        -> Responds with the response from the service
3. Posts a response to the proxy from the device:                       [POST] http://{proxyURL}/{deviceID}/{serviceName}
        -> Includes in body the sensed values from the mobile device
4. Start the onboard Websocket server:                                          [GET] http://{proxyURL}/startws
5. Stop the onboard Websocket server:                                           [GET] http://{proxyURL}/stopws
6. Check the status of the onboard Websocket server:            [GET] http://{proxyURL}/statusws

Deploy it on a Tomcat server.

1. Jettison <org.codehaus.jettison> http://jettison.codehaus.org/
2. Apache HttpClient <commons-httpclient> http://hc.apache.org/httpclient-3.x/
3. Apache HttpCompoenents <org.apache.httpcomponents> https://hc.apache.org/
4. Jersey <com.sun.jersey> https://jersey.java.net/
5. JSONsimple <org.json.simple> https://code.google.com/p/json-simple/
6. JavaWebsocket <org.java_websocket> http://java-websocket.org/

Generated by GNU Enscript