Hi.
I an working on WS-Agreement stuff. In order to generate source files from their XSDs, I need to import the XML Schema which raises an exception.
This is an easy way to reproduce it:
1. Download from http://www.w3.org/2001/XMLSchema the files XMLSchema.dtd, datatypes.dtd and XMLSchema.xsd
2. Run java -cp castor-0.9.5.3-xml.jar:xercesImpl.jar:xmlParserAPIs.jar org.exolab.castor.builder.SourceGenerator -i XMLSchema.xsd
You will receive the following exception:
Exception in thread "main" java.lang.IllegalArgumentException: getSimpleType: the simple type 'derivationControl' is not a built-in type as defined in XML Schema specification.
at org.exolab.castor.xml.schema.Schema.getSimpleType(Schema.java:923)
at org.exolab.castor.xml.schema.Schema.getType(Schema.java:1389)
at org.exolab.castor.xml.schema.reader.SimpleTypeRestrictionUnmarshaller.<init>(SimpleTypeRestrictionUnmarshaller.java:120)
at org.exolab.castor.xml.schema.reader.SimpleTypeUnmarshaller.startElement(SimpleTypeUnmarshaller.java:232)
at org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(SchemaUnmarshaller.java:461)
at org.exolab.castor.xml.schema.reader.Sax2ComponentReader.startElement(Sax2ComponentReader.java:253)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:388)
at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:441)
at org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:797)
Any idea, what I can do about that?
I think I need to import XMLSchema, because part of the ws-agreement schema looks like
<xs:complexType name="NegotiationItemType">
<xs:sequence>
<xs:group ref="xs:simpleRestrictionModel" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="path" type="xs:string"/>
</xs:complexType>xs:simpleRestrictionModel is the problem - in fact the only problem where I reference something from XMLSchema. Is there an easy way of dealing with this problem?
Thanks for your help,
Dominic
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
