Xsd-reverse-enginering throws unknown type

Played with the xsd-reverse-enginering plugin for grails and I had a little problem that I think I know what it is but not how to resolve it.

Have a huge xsd file containing a relatively advanced outline and thought I'd try to see if I could save my own time by forcing grails to create a Gorm object from it. The problem is that the agency that created the xsd file named several types of XML based on the data. For example, they have an element named MessageType

        <xs:element name="MessageCategory" type="MessageType" id="S1.1">
        <xs:annotation>
            <xs:documentation>The type of message: either an original Submission (NewSubmission), an update on a submission (SubmissionVariation), a complete replacement of one message with another (SubmissionReplacement) or submission that should not have been sent (SubmissionVoid) that should be effectively deleted.</xs:documentation>
        </xs:annotation>
    </xs:element>

      

This throws the following error

Unknown simpleType: MessageType  

      

Any ideas on how I can manage this, can I, for example, define types or something?

+3


source to share


1 answer


if you want to declare this type you must define the type tags correctly (as described here: http://msdn.microsoft.com/en-US/library/8w07bk3h%28v=vs.80%29.aspx )

eg: simple type definition (eg number)

<xs:simpleType name="MessageType">
  <xs:restriction base="xs:integer">
    <xs:minInclusive value="0"/>
    <xs:maxInclusive value="100"/>
  </xs:restriction>
</xs:simpleType>

      



complex type definition (called element)

<xs:element name="MessageType">

  <xs:simpleType ...>
  </xs:simpleType>

  <xs:simpleType ...>
  </xs:simpleType>

</xs:element>

      

0


source







All Articles