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] [Commented] (CXF-3591) the generated wadl contain empty grammar section even though only jaxb classes are used
Date Wed, 15 Jun 2011 16:45:47 GMT

    [ https://issues.apache.org/jira/browse/CXF-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13049861#comment-13049861
] 

Sergey Beryozkin commented on CXF-3591:
---------------------------------------

I think the cause of it is that 
@WadlElement(response = RateSetRes.class)

is only checked during the linking process but not at the initial context creation time...Will
get it fixed for 2.4.2

By the way 

List<CurveDetailRes>

won't link to a generated grammar.

but you can create a schema yourself and configure WADLGenerator to link to it and use @XmlName
annotations to 'connect' types with the actual schema


> the generated wadl contain empty grammar section even though only jaxb classes are used
> ---------------------------------------------------------------------------------------
>
>                 Key: CXF-3591
>                 URL: https://issues.apache.org/jira/browse/CXF-3591
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.4
>         Environment: cxf servlet on tomcat 6.0.29
>            Reporter: Alexander Blank
>
> when deploying the following service interface below with the jaxb classes one of them
below
> the generated wadl (in firefox by going to wadl url) does not have generated schema and
grammar section is empty.
> I tried setting properties to WADLGenerator with no effect.
> Is it a bug (I have the same problem with version 2.3.0) or I need to configure something
properly.
> I am using jdk 1,5.
> The configuration of the jaxrs server is below
> <jaxrs:server id="myService" address="/" staticSubresourceResolution = "true">
>         <jaxrs:serviceBeans>
>         <ref bean="rateManagerResource"/>
>      
>          </jaxrs:serviceBeans>
>         <jaxrs:extensionMappings>
>         	<entry key="json" value="application/json"/>
>             <entry key="xml" value="application/xml" />
>         </jaxrs:extensionMappings>
>     </jaxrs:server> 
> @Path("/riskfoundation")
> public interface RateManagerResource {
> 	@GET
> 	@Path("/ratesets")
> 	@Produces({ "application/xml" })
> 	@WadlElement(response = RateSetRes.class)
> 	public Response getAllRateSets();
> 	
> 	@GET
>     @Path("/curves")
>     @Produces({ "application/xml" })
>     public Response getAllCurves();
>     
> 	
> 	@GET
> 	@Path("/ratesets/{name}")
> 	@Produces({ "application/xml" })
> 	public List<CurveDetailRes> getRateInput(@PathParam("name") String name);
> 	
> 	@GET
>     @Path("/ratesets({id})")
>     @Produces({ "application/xml" })
>     public Response getRateInput(@PathParam("id") long id);
> 	
> 	@POST
> 	@Path("/ratesets({id})")
> 	@Consumes({"application/xml"})
> 	@Produces({"application/xml"})
> 	public Response postRateDataWithId(@PathParam("id") long id,List<CurveDetailRes>
rateData);
> 	@POST
>     @Path("/ratesets/{name}")
>     @Consumes({"application/xml"})
>     @Produces({"application/xml"})
>     public Response postRateDataWithName(@PathParam("name") String name,List<CurveDetailRes>
rateData);
> }
> @XmlRootElement(name = "rateset", namespace="http://analytics.moodys.com/")
> public class RateSetRes extends RepresentationWithLinks{
>     public RateSetRes() {
>     }
>     private long id;
>     private String name;
>     
>     public void setId(long id) {
>         this.id = id;
>     }
>     @XmlAttribute
>     public long getId() {
>         return id;
>     }
>     public void setName(String name) {
>         this.name = name;
>     }
>     public String getName() {
>         return name;
>     }
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message