cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-6238) Java2WADL : Generating response status attribute
Date Wed, 04 Feb 2015 17:59:35 GMT

     [ https://issues.apache.org/jira/browse/CXF-6238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Beryozkin resolved CXF-6238.
-----------------------------------
       Resolution: Fixed
    Fix Version/s: 3.1.0
                   3.0.4
         Assignee: Sergey Beryozkin

> 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
>            Assignee: Sergey Beryozkin
>             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}
> 	      <plugin>
> 	      	<groupId>org.apache.cxf</groupId>
> 			<artifactId>cxf-java2wadl-plugin</artifactId>
> 			<version>3.0.3</version>
> 			<dependencies>
> 				<dependency>
>   				<groupId>org.apache.cxf</groupId>
>   				<artifactId>cxf-rt-rs-service-description</artifactId>
>   				<version>3.0.3</version>
> 			</dependency>
> 			</dependencies>
> 			<executions>
>                     <execution>
>                         <id>parsejavadoc</id>
>                         <phase>generate-sources</phase>
>                         <goals>
>                             <goal>parsejavadoc</goal>
>                         </goals>
>                     </execution>
>                     <execution>
>                         <id>process-classes</id>
>                         <phase>process-classes</phase>
>                         <goals>
>                             <goal>java2wadl</goal>
>                         </goals>
>                         <configuration>
> 				            <applicationTitle>APIREST</applicationTitle>
> 				            <namespacePrefix>peTestCXF</namespacePrefix>
> 				            <addResourceAndMethodIds>true</addResourceAndMethodIds>
> 				            <linkAnyMediaTypeToXmlSchema>true</linkAnyMediaTypeToXmlSchema>
> 							<singleResourceMultipleMethods>false</singleResourceMultipleMethods>
> 							<classResourceNames>
> 								<classResourceName>fr.pe.internet.de.references.api.ressources.Permis</classResourceName>
> 							</classResourceNames>
> <!-- 							<classResourceNames/> -->
> <!-- 							<basePackages>fr.pe.internet.de.references.api.ressources</basePackages>
-->
>                             <docProvider>org.apache.cxf.maven_plugin.javatowadl.ResourceMapJavaDocProvider</docProvider>
>                             <attachWadl>true</attachWadl>
>                         </configuration>
>                     </execution>
>                 </executions>
> 	      </plugin>{code}
> The generated WADL file :
> {code:xml}
> <application xmlns="http://wadl.dev.java.net/2009/02" xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <doc title="APIREST"/>
> <grammars></grammars>
> <resources base="/">
>   <resource path="/permis" id="fr.pe.internet.de.references.api.ressources.Permis">
>     <resource path="/{id}">
>       <param name="id" style="template" type="xs:string">
>       </param>
>       <method name="GET" id="getPermis">
>         <request>
>         </request>
>         <response>
>           <representation mediaType="application/json">
>           </representation>
>         </response>
>       </method>
>     </resource>
>   </resource>
> </resources>
> </application>
> {code}
> Cheers,
> Bertrand.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message