@Produces( MediaType.APPLICATION_JSON )
public Response getServiceDefinition( @Context UriInfo uriInfo )
{
Mode serverMode = Mode.EMBEDDED;
String entity = JsonRenderers.DEFAULT.render( new ServerRootRepresentation(
uriInfo.getBaseUri(), serverMode ) );
return addHeaders(
Response.ok( entity, JsonRenderers.DEFAULT.getMediaType() ) ).build();
}