Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-4477

[WADL2JAVA] Generate incorrect primitive parameter type

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.6.1
    • Fix Version/s: 2.5.6, 2.6.3, 2.7
    • Component/s: JAX-RS, Tooling
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      In org.apache.cxf.tools.wadlto.jaxrs.SourceGenerator 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:
      http://en.wikipedia.org/wiki/Java_Architecture_for_XML_Binding

      Could you please have a look on this issue.
      Many many many thanks

        Attachments

          Activity

            People

            • Assignee:
              sergey_beryozkin Sergey Beryozkin
              Reporter:
              hoanvuphan Hoan-Vu Phan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: