From: Herman D'costa [mailto:[EMAIL PROTECTED]
Sent: 14 December 2004 19:33
To: [EMAIL PROTECTED]
Subject: [castor-user] XML - Issues with imported schemas
Hello
I am new to Castor, and am learning while using the XML Schema api. I am using castor-0.9.5.4-xml.jar. I have 2 issues related to imported schemas.
Issue 1. I am trying to load schemas at the following
urls
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
The second one is an imported schema at that location in the first one. When I try loading the first one using the SchemaReader's read api, I get the following error
NestedIOException: In document: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'
Parsing Error : Content is not allowed in
prolog.
Line : 1
Column : 1
{ nested error: In document: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'
Parsing Error : Content is not allowed in
prolog.
Line : 1
Column : 1
}
If I try and load the second one (by using its url), it loads just fine. Am I missing to do something or is this a bug?
Issue 2. I have an in-memory Schema object, and imported another in-memory Schema, using Schema's addImportedSchema api. All is fine. I then serialized the schema to a byte array using SchemaWriter. When I passed the byte array to a different program to load into a Schema object, it complained that it couldn't resolve the namespace of the imported schema.
Is there a way to specify a Schema location when adding imported schemas? Maybe its by using setSchemaLocation on the imported schema before calling addImportedSchema. However, when an in-memory schema is imported, what can I specify as a schema location?
Is there another way to deal with this problem?
Thanks, regds
Herman D'Costa
Software Engineer
Digital
Evolution Inc.
http://digev.com
|
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
