You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Stefan Odendahl (Created) (JIRA)" <ji...@apache.org> on 2012/01/09 17:32:40 UTC
[jira] [Created] (CXF-4015) wadl2java: xs:integer param is
generated as invalid type
wadl2java: xs:integer param is generated as invalid type
--------------------------------------------------------
Key: CXF-4015
URL: https://issues.apache.org/jira/browse/CXF-4015
Project: CXF
Issue Type: Bug
Components: JAX-RS, Tooling
Affects Versions: 2.5.1
Reporter: Stefan Odendahl
A param of type xs:integer is generated as a Java "integer". This is no valid primitive type, probably you mean "int" or "Integer". But even this is wrong. xs:integer is unbounded and can only be represented by BigInteger.
xs:int however is a signed 32bit integer, generating it as "int" or "Integer" would be fine.
Example WADL:
<param name="my_number" type="xs:integer" style="query" required="true"/>
Created Java code:
@QueryParam("my_number") integer my_number
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CXF-4015) wadl2java: xs:integer param is
generated as invalid type
Posted by "Stefan Odendahl (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183157#comment-13183157 ]
Stefan Odendahl commented on CXF-4015:
--------------------------------------
This could be simply that integer is not supported. For other types that are not defined, the outcome is similar. E.g. a type "foo:bar" is generated as "bar", if the prefix "foo" is unknown or foo doesn't contain a definition for "bar".
> wadl2java: xs:integer param is generated as invalid type
> --------------------------------------------------------
>
> Key: CXF-4015
> URL: https://issues.apache.org/jira/browse/CXF-4015
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS, Tooling
> Affects Versions: 2.5.1
> Reporter: Stefan Odendahl
>
> A param of type xs:integer is generated as a Java "integer". This is no valid primitive type, probably you mean "int" or "Integer". But even this is wrong. xs:integer is unbounded and can only be represented by BigInteger.
> xs:int however is a signed 32bit integer, generating it as "int" or "Integer" would be fine.
> Example WADL:
> <param name="my_number" type="xs:integer" style="query" required="true"/>
> Created Java code:
> @QueryParam("my_number") integer my_number
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CXF-4015) wadl2java: xs:integer param is
generated as invalid type
Posted by "Sergey Beryozkin (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-4015.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.6
2.5.2
2.4.6
Assignee: Sergey Beryozkin
> wadl2java: xs:integer param is generated as invalid type
> --------------------------------------------------------
>
> Key: CXF-4015
> URL: https://issues.apache.org/jira/browse/CXF-4015
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS, Tooling
> Affects Versions: 2.5.1
> Reporter: Stefan Odendahl
> Assignee: Sergey Beryozkin
> Fix For: 2.4.6, 2.5.2, 2.6
>
>
> A param of type xs:integer is generated as a Java "integer". This is no valid primitive type, probably you mean "int" or "Integer". But even this is wrong. xs:integer is unbounded and can only be represented by BigInteger.
> xs:int however is a signed 32bit integer, generating it as "int" or "Integer" would be fine.
> Example WADL:
> <param name="my_number" type="xs:integer" style="query" required="true"/>
> Created Java code:
> @QueryParam("my_number") integer my_number
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CXF-4015) wadl2java: xs:integer param is
generated as invalid type
Posted by "Sergey Beryozkin (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13184005#comment-13184005 ]
Sergey Beryozkin commented on CXF-4015:
---------------------------------------
Hi, for the moment it will probably make sense to map
xsd:integer to "long" given that xsd:long itself is a restriction of xsd:integer.
FYI, required="true" will lead to 'long' but dropping this flag will lead to Long.
I also added a mapping for xsd:decimal to java.math.BigInteger
> wadl2java: xs:integer param is generated as invalid type
> --------------------------------------------------------
>
> Key: CXF-4015
> URL: https://issues.apache.org/jira/browse/CXF-4015
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS, Tooling
> Affects Versions: 2.5.1
> Reporter: Stefan Odendahl
>
> A param of type xs:integer is generated as a Java "integer". This is no valid primitive type, probably you mean "int" or "Integer". But even this is wrong. xs:integer is unbounded and can only be represented by BigInteger.
> xs:int however is a signed 32bit integer, generating it as "int" or "Integer" would be fine.
> Example WADL:
> <param name="my_number" type="xs:integer" style="query" required="true"/>
> Created Java code:
> @QueryParam("my_number") integer my_number
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira