Title: SchemaGenerator Error: Only one child ID property allowed

Hello everybody,

I am having a problem with the SchemaGenerator delivered in jibx-genschema.jar. The binding itself works so far and now I need the tool to create a schema description (XSD file) which has to be imported into another tool. Running the generator I get this error message:

generate-jibx-schema:
     [java] Running schema generator version 0.2
     [java] Problems found in binding null
     [java] Only one child ID property allowed for an object - value element at (line 39, col 62, in config_mappings_jibx_binding_xml) and value element at (line 39, col 62, in config_mappings_jibx_binding_xml) refer to the same object for value element at (line 39, col 62, in config_mappings_jibx_binding_xml)

     [java] Binding validation errors prevent schema generation

My binding looks like this:

  <mapping class="de.ava.kas.model.DealHead" name="deal-head">
    <value name="deal-id-str" field="dealIdStr" ident="def"/>

    <collection field="dealDetails" name="deal-details" usage="optional"
                item-type="de.ava.kas.model.DealDetail"
                type="java.util.HashSet"
    />

    <!-- lots of other values, structures and collections follow here -->
  </mapping>
  <mapping name="deal-detail" class="de.ava.kas.model.DealDetail">
    <!-- lots of values and structures here -->
    <value name="dealHead" field="dealHead" ident="ref"/>
  </mapping>

As soon as I remove 'ident="ref"' from 'deal-id-str' the schema generation works but the binding itself fails. Does anyone has a clue what might be the problem here?

Thanks in advance
Alexander

Reply via email to