Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-1063

Improve diagnostics running XSD2JavaGenerator against bad schema

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Java-SCA-M2
    • Java-SDO-1.1
    • Java SDO Tools
    • None

    Description

      I gave an invalid XSD file to the XSD2JavaGenerator and had to use the debugger to figure out the problem.

      It might be nice to do a printStackTrace() on any exception before throwing out of main().

      Also it might be good to print out simple error messages in the cases that:
      a) the usage was correct but the specified file can't be read
      b) the file can be read but there is no valid schema found

      As a sample of the latter here is my invalid schema

      <xsd:schema xmlns:tns="http://helloworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://helloworld">
      <complexType name="Person">
      <sequence>
      <element name="firstName" type="string"/>
      <element name="lastName" type="string"/>
      </sequence>
      </complexType>
      </xsd:schema>

      Attachments

        Activity

          People

            Unassigned Unassigned
            scottkurz Scott Kurz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: