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

wadl2java : xsd data types aren't mapped to java data types properly if they use mixed case.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.1
    • 2.4.2, 2.5
    • Tooling
    • None
    • 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)

    Description

      The data types in my xsd use mixed case names - e.g. "userDefaults"

      When I reference these in my reponse's representation elements, the wadl2java tool is unable to match them to the types processed by the xsd parser.

      E.g.

      <response status="200">
      <representation mediaType="application/xml" element="fmc:userDefaults" />
      </response>

      There is a line of code in the org.apache.cxf.jaxrs.ext.codegen.SourceGenerator.matchClassName method that checks the lower-cased version of the generated class name matches the local name of the type from the xsd. This will only ever work ig the local name is completely lowercased OR the method changes to match the 2 strings lower cased.

      Attachments

        1. example.zip
          0.9 kB
          Ceri Hughes

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            cerihughes Ceri Hughes
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: