Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5750

Fixed value causes Exception for non fixed values in ADB generated code

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.4, 1.7.1
    • Fix Version/s: 1.7.2
    • Component/s: codegen
    • Labels:
      None

      Description

      I'm using Axis 1.7.1 and found an issue using fixed values in WDSL and the ADB Codegenerator.

      Basically when one fixed value/attribute exists, all attributes are treated as fixed attributes. This means, when setting the value on a non-fixed attribute, it set be seen as null (but set) and causing an exception once used to send to server.

      I've attached a simplified WSDL.

      I've looked in the ADB Codegen code, and IMHO the issue seems to be in SchemaCompiler where the code says:

      // register the fixed value if present
      if (xsElt.getFixedValue() != null)

      { metainf.registerDefaultValue(xsElt.getQName(), xsElt.getFixedValue()); metainf.setFixed(true); }

      The setFixed seems to be too broad, and maybe it can be changed into something following the registerNillableQName-flow, e.g. registerFixedQName(xsElt.getQName()).

        Attachments

        1. FixedValueSample.wsdl
          7 kB
          Frederik Hansen
        2. fixedAttribute.patch
          5 kB
          Frederik Hansen
        3. fixedValue.patch
          8 kB
          Frederik Hansen
        4. fixedValue.patch
          12 kB
          Frederik Hansen
        5. fixedValue.patch
          11 kB
          Frederik Hansen

          Activity

            People

            • Assignee:
              veithen Andreas Veithen
              Reporter:
              roirex Frederik Hansen

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment