tree: 9b6d653dfccd9e6d900f9647c6d3cbdb79c9d388 [path history] [tgz]
  1. bundle/
  2. functional-test/
  3. pom.xml
  4. README.MD
examples/osgi-http-service/README.MD

OSGi HttpService Example

This example demonstrates how to develop a simple OSGi bundle registering a Jersey based RESTful web service as an OSGi HttpService

Contents

The example bundle (see the bundle module) consists of just one Jersey resource:

org.glassfish.jersey.examples.osgihttpservice.StatusResource

that produces a textual response to an HTTP GET

The mapping of the URI path space is presented in the following table:

URI pathResource classHTTP method
/statusStatusResourceGET

Running the Example

To run the example, you would need to build the OSGi bundle in the bundle module and install it to an OSGi runtime (e.g. Apache Felix) together with other OSGi bundles. Look at the attached functional-test module for details on the programatical runtime configuration

To build the bundle jar file and run the tests, you can just launch

mvn clean install