= REP deployment Quick Start = == Software requirements == To build and run the REP example code you need to meet following requirements: * Java 6.0 SDK http://java.sun.com/javase/downloads/index.jsp * eclipse http://eclipse.org/downloads/ * Java REST framework 'restlet' by http://www.restlet.org/ * REP example code: eclipse project 'JavaREP' which can be found as an attachment on the bottom of this page == run the Example REP Project == In order to run the code samples please follow the steps below: 1. extract the zip archive and import the eclipse project into your eclipse workspace 2. fix missing class path errors (add the restlet libraries 'org.restlet.jar' and 'org.restlet.ext.xml.jar' to the project classpath 3. after that the project structure should look like this: [[Image(projectStructure.png)]] 4. run uk.ac.surrey.sensei.rep.REPTest.java [[Image(runTest.png)]] The REPTest class provides a couple of test cases. Please uncomment the sections you want to have tested. By default REPTest.java creates a REP listening on HTTP port 8185. It attaches a RAIHandler of type SensorType for a dummy light sensor. The hard coded light value is read from the file xml/sensors/light.rdf. It can be requested by a REST GET method call on http://localhost:8185/rep/s/light. The response is the Observation and Measurement value in XML-RDF syntax. {{{ ]> }}} == REST client tools == GET and POST requests can be easily tested by using a web browser. For testing other REST methods like PUT, DELETE, and OPTIONS dedicated REST client tools are available, like: * RESTClient: plug-in for Firefox: https://addons.mozilla.org/en-US/firefox/addon/9780 * Java GUI tool: http://code.google.com/p/rest-client/ * soapUI: http://www.soapui.org/userguide/rest/index.html