Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-1133

Better support for string-type enemerations in the ADB code generator

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • code generation
    • None

    Description

      As discussed in axis-c-user@ws.apache.org (and CC'ed in axis-c-dev), this patch adds support for a more "C-like" handling of string-type enumerations, by allowing values to be read and written with a native enum structure.

      Summary of changes:

      src/org/apache/axis2/schema/writer/CStructWriter.java:

      • Capitalize and normalize (i.e., remove invalid characters) the "id" property in enumFacet tags

      src/org/apache/axis2/schema/template/CADBBeanTemplateHeader.xsl:

      • Generate enum declaration
      • Generate declarations for specialized enum getter and setter

      src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl

      • Generate specialized getter and setter; the data is still stored in string format, these functions simply convert back and forth

      Attachments

        1. string_enumeration_support.diff
          11 kB
          Sérgio Gomes

        Activity

          People

            Unassigned Unassigned
            sgomes Sérgio Gomes
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: