Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 64688 invoked from network); 10 Jul 2008 16:47:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jul 2008 16:47:22 -0000 Received: (qmail 72790 invoked by uid 500); 10 Jul 2008 16:47:22 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 72670 invoked by uid 500); 10 Jul 2008 16:47:22 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 72661 invoked by uid 99); 10 Jul 2008 16:47:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jul 2008 09:47:22 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jul 2008 16:46:38 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E28AD2388A11; Thu, 10 Jul 2008 09:47:00 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080710164700.E28AD2388A11@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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; } }