cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <>
Subject [jira] [Commented] (CXF-4477) [WADL2JAVA] Generate incorrect primitive parameter type
Date Tue, 21 Aug 2012 13:35:39 GMT


Sergey Beryozkin commented on CXF-4477:

Thanks for the quick test on your end.

I've updated the generator to autobox when needed all the optional parameters (form, header,
param, query).

As far as 'schemaTypesMap' is concerned I thought I would reuse it for 2 purposes, first one
for mapping between the default Java types allocated to either parameter and representation
types and the preferred types (we've had only a case of W3C EPR so far) and overriding the
default primitive mappings (ex, xs:date -> java.util.Date by default in the generator to
say Calendar) but now I've decided to use it for java to java mappings only, to avoid any
ambiguities. So if say you'd like to restore a default (JAXB) mapping between 'xs:date' and
Calendar then you'd use a 'java.util.Date -> Calendar' mapping. If really needed I'd then
add another property for customizing the mapping between schema types and java classes

> [WADL2JAVA] Generate incorrect primitive parameter type 
> --------------------------------------------------------
>                 Key: CXF-4477
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS, Tooling
>    Affects Versions: 2.6.1
>            Reporter: Hoan-Vu Phan
>            Assignee: Sergey Beryozkin
>            Priority: Critical
> In we have the code like this:
> XSD_SPECIFIC_TYPE_MAP = new HashMap<String, String>();
> XSD_SPECIFIC_TYPE_MAP.put("string", "String");
> XSD_SPECIFIC_TYPE_MAP.put("decimal", "java.math.BigInteger");
> XSD_SPECIFIC_TYPE_MAP.put("integer", "long");
> If we have a wadl like this:
> <param name="param1" required="true" style="query" type="xs:int" />
> <param name="param2" required="true" style="query" type="xs:long" />
> it's always generate (String param1) and (String param2)
> So far as I know, xs:int and xs:long beside xs:string are the most usage type in WADL.
But now it can not work any more!!!!
> I think this is a regression bug from
> **********************************************************
> sergeyb  08.05.12 19:25:44
> [CXF-4292] Defaulting to String when WADL Generator can not determine a class name of
the primitive type
> **********************************************************
> For the solution, I think we can expand XSD_SPECIFIC_TYPE_MAP which the exactly mapping
as a standard:
> Could you please have a look on this issue.
> Many many many thanks :)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message