-
Notifications
You must be signed in to change notification settings - Fork 12
WebConnector: REST Mapping
This page refers to las2peer versions older than 0.6.1!
The WebConnector uses the REST Mapper to map service method to a REST API. As a service developer you have to do the following steps:
- Inherit from the
RESTService
class instead from theService
class - Annotate your service using annotations
Services are identified by the first path segment. That means, services paths cannot share a common path prefix. Also, a @Path
annotation at class level is now required.
All service methods are available at paths beginning with /service/...
. In this case, any service version can be called (probably a newer one). You can also specify a version using /service/v{serviceIdentifier}/...
, where {serviceIdentifier}
is replaced by a version as described here.
Also, the version determined using the same algorithm used for remote method invocations. That means that you should specify the version so that all service versions provide the same REST API. To make this manageable, we encourage every service to use semantic versioning.