cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1211099 - /cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java
Date Tue, 06 Dec 2011 20:35:15 GMT
Author: dkulp
Date: Tue Dec  6 20:35:15 2011
New Revision: 1211099

URL: http://svn.apache.org/viewvc?rev=1211099&view=rev
Log:
Add more information to the error message to help diagnose what is going
on.

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java?rev=1211099&r1=1211098&r2=1211099&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java Tue Dec
 6 20:35:15 2011
@@ -27,6 +27,7 @@ import java.util.Set;
 
 import javax.annotation.Resource;
 import javax.xml.XMLConstants;
+import javax.xml.namespace.QName;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.transform.dom.DOMSource;
@@ -95,15 +96,17 @@ public abstract class AbstractDataBindin
          * Sanity check. The document has to remotely resemble a schema.
          */
         if (!XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(d.getDocumentElement().getNamespaceURI()))
{
+            QName qn = DOMUtils.getElementQName(d.getDocumentElement());
             throw new RuntimeException("Invalid schema document passed to "
                                        + "AbstractDataBinding.addSchemaDocument, "
-                                       + "not in W3C schema namespace");
+                                       + "not in W3C schema namespace: " + qn);
         }
 
         if (!"schema".equals(d.getDocumentElement().getLocalName())) {
+            QName qn = DOMUtils.getElementQName(d.getDocumentElement());
             throw new RuntimeException("Invalid schema document passed to "
                                        + "AbstractDataBinding.addSchemaDocument, "
-                                       + "document element isn't 'schema'");
+                                       + "document element isn't 'schema': " + qn);
         }
 
         String ns = d.getDocumentElement().getAttribute("targetNamespace");



Mime
View raw message