cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r792684 - /cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOptionLoader.java
Date Thu, 09 Jul 2009 20:54:11 GMT
Author: dkulp
Date: Thu Jul  9 20:54:11 2009
New Revision: 792684

URL: http://svn.apache.org/viewvc?rev=792684&view=rev
Log:
[CXF-2191] Support WSDL as wsdl extension in codegen plugin

Modified:
    cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOptionLoader.java

Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOptionLoader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOptionLoader.java?rev=792684&r1=792683&r2=792684&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOptionLoader.java
(original)
+++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOptionLoader.java
Thu Jul  9 20:54:11 2009
@@ -113,11 +113,17 @@
             }
 
             String wsdlName = wsdl.getName();
-            wsdlName = wsdlName.substring(0, wsdlName.indexOf(".wsdl"));
-            File options = getOptions(dir, wsdlName + WSDL_OPTIONS);
-            List<File> bindings = getBindingFiles(dir, wsdlName + WSDL_BINDINGS);
-
-            jobs.add(generateWsdlOption(wsdl, bindings, options, defaultOptions));
+            int idx = wsdlName.toLowerCase().lastIndexOf(".wsdl");
+            if (idx == -1) {
+                idx = wsdlName.lastIndexOf('.');
+            }
+            if (idx != -1) {
+                wsdlName = wsdlName.substring(0, idx);
+                File options = getOptions(dir, wsdlName + WSDL_OPTIONS);
+                List<File> bindings = getBindingFiles(dir, wsdlName + WSDL_BINDINGS);
+    
+                jobs.add(generateWsdlOption(wsdl, bindings, options, defaultOptions));
+            }
         }
         return jobs;
     }



Mime
View raw message