Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 762509C6F for ; Mon, 26 Mar 2012 17:32:50 +0000 (UTC) Received: (qmail 32746 invoked by uid 500); 26 Mar 2012 17:32:50 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 32717 invoked by uid 500); 26 Mar 2012 17:32:50 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 32708 invoked by uid 99); 26 Mar 2012 17:32:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Mar 2012 17:32:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Mar 2012 17:32:49 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 08A9C347661 for ; Mon, 26 Mar 2012 17:32:29 +0000 (UTC) Date: Mon, 26 Mar 2012 17:32:29 +0000 (UTC) From: "Marko Voss (Created) (JIRA)" To: issues@cxf.apache.org Message-ID: <597975565.18228.1332783149142.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (CXF-4205) Please add generic type to javax.ws.rs.core.Response implementation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org 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) 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