cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r933086 - in /cxf/trunk: common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java tools/wsdlto/frontend/javascript/src/test/java/org/apache/cxf/tools/wsdlto/javascript/WSDLToJavaScriptTest.java
Date Mon, 12 Apr 2010 03:55:55 GMT
Author: dkulp
Date: Mon Apr 12 03:55:55 2010
New Revision: 933086

URL: http://svn.apache.org/viewvc?rev=933086&view=rev
Log:
[CXF-2731] Add a NPE guard in wsdl2js

Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
    cxf/trunk/tools/wsdlto/frontend/javascript/src/test/java/org/apache/cxf/tools/wsdlto/javascript/WSDLToJavaScriptTest.java

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java?rev=933086&r1=933085&r2=933086&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
(original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
Mon Apr 12 03:55:55 2010
@@ -215,7 +215,7 @@ public class SchemaCollection {
      */
     public XmlSchema getSchemaByTargetNamespace(String namespaceURI) {
         for (XmlSchema schema : schemaCollection.getXmlSchemas()) {
-            if (schema.getTargetNamespace().equals(namespaceURI)) {
+            if (namespaceURI.equals(schema.getTargetNamespace())) {
                 return schema;
             }
         }

Modified: cxf/trunk/tools/wsdlto/frontend/javascript/src/test/java/org/apache/cxf/tools/wsdlto/javascript/WSDLToJavaScriptTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/javascript/src/test/java/org/apache/cxf/tools/wsdlto/javascript/WSDLToJavaScriptTest.java?rev=933086&r1=933085&r2=933086&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/javascript/src/test/java/org/apache/cxf/tools/wsdlto/javascript/WSDLToJavaScriptTest.java
(original)
+++ cxf/trunk/tools/wsdlto/frontend/javascript/src/test/java/org/apache/cxf/tools/wsdlto/javascript/WSDLToJavaScriptTest.java
Mon Apr 12 03:55:55 2010
@@ -53,4 +53,16 @@ public class WSDLToJavaScriptTest extend
         String javascript = IOUtils.readStringFromStream(fis);
         assertTrue(javascript.contains("xmlns:murble='http://apache.org/hello_world_soap_http'"));
     }
+    
+    // just run with a minimum of fuss.
+    @Test
+    public void testGeneration2() throws Exception {
+        JavaScriptContainer container = new JavaScriptContainer(null);
+
+        ToolContext context = new ToolContext();
+        context.put(ToolConstants.CFG_WSDLURL, "/tmp/tmp.wsdl");
+        context.put(ToolConstants.CFG_OUTPUTDIR, output.toString()); 
+        container.setContext(context); 
+        container.execute();
+    }
 }



Mime
View raw message