Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error while generating java code from xsd using castor..  RSS feed

 
Mr.Zuir Alex
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am new to Web Services. I have to generate java code out of .xsd file using castor. While compiling and generating it through ant, I am getting the following exception.

castor-src-gen:
[java] -- Suppressing non fatal warnings.
[java] -- Disabling generation of Class descriptors
[java] -- Disabling generation of Marshalling framework methods (marshall, unmarshall, validate).
[java] org.xml.sax.SAXException: 'union' elements are not yet supported.
[java] line: 65
[java] at org.exolab.castor.xml.schema.reader.SaxUnmarshaller.error(SaxUnmarshaller.java:169)
[java] at org.exolab.castor.xml.schema.reader.SimpleTypeUnmarshaller.startElement(SimpleTypeUnmarshaller.java:196)
[java] at org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(SchemaUnmarshaller.java:334)
[java] at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
[java] at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
[java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
[java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
[java] at org.exolab.castor.xml.schema.reader.ImportUnmarshaller.<init>(ImportUnmarshaller.java:154)
[java] at org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(SchemaUnmarshaller.java:387)
[java] at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
[java] at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
[java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
[java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
[java] at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:388)
[java] at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:441)
[java] at org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:665)


Please help.

Many Thanks,
Alex
[ August 07, 2007: Message edited by: Mr.Zuir Alex ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!