We have a JAX-RS service that I've been investigating using the automatically 
generated WADL for documentation purposes.  What I've immediately noticed is 
that the auto-generated file has all the XML definitions in the <grammars> 
section but no usage of them in <resources>.

So for example we'll have a class annotated like

@XmlRootElement( name="sample")
Public class Sample
{
   @XmlElement
Public final String getField() ...
...
}

And an operation like

@GET
@Path ("/whatever")
Sample getSample();

That will show up as

<resource path="/whatever">
        <method name="GET">
          <request/>
          <response>
            <representation mediaType="application/octet-stream"/>
          </response>
        </method>
      </resource>

I've also experimented with wadl2java and starting from complete wadl 
definitions that include response types generated interfaces that don't look 
any different from our input ones.  Is this behavior a limitation of dynamic 
WADL generation or is there some annotation or parameter that I need to set to 
get a more complete model?

Thanks
Ben

Reply via email to