cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r675644 - /cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFormatValidator.java
Date Thu, 10 Jul 2008 16:47:00 GMT
Author: dkulp
Date: Thu Jul 10 09:46:59 2008
New Revision: 675644

URL: http://svn.apache.org/viewvc?rev=675644&view=rev
Log:
Fix xml wsdl validation to actually follow the documented rules.   Fixes the wsdl_first_pure_xml
demo.

Modified:
    cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFormatValidator.java

Modified: cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFormatValidator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFormatValidator.java?rev=675644&r1=675643&r2=675644&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFormatValidator.java
(original)
+++ cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFormatValidator.java
Thu Jul 10 09:46:59 2008
@@ -115,17 +115,8 @@
             Object ext = it.next();
             if (ext instanceof XMLBindingMessageFormat) {
                 XMLBindingMessageFormat xmlFormat = (XMLBindingMessageFormat)ext;
-                QName rootNodeName = bo.getName();
-                if (xmlFormat.getRootNode() != null) {
-                    if (xmlFormat.getRootNode().equals(rootNodeName)) {
-                        return true;
-                    } else {
-                        addErrorMessage(errorPath
-                                        + ": wrong value of rootNode attribute, the value
should be "
-                                        + rootNodeName);
-                        return false;
-                    }
-                } else {                    
+                if (xmlFormat.getRootNode() == null) {
+                    QName rootNodeName = bo.getName();
                     addErrorMessage(errorPath
                                     + ": empty value of rootNode attribute, the value should
be "
                                     + rootNodeName);
@@ -133,7 +124,6 @@
                 }
             }
         }
-        addErrorMessage(errorPath + ": missing xml format body element");
-        return false;
+        return true;
     }
 }



Mime
View raw message