cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ceri Hughes (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-3662) wadl2java : Return types aren't generated properly on server interfaces for methods with more than 1 response element.
Date Mon, 18 Jul 2011 14:01:58 GMT
wadl2java : Return types aren't generated properly on server interfaces for methods with more
than 1 response element.
----------------------------------------------------------------------------------------------------------------------

                 Key: CXF-3662
                 URL: https://issues.apache.org/jira/browse/CXF-3662
             Project: CXF
          Issue Type: Bug
          Components: Tooling
    Affects Versions: 2.4.1
         Environment: Windows 7 32 bit
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
            Reporter: Ceri Hughes


My wadl file frequently has more than 1 response element in the method elements, i.e.:
{code}
			<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>
{code}

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

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

        

Mime
View raw message