cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r689147 - in /cxf/branches/2.0.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 17:32:35 GMT
Author: dkulp
Date: Tue Aug 26 10:32:34 2008
New Revision: 689147

URL: http://svn.apache.org/viewvc?rev=689147&view=rev
Log:
Merged revisions 689122 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.1.x-fixes

................
  r689122 | dkulp | 2008-08-26 11:59:02 -0400 (Tue, 26 Aug 2008) | 10 lines
  
  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.0.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1694/
      - copied from r689122, cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1694/
    cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1694/child.wsdl
      - copied unchanged from r689122, cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1694/child.wsdl
    cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1694/test.wsdl
      - copied unchanged from r689122, cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1694/test.wsdl
Modified:
    cxf/branches/2.0.x-fixes/   (props changed)
    cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
    cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 26 10:32:34 2008
@@ -1,3 +1,3 @@
-/cxf/branches/2.1.x-fixes:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653,677048,677385,678004,678009,678559,678629,678808,678852,678891,678893,679248,679597,680435,681060,681165,681813,681816,682902,682951,683089,683290,683318,684099,684790-684793,684842,684862,684895-684918,685205,685253,686237,686283,686299,686333-686364,686765,686827,687097,687464-687465,689109,689112
-/cxf/trunk:651669-686342,686344-686363,686764,686820,687096,687387,687463,688086,688102
+/cxf/branches/2.1.x-fixes:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653,677048,677385,678004,678009,678559,678629,678808,678852,678891,678893,679248,679597,680435,681060,681165,681813,681816,682902,682951,683089,683290,683318,684099,684790-684793,684842,684862,684895-684918,685205,685253,686237,686283,686299,686333-686364,686765,686827,687097,687464-687465,689109,689112,689122
+/cxf/trunk:651669-686342,686344-686363,686764,686820,687096,687387,687463,688086,688102,688735
 /incubator/cxf/trunk:434594-651668

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Aug 26 10:32:34 2008
@@ -1 +1 @@
-/cxf/branches/2.1.x-fixes:1-686313,686315-686332,686334-686346,686348-686828,687097,687464-687465,689109,689112
+/cxf/branches/2.1.x-fixes:1-686313,686315-686332,686334-686346,686348-686828,687097,687464-687465,689109,689112,689122

Modified: cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java?rev=689147&r1=689146&r2=689147&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
(original)
+++ cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
Tue Aug 26 10:32:34 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.0.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.0.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?rev=689147&r1=689146&r2=689147&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
(original)
+++ cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
Tue Aug 26 10:32:34 2008
@@ -976,5 +976,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