Thanks Arnaud it works fine :)))
Arnaud Blandin <[EMAIL PROTECTED]> wrote:
Hi Thomas,
The problem lies in the fact that you are not declaring the namespace you are trying to import in your <schema> element.
Try to add a namespace declaration in it and you should be fine.
Arnaud
-----Original Message-----
From: pradeep thomas [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 27, 2002 1:11 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] namespace XXX not declared in schema : advice request
Am trying to generate source code from xml schema using the source generator
org.xml.sax.SAXException: namespace 'http://www.foo.com/xxxpayload' not declared in schema
at org.exolab.castor.xml.schema.reader.ImportUnmarshaller.<init>(ImportUnmarshaller.java:115)
at org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(SchemaUnmarshaller.java:387)
at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1214)
at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806)
at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner! .java:1182)
at org.a! pache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
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:665)the source schema -
<xsd:schema targetNamespace="http://www.foo.com/xxx" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dt="http://www.foo.com/datatypes" xmlns="http://www.foo.com/xxx" elementFormDefault="qualified" attributeFormDefault="qualified" id="GenericMessage">
<xsd:import namespace="http://www.foo.com/Payload/xxxpayload" schemaLocation="xxxpayload.xsd"/>
It throws an exception at this line
<xsd:import namespace="http://www.foo.com/Payload/xxxpayload" schemaLocation="xxxpayload.xsd"/>Please advice
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
