Thomas Fritsch
Thomas Fritsch

Reputation: 10147

Trying to convert huge JDF.xsd with xjc, but failed

The official JDFLibJ library published by CIP4 for processing JDF files is rather old-fashioned (especially, not based on JAXB). Therefore I tried to convert the JDF Schema to Java code by myself, so that I would get all the advantages of JAXB.

Here is what I did so far:

I expected to get:

But actually nothing was generated, and 800 lines of error messages appeared.

parsing a schema...
[ERROR] Base complex type "JMFAbstractResponse_" is derived by restriction, while this complex type "ResponseSetQueueEntryPosition" is derived by extension. This is not currently handled by XJC, but we are seeking input on this issue. Please report this to the JAXB team.
  line 3421 of file:/D:/workspace4.4/de.tfritsch.jdf/JDFMessage.xsd

[ERROR] Base complex type "JDFAbstractNode" is derived by restriction, while this complex type "ContoneCalibration" is derived by extension. This is not currently handled by XJC, but we are seeking input on this issue. Please report this to the JAXB team.
  line 718 of file:/D:/workspace4.4/de.tfritsch.jdf/JDFProcess.xsd

[ERROR] Base complex type "JMFAbstractResponse_" is derived by restriction, while this complex type "ResponseShutDown" is derived by extension. This is not currently handled by XJC, but we are seeking input on this issue. Please report this to the JAXB team.
  line 1993 of file:/D:/workspace4.4/de.tfritsch.jdf/JDFMessage.xsd

...rest of output omitted here...

[ERROR] Property "GenericElements" is already defined. Use <jaxb:property> to resolve this conflict.
  line 1272 of file:/D:/workspace4.4/de.tfritsch.jdf/JDFCore.xsd

[ERROR] The following location is relevant to the above error
  line 1274 of file:/D:/workspace4.4/de.tfritsch.jdf/JDFCore.xsd

Failed to parse a schema.

Is there any chance to work around this issue, at least for a partial solution?

Edit:

It seems others already ran into the same issue with the JDF schema. See this comment on bug-report JAXB-745 xjc derivation by extension/restriction.

Upvotes: 2

Views: 444

Answers (0)

Related Questions