I have a JAX-RS implementation where I have an interface that returns a
Response object. I'm using a custom provider for protocol buffers.
The issue is that on the client I'm registering the providers manually like:
JAXRSClientFactory.create("http://localhost:8888/services/rest",
RegistrationResource.class, Arrays.asList(new ProtobufProvider()))
But, yet every time I get the Response the entity is always an HttpInputStream.
It never uses the provider to parse to the class. I always have to parse it
manually using:
WhereProtos.RegistrationCreatedPayload.parseFrom((InputStream)
response.getEntity());
I'd prefer getEntity just returned a WhereProtos.RegistrationCreatedPayload.
Is this expected behavior?
Thanks, Gary