I am trying to use a generic base class for my service endpoints so I don't
have to retype the basic getAll, get, put, post, delete handlers every time.
When I do this, the runtime generated WADL shows a blank grammars section.
This is using:
com.fasterxml.jackson artifacts @ 2.5.2
org.apache.cxf artifacts @ 3.0.4
deploying in Tomcat 7
Example:
This generates a WADL with an empty grammars section:
@Transactional
@Consumes("application/json")
@Produces("application/json")
public abstract class AbstractRS<T>{
@GET
@Produces("application/json")
public List<T> getAll(){
....
}
}
@Controller
@Path("/foo")
public class FooRS extends AbstractRS<Foo>{
...
}
This generates a WADL with a fully spec'd grammars section if I just pull in
a single method that includes the specified parameter type(Foo) in its
prototype:
@Transactional
@Consumes("application/json")
@Produces("application/json")
public abstract class AbstractRS<T>{
@GET
@Produces("application/json")
public List<T> getAll(){
....
}
}
@Controller
@Path("/foo")
public class FooRS extends AbstractRS<Foo>{
...
@GET
@Produces("application/json")
public List<Foo> getAll(){
return super.getAll();
}
}
--
View this message in context:
http://cxf.547215.n5.nabble.com/WADL-Grammar-section-lost-for-generic-service-class-tp5755870.html
Sent from the cxf-user mailing list archive at Nabble.com.