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

TargetNameSpace required for XSD2Java

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.5.3
    • Fix Version/s: 1.5.4, 1.6.0
    • Component/s: codegen
    • Labels:
      None

      Description

      When omitting the targetNamespace attribute from an xsd, or providing it with an empty value, code generation with the XSD2Java class fails with a NullPointerException.

      The reason is that the SchemaCompiler class calls URLProcessor.makePackageName() with the value returned by the call to schema.getTargetNamespace(), which is null in this case.

      The URLProcessor.makePackageName() method then generates the exception, because it tries to call methods from the null object.

      To me, this is a bug, because AFAIK, the targetNamespace attribute isn't required.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                janwb Jan-Willem Borleffs
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: