wiki:RepQuickStart

REP deployment Quick Start

Table of Contents

  1. Software requirements
  2. Download the REP source code
  3. Compile and Run the REP
  4. Test the REP
  5. REST client tools

Software requirements

To build and run the REP example code you need to meet following requirements:

Download the REP source code

  • REP example code: eclipse project 'JavaREP' which can be found as an attachment on the bottom of this page

Compile and Run the REP

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:

  1. run uk.ac.surrey.sensei.rep.REPTest.java

If everything went well the REST server should be listening on HTTP port 8188.

Test the REP

The REP can now be tested with a suitable REST client. To request a value from a dummy light sensor reading from the file xml/sensors/light.rdf use a REST GET method call on http://localhost:8188/rep/s/light

The response is the Observation and Measurement value in XML-RDF syntax, which is returned in the Response body.

The example REP also offers value from a dummy temperature sensor reading from the file xml/sensors/temp.rdf

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:

Last modified 13 years ago Last modified on Oct 21, 2010, 2:11:31 PM

Attachments (7)

Download all attachments as: .zip