cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
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 GMT
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<QName, XNode> vBindingNodes = new HashMap<QName, XNode>();
         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"));
+        }
+    }
     
 }



Mime
View raw message