Details
Description
My wadl file frequently has more than 1 response element in the method elements, i.e.:
<method name="GET" id="getUserDefaults"> <doc>Gets default user configuration values.</doc> <response status="200"> <representation mediaType="application/xml" element="fmc:userDefaults" /> </response> <response status="400"> <representation mediaType="application/xml" element="fmc:errorList" /> </response> </method>
If there is more than 1 response element, the wadl2java tool assumes that the return type from generated methods is always void. There is a line of code that checks for exactly 1 response element - if there isn't 1 (i.e. 0 or more than 1), then void is assumed. Can it not take the representation of the 1st response in a case when there is more than 1 (or better, the representation from the response with a success status)?
See the first line of org.apache.cxf.jaxrs.ext.codegen.SourceGenerator.writeResponseType