Please add generic type to javax.ws.rs.core.Response implementation
-------------------------------------------------------------------
Key: CXF-4205
URL: https://issues.apache.org/jira/browse/CXF-4205
Project: CXF
Issue Type: Improvement
Components: JAX-RS
Affects Versions: 2.5.2
Reporter: Marko Voss
Let's assume, we have the following JAX-RS interface:
@Path("/foo")
public interface Foo {
@Path("{id})
JaxbObj retrieve(@PathParam("id");
}
Now, we want to change some headers for the response, so we have to change the
interface to this:
@Path("/foo")
public interface Foo {
@Path("{id})
Response retrieve(@PathParam("id");
}
In our scenario, we want to offer the customers a basic client library, so that
they do not need to implement mapping and everything again. Therefore we are
reusing the JAX-RS interfaces on the client-side. Thanks to the maven
dependency techniques the client library will also inherit the generated JAXB
classes, CXF setup and everything else, the client requires to communicate with
the server.
So the client will now have to deal with the Object supplied by the
Response.getEntity() method and kinda have to guess the type. If the Response
type would be generic, there would not be such an issue. (example:
Response<JaxbObj>)
Since you may not be responsible for the Response interface, maybe you could
add an extended interface or implementation.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira