Your server says it will return JSON string as response, but the ContentType header it sends is not "application/json" but "text/html". What will happen?
Your client will see an exception saying "A message body reader for … was not found" .
What you need to do is to have your own "provider" and let it take whatever content type.
public class MyJacksonJaxbJsonProvider extends JacksonJaxbJsonProvider { /** * always return true. */ @Override protected boolean hasMatchingMediaType(MediaType mediaType) { return true; } }
//register it with your Jersey client restClient = ClientBuilder.newBuilder() .register(MyJacksonJaxbJsonProvider.class).build();