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 C67D9FDFD for ; Fri, 25 Apr 2014 20:47:25 +0000 (UTC) Received: (qmail 16339 invoked by uid 500); 25 Apr 2014 20:47:20 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 16255 invoked by uid 500); 25 Apr 2014 20:47:20 -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 16172 invoked by uid 99); 25 Apr 2014 20:47:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Apr 2014 20:47:19 +0000 Date: Fri, 25 Apr 2014 20:47:19 +0000 (UTC) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CXF-5701) wadl response with JAXB + headers should optionally generate JAX-RS Response MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-5701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Beryozkin resolved CXF-5701. ----------------------------------- Resolution: Fixed Fix Version/s: 3.0.0 2.7.12 Assignee: Sergey Beryozkin "-generateResponseIfHeadersSet" boolean option can be used to generate Responses for all methods with WADL responses containing header parameters, "-generateResponseForMethods methodNames" where methodNames is a comma-separated list of names can be used to control it on a per-method basis > wadl response with JAXB + headers should optionally generate JAX-RS Response > ---------------------------------------------------------------------------- > > Key: CXF-5701 > URL: https://issues.apache.org/jira/browse/CXF-5701 > Project: CXF > Issue Type: Improvement > Components: JAX-RS > Affects Versions: 2.7.10 > Environment: Little-Net:users-api minfrin$ java -version > java version "1.6.0_65" > Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609) > Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode) > Reporter: Graham Leggett > Assignee: Sergey Beryozkin > Fix For: 2.7.12, 3.0.0 > > > When I run wadl2java on the following fragment of wadl, I get the API interface defined below: > {code} > > > > > The SHA1 hash of the sum of DN and modifiedTimestamp of the matching users. > > > The Cache-Control header as specified through configuration in context.xml. > > > MUST have the value "Authorization", as we vary on the Authorization header. > > Return list of users. Must have admin role to receive the response. > Note: no users = empty list with status:200 > > {code} > {code} > @GET > @Produces({"application/json", "application/xml" }) > Users getUsers(@QueryParam("page") Long page, @QueryParam("pageSize") Long pageSize, @QueryParam("sort") String sort, @QueryParam("fl") String fl, > @HeaderParam("If-None-Match") String If_None_Match, @HeaderParam("Authorization") String Authorization); > {code} > The problem with the interface that is being produced above is that we return a JAXB Users object, with no mechanism to return any of the ETag, Cache-Control or Vary headers as required by the wadl. > To maintain backwards compatibility we need an option to send the correct response based on whether headers are present or not. -- This message was sent by Atlassian JIRA (v6.2#6252)