ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rachna Jotwani" <rjotw...@dag.com>
Subject INVALID_CHARACTER_ERR
Date Wed, 17 Jul 2013 16:37:55 GMT
Hi

 

I am using the Apache XMLSchema apis to read XSDs. Using the below code.

I have over 100 xsds.

 

I get the following error, but it doesn't tell me which file has the invalid
character.

 

schemaCol.read method reads all dependent xsds as well, so it is difficult
to guess which xsd it could be.

 

Can someone give me some ideas to debug this?

 

Thanks

Rachna

 

 

 

java.lang.RuntimeException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR:
An invalid or illegal XML character is specified.

       at
org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.ja
va:1898)

       at
org.apache.ws.commons.schema.SchemaBuilder.handleInclude(SchemaBuilder.java:
1644)

       at
org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuil
der.java:219)

       at
org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:121)

       at
org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.ja
va:512)

       at
org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.ja
va:496)

 

              

 

              File file = new File(fileName);

        DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();

        documentBuilderFactory.setNamespaceAware(true);

        Document doc = documentBuilderFactory.newDocumentBuilder().

                parse(fileName);

        XmlSchemaCollection schemaCol = new XmlSchemaCollection();

        schemaCol.setBaseUri(doc.getBaseURI());

        

 XmlSchema schema = schemaCol.read(doc, fileName, null);


Mime
View raw message