geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r219770 - /geronimo/branches/v1_0_M4-QA/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/SchemaInfoBuilder.java
Date Tue, 19 Jul 2005 20:19:41 GMT
Author: djencks
Date: Tue Jul 19 13:19:41 2005
New Revision: 219770

URL: http://svn.apache.org/viewcvs?rev=219770&view=rev
Log:
GERONIMO-779. Help xmlbeans recognize schemas even more

Modified:
    geronimo/branches/v1_0_M4-QA/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/SchemaInfoBuilder.java

Modified: geronimo/branches/v1_0_M4-QA/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/SchemaInfoBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/v1_0_M4-QA/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/SchemaInfoBuilder.java?rev=219770&r1=219769&r2=219770&view=diff
==============================================================================
--- geronimo/branches/v1_0_M4-QA/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/SchemaInfoBuilder.java
(original)
+++ geronimo/branches/v1_0_M4-QA/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/SchemaInfoBuilder.java
Tue Jul 19 13:19:41 2005
@@ -355,8 +355,13 @@
     }
 
     static XmlObject parseWithNamespaces(Element element, Map namespaceMap) throws XmlException
{
-        XmlObject xmlObject = SchemaConversionUtils.parse(element);
-        XmlCursor cursor = xmlObject.newCursor();
+        ArrayList errors = new ArrayList();
+        XmlOptions xmlOptions = SchemaConversionUtils.createXmlOptions(errors);
+        SchemaDocument parsed = SchemaDocument.Factory.parse(element, xmlOptions);
+        if (errors.size() != 0) {
+            throw new XmlException(errors.toArray().toString());
+        }
+        XmlCursor cursor = parsed.newCursor();
         try {
             cursor.toFirstContentToken();
             for (Iterator namespaces = namespaceMap.entrySet().iterator(); namespaces.hasNext();)
{
@@ -366,7 +371,7 @@
         } finally {
             cursor.dispose();
         }
-        return xmlObject;
+        return parsed;
     }
 
     /**



Mime
View raw message