Organizational Research By

Surprising Reserch Topic

Question:Include possible values of @PathParam to WADL


We are using Jersey for RESTful API implementation utilizing its cool feature of automatic WADL generation.

Just as an example we have method

@GET
@Path("/{id}/{attribute}")
@Produces(MediaType.APPLICATION_JSON)
public Object getAttributeByID(@PathParam("id") long id, @PathParam("attribute") String attribute) {
....
}

This generates the following fragment in WADL:



Attribute can be name, type, size and we want not only to validate the value at runtime but also show it in generated wadl According to this document such feature should be supported by generating several tags

asked Sep 13, 2013 in ANDROID by android_master
edited Sep 12, 2013
0 votes
61 views



Related Hot Questions

2 Answers

0 votes

A quick search for the usages of com.sun.research.ws.wadl.Param.getOption() (see results here) shows that it's actually never invoked from the library. I guess it's only there because these classes are generated by xjc from the wadl.xsd. It seems though that Jersey basically ignores this piece of information in wadl files, and similarly doesn't care to include it in wadl files it generates.

A couple of years ago we ended up writing our own code to generate wadl, because the available tooling was so poor. This might have changed since then, but the above issue shows that proper support for wadl is still not quite there. :(

 

answered Sep 13, 2013 by android_master
edited Sep 12, 2013
0 votes

A quick search for the usages of com.sun.research.ws.wadl.Param.getOption() (see results here) shows that it's actually never invoked from the library. I guess it's only there because these classes are generated by xjc from the wadl.xsd. It seems though that Jersey basically ignores this piece of information in wadl files, and similarly doesn't care to include it in wadl files it generates.

A couple of years ago we ended up writing our own code to generate wadl, because the available tooling was so poor. This might have changed since then, but the above issue shows that proper support for wadl is still not quite there. :(

 

answered Sep 13, 2013 by android_master
edited Sep 12, 2013

...