im trying to implement an spring android client for a Hypermedia API with responses in HAL format. The Spring HATEOAS - Reference Documentation described the implementation with client side service traversal inspired by the Traverson JavaScript library. I do this this way:
Traverson traverson = null;
try {
traverson = new Traverson(new URI(getString(R.string.api_test_uri)), MediaTypes.HAL_JSON);
} catch (URISyntaxException e) {
e.printStackTrace();
}
String name = traverson.follow("movies", "movie", "actor").
withTemplateParameters(parameters).
toObject("$.name");
But i'm getting following error while creating a new Traverson object:
java.lang.NoClassDefFoundError: org.springframework.hateoas.hal.HalLinkDiscoverer
Do somebody know how to fix it?
Is there probably other/better ways to support HAL responses in android?