Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 81399 invoked from network); 26 Aug 2008 15:59:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Aug 2008 15:59:24 -0000 Received: (qmail 75929 invoked by uid 500); 26 Aug 2008 15:59:22 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 75879 invoked by uid 500); 26 Aug 2008 15:59: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 75870 invoked by uid 99); 26 Aug 2008 15:59:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Aug 2008 08:59: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; Tue, 26 Aug 2008 15:58:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B3F19238899E; Tue, 26 Aug 2008 08:59:03 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r689122 - in /cxf/branches/2.1.x-fixes: ./ tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/ tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1694/ Date: Tue, 26 Aug 2008 15:59:03 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080826155903.B3F19238899E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Tue Aug 26 08:59:02 2008 New Revision: 689122 URL: http://svn.apache.org/viewvc?rev=689122&view=rev Log: Merged revisions 688735 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r688735 | seanoc | 2008-08-25 10:25:49 -0400 (Mon, 25 Aug 2008) | 2 lines Fix for https://issues.apache.org/jira/browse/CXF-1694 NPE with invalid wsld:impor ........ Added: cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1694/ - copied from r688735, cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1694/ cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1694/child.wsdl - copied unchanged from r688735, cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1694/child.wsdl cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1694/test.wsdl - copied unchanged from r688735, cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1694/test.wsdl Modified: cxf/branches/2.1.x-fixes/ (props changed) cxf/branches/2.1.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java Propchange: cxf/branches/2.1.x-fixes/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Aug 26 08:59:02 2008 @@ -1 +1 @@ -/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596 +/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735 Propchange: cxf/branches/2.1.x-fixes/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Tue Aug 26 08:59:02 2008 @@ -1 +1 @@ -/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596 +/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735 Modified: cxf/branches/2.1.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java?rev=689122&r1=689121&r2=689122&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java (original) +++ cxf/branches/2.1.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java Tue Aug 26 08:59:02 2008 @@ -247,7 +247,7 @@ vNode.getPlainText())); } } - } catch (ToolException e) { + } catch (Exception e) { this.vResults.addError(e.getMessage()); return false; } @@ -393,7 +393,7 @@ } @SuppressWarnings("unchecked") - private void collectValidationPoints() { + private void collectValidationPoints() throws Exception { if (services.size() == 0) { LOG.log(Level.WARNING, "WSDL document " + this.definition.getDocumentBaseURI() + " does not define any services"); @@ -407,7 +407,7 @@ collectValidationPointsForMessages(); } - private void collectValidationPointsForBindings() { + private void collectValidationPointsForBindings() throws Exception { Map vBindingNodes = new HashMap(); for (Service service : services.values()) { vBindingNodes.putAll(getBindings(service)); @@ -415,6 +415,12 @@ for (QName bName : vBindingNodes.keySet()) { Binding binding = this.definition.getBinding(bName); + if (binding == null) { + LOG.log(Level.SEVERE, bName.toString() + + " is not correct, please check that the correct namespace is being used"); + throw new Exception(bName.toString() + + " is not correct, please check that the correct namespace is being used"); + } XNode vBindingNode = getXNode(binding); vBindingNode.setFailurePoint(vBindingNodes.get(bName)); vNodes.add(vBindingNode); Modified: cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?rev=689122&r1=689121&r2=689122&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java (original) +++ cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java Tue Aug 26 08:59:02 2008 @@ -1041,5 +1041,18 @@ assertEquals("GreeterSOAPService", webServiceAnn.serviceName()); assertEquals("PingSoapPort", webServiceAnn.portName()); } + + + @Test + public void testCXF1694() throws Exception { + + try { + env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/cxf1694/test.wsdl")); + processor.setContext(env); + processor.execute(); + } catch (Exception ex) { + assertTrue(ex.getMessage().contains("{http://child/}Binding is not correct")); + } + } }