...
In this example, Relationship and RelationshipType already exists in the OpenMRS data model, and there are resources for them in the webservices.rest module: RelationshipResource1_8, RelationShipTypeResource1RelationshipTypeResource1_8.
If you are developing a new kind of data, you will need to create a Java and REST API (which is not covered here).
...