Specific failure in XSDEcoreBuilder [message #576731] |
Wed, 03 September 2003 08:53 |
Eclipse User |
|
|
|
Originally posted by: ihc.sas-glas.mottmac.com
Specific failure in XSDEcoreBuilder
Weve been using XSDEcoreBuilder on a trivial schema and now are turning
to some more realistic schemas. However, it choked on a particular
construct, which I have now isolated. The schema
<?xml version = "1.0" encoding = "UTF-8"?>
<xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema">
<xsd:complexType name = "ServiceCategory">
<xsd:simpleContent>
<xsd:extension base = "xsd:boolean"/>
</xsd:simpleContent>
</xsd:complexType>
<xsd:element name = "DialARide">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base = "ServiceCategory"/>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
</xsd:schema>
produces a null pointer exception during XSDEcoreBuilder.generate(), when
it gets to XSDConstants.isAnyType() which is called with a null argument
which is then used as if it is a valid object.
It doesnt seem to matter what is inside the simple content of the base
type (ServiceCategory) we always get the same failure. If however the same
kind of simple extension construct is used directly within an element
rather than as a reference to a separate type, it works OK.
However, I dont have control of the schemas so I have no workaround.
stack trace:
java.lang.NullPointerException
at org.eclipse.xsd.util.XSDConstants.isAnyType(XSDConstants.jav a:1532)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:324)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:360)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:727)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:902)
Hope someone can help.
Ian Cornwell
|
|
|
Powered by
FUDForum. Page generated in 0.03628 seconds