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 0764B17FF5 for ; Wed, 4 Feb 2015 17:59:34 +0000 (UTC) Received: (qmail 89525 invoked by uid 500); 4 Feb 2015 17:59:35 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 89492 invoked by uid 500); 4 Feb 2015 17:59:35 -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 89478 invoked by uid 99); 4 Feb 2015 17:59:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2015 17:59:34 +0000 Date: Wed, 4 Feb 2015 17:59:34 +0000 (UTC) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-6238) Java2WADL : Generating response status attribute 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-6238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14305621#comment-14305621 ] Sergey Beryozkin commented on CXF-6238: --------------------------------------- It is not really possible for the generator to do the actual code analysis - at the very least it would be very complex but with a very limited real value. However a number of users have asked about something similar before. So I've added a new ResponseStatus annotation that can be used to specify one or more statuses: http://git-wip-us.apache.org/repos/asf/cxf/commit/6bf377f6 Thanks. > Java2WADL : Generating response status attribute > ------------------------------------------------ > > Key: CXF-6238 > URL: https://issues.apache.org/jira/browse/CXF-6238 > Project: CXF > Issue Type: Improvement > Components: JAX-RS > Affects Versions: 3.0.3 > Environment: JavaSE 1.7, JAX-RS 2.0 > Reporter: Bertrand Renault > Fix For: 3.0.4, 3.1.0 > > > Would it be possible to get the WADL element attribute "status" be generated when using javax.ws.rs.core.StatusType interface and the Response builder ? > Here is the definition of the resource. > {code:title=resourceexample.java|borderStyle=solid} > @GET > @Path("/{id}") > @Produces(MediaType.APPLICATION_JSON) > @NoCache > public Response getPermis(@PathParam("id") String id) { > return Response.status(Status.NOT_IMPLEMENTED).build(); > } > {code} > The cxf-java2wadl-plugin configuration in the Maven Pom file > {code:xml} > > org.apache.cxf > cxf-java2wadl-plugin > 3.0.3 > > > org.apache.cxf > cxf-rt-rs-service-description > 3.0.3 > > > > > parsejavadoc > generate-sources > > parsejavadoc > > > > process-classes > process-classes > > java2wadl > > > APIREST > peTestCXF > true > true > false > > fr.pe.internet.de.references.api.ressources.Permis > > > > org.apache.cxf.maven_plugin.javatowadl.ResourceMapJavaDocProvider > true > > > > {code} > The generated WADL file : > {code:xml} > > > > > > > > > > > > > > > > > > > > > {code} > Cheers, > Bertrand. -- This message was sent by Atlassian JIRA (v6.3.4#6332)