cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r821216 - in /cxf/trunk/tools: common/src/main/java/org/apache/cxf/tools/common/ common/src/main/java/org/apache/cxf/tools/util/ wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/ wsdlto/frontend/jaxws/src/m...
Date Sat, 03 Oct 2009 01:55:05 GMT
Author: dkulp
Date: Sat Oct  3 01:55:04 2009
New Revision: 821216

URL: http://svn.apache.org/viewvc?rev=821216&view=rev
Log:
[CXF-2431] If the wsdl doesn't have a targetnamespace defined, at least
try to do something and not NPE

Modified:
    cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolContext.java
    cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/URIParserUtil.java
    cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/InterfaceMapper.java

Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolContext.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolContext.java?rev=821216&r1=821215&r2=821216&view=diff
==============================================================================
--- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolContext.java (original)
+++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolContext.java Sat
Oct  3 01:55:04 2009
@@ -200,6 +200,9 @@
     }
 
     public String mapPackageName(String ns) {
+        if (ns == null) {
+            ns = "";
+        }
         if (hasNamespace(ns)) {
             return mapNamespaceToPackageName(ns);
         } else {

Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/URIParserUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/URIParserUtil.java?rev=821216&r1=821215&r2=821216&view=diff
==============================================================================
--- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/URIParserUtil.java (original)
+++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/URIParserUtil.java Sat
Oct  3 01:55:04 2009
@@ -90,7 +90,7 @@
 
         List<String> tokens = tokenize(nameSpaceURI, "/: ");
         if (tokens.size() == 0) {
-            return null;
+            return "cxf"; 
         }
 
         if (tokens.size() > 1) {

Modified: cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java?rev=821216&r1=821215&r2=821216&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
(original)
+++ cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Sat Oct  3 01:55:04 2009
@@ -481,7 +481,7 @@
         Collection<String> files = classCollector.getGeneratedFileInfo();
         for (String file : files) {
             int dotIndex = file.lastIndexOf(".");
-            String sub = dotIndex == -1 ? "" : file.substring(0, dotIndex - 1);
+            String sub = dotIndex <= 0 ? "" : file.substring(0, dotIndex - 1);
             if (sub.equals(packageName)) {
                 return true;
             }

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/InterfaceMapper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/InterfaceMapper.java?rev=821216&r1=821215&r2=821216&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/InterfaceMapper.java
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/InterfaceMapper.java
Sat Oct  3 01:55:04 2009
@@ -36,6 +36,7 @@
     public JavaInterface map(InterfaceInfo interfaceInfo) {
         JavaInterface intf = new JavaInterface();
         String namespace = interfaceInfo.getName().getNamespaceURI();
+
         String packageName = ProcessorUtil.parsePackageName(namespace, context.mapPackageName(namespace));
         
         String loc = (String)context.get(ToolConstants.CFG_WSDLLOCATION);



Mime
View raw message