cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marko Voss (Created) (JIRA)" <>
Subject [jira] [Created] (CXF-4205) Please add generic type to implementation
Date Mon, 26 Mar 2012 17:32:29 GMT
Please add generic type to implementation

                 Key: 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:

public interface Foo {

  JaxbObj retrieve(@PathParam("id");

Now, we want to change some headers for the response, so we have to change the interface to

public interface Foo {

  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:!default.jspa
For more information on JIRA, see:


View raw message