Castor is an XSD compiler not a WSDL compiler.

I think you need to use Apache Axis or CXF WSDL compilers to handle this. If 
there was a WSDL compiler
that used Castor to generate the data structures I would be very interested. 
The pojos produced
by the WSDL compilers are nothing like as readable as the ones produced by 
Castor.

James
  ----- Original Message ----- 
  From: Sasan 
  To: [email protected] 
  Sent: Monday, November 30, 2009 4:31 PM
  Subject: [castor-user] WSDL import - castor exception


  Hi,


  I am trying to parse the example provided in the link

  Listing4 which imports Listing 5

  http://www.ibm.com/developerworks/xml/library/ws-tip-imports.html

  Note: I am providing the link only because the xml in question is slightly 
big for copy paste here, I hope you don't mind.

  However I get the error when parsing the "Type"

  Unable to resolve Schema corresponding to namespace 
'http://www.w3.org/2001/XMLSchema'.
  org.exolab.castor.xml.schema.SchemaException: Unable to resolve Schema 
corresponding to namespace 'http://www.w3.org/2001/XMLSchema'.
      at 
org.exolab.castor.xml.schema.reader.ImportUnmarshaller.<init>(ImportUnmarshaller.java:125)
      at 
org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(SchemaUnmarshaller.java:604)
      at 
org.exolab.castor.xml.schema.reader.Sax2ComponentReader.startElement(Sax2ComponentReader.java:255)
      at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown 
Source)
      at 
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(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.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.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.xml.schema.reader.SchemaReader.read(SchemaReader.java:301)
  <more>


  Is this a limitation introduced by castor? 

  any info will be much appreciated.

  Thanks,
  S.


Reply via email to