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

wsdl2java creates invalid java code with extension + choice

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.6.2
    • Fix Version/s: None
    • Component/s: wsdl
    • Labels:
    • Environment:
      Windows 7 SP1 64bit
      axis2 1.6.2

      Description

      When trying to generate java source for a vendor provided WSDL file (with XSD), I got java source that would not compile because it referenced fields which did not exist.

      I ran:

      wsdl2java -uri example.wsdl -u
      ant
      

      The compilation error is:

          [javac] c:\Users\djohnson\Documents\Intrado\WSDL\trimmed\src\com\example\namespaces\def\UpdateResponseType.java:31: error: cannot find symbol
          [javac]                    localInteger1Tracker = false;
          [javac]                    ^
          [javac]   symbol:   variable localInteger1Tracker
          [javac]   location: class UpdateResponseType
      

      (+5 more of these)

      I spent this afternoon creating this reduced testcase which is attached. The above errors are from the reduced testcase, although they are essentially identical to the ones I got with the real WSDL.

      My uneducated guess is that the generator is treating the base type's sequence members as choices of the subtype. But I have only a basic understanding of WSDL or XML Schemas, so I am out of my element here.

      Please let me know if there is any more information that would be useful, I'd be happy to provide it.

        Attachments

        1. trimmed.xsd
          1 kB
          Daniel Johnson
        2. example.wsdl
          1 kB
          Daniel Johnson

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              daniel.johnson Daniel Johnson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: