Hi Guys,
I'm trying to create a jersey client osgi bundle for use in Apache Sling.
My code is pretty straightforward
r = client.resource("
http://localhost:8888/dependencyApp/rest/admin/session");
Builder test = r.accept(MediaType.APPLICATION_JSON);
ClientResponse response = test.post(ClientResponse.class);
return response.getEntity(SessionObject.class);
But when I try to get the entity I the delegate variable in MediaType is always null so the valueOf call fails.
I've searched around, and I saw that previously you may have had to include the jersey-server package as well so I did that. Both client and server are 1.4 but I always get an NPE for the delegate.
Any pointers?
Thanks
Tom