5 Replies Latest reply: Jul 15, 2009 1:41 PM by Alexey Loubyansky RSS

@XmlType.propOrder required with no schema sequence

Thomas Diesler Master


Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Property order is not specified for type org.jboss.osgi.blueprint.parser.xb.TRegistrationListener bound to a sequence. Property order can be specified using @XmlType.propOrder or @XmlAccessorOrder. List of properties: ref refFIXME bean any unregistrationMethod registrationMethod reference
 at org.jboss.xb.builder.JBossXBNoSchemaBuilder.assertPropOrderNotRequired(JBossXBNoSchemaBuilder.java:1278)
 at org.jboss.xb.builder.JBossXBNoSchemaBuilder.generateType(JBossXBNoSchemaBuilder.java:1071)
 at org.jboss.xb.builder.JBossXBNoSchemaBuilder.generateBean(JBossXBNoSchemaBuilder.java:779)
 at org.jboss.xb.builder.JBossXBNoSchemaBuilder.generateBean(JBossXBNoSchemaBuilder.java:767)

The schema is here


  • 1. Re: @XmlType.propOrder required even if schema does not defi
    Thomas Diesler Master


     <xsd:complexType name="TregistrationListener">
     A registration listener definition. The target registration listener
     can be either a <ref> to a <bean> or <service> component, or an inline
     <bean> or <service> component definition. The registration-method and
     unregistration-method attributes define the methods that will be called
     for the respective events.
     For the very common case of using a <ref> to a listener component, the
     ref attribute may also be used as a shortcut.
     <xsd:group ref="targetComponent" />
     <xsd:attribute name="ref" type="Tidref" use="optional" />
     <!-- ### why are there both required? -->
     <xsd:attribute name="registration-method" type="Tmethod" use="required" />
     <xsd:attribute name="unregistration-method" type="Tmethod" use="required" />

     <xsd:group name="targetComponent">
     A targetcomponent is one that can be a target for a
     listener, registration-listener, or type-converter element.
     This is used in contexts where the requirement is a single
     provided object that will implement a particular interface.
     The provided object is obtained either from a <ref> element
     or inline (<bean> or <reference>).
     <xsd:element name="bean" type="Tbean" />
     <xsd:element name="reference" type="Treference" />
     <xsd:element name="ref" type="Tref" />
     <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded" />

  • 3. Re: @XmlType.propOrder required with no schema sequence
    Alexey Loubyansky Master

    Again, XSD is irrelevant here since binding is based on Java annotations. That means you have to bind the type to a choice with annotations.
    I can't see the class at the moment, i.e. svn.jboss.com is not accessible. To bind to a choice you have to annotate a class with e.g.

    @JBossXmlModelGroup(name="pc", kind=JBossXmlConstants.MODEL_GROUP_CHOICE)

    Sequence is the default.

  • 4. Re: @XmlType.propOrder required with no schema sequence
    Thomas Diesler Master

    you might be pleased to hear that I successfully moved BP parsing to XB annotations ;-)

  • 5. Re: @XmlType.propOrder required with no schema sequence
    Alexey Loubyansky Master

    Yeaaah... Say it again...