Author: ffang
Date: Wed Aug  8 08:44:32 2012
New Revision: 1370704

URL: http://svn.apache.org/viewvc?rev=1370704&view=rev
Log:
Merged revisions 1370687 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1370687 | ffang | 2012-08-08 15:55:42 +0800 (δΈ‰, 08  8 2012) | 1 line
  
  [CXF-4452]NullPointerException when trying to customize the package name for 
a service definition without customizing the class name.
........

Added:
    
cxf/branches/2.6.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf4452/
      - copied from r1370687, 
cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf4452/
    
cxf/branches/2.6.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf4452/binding.xml
      - copied unchanged from r1370687, 
cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf4452/binding.xml
Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    
cxf/branches/2.6.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
    
cxf/branches/2.6.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1370687

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: 
cxf/branches/2.6.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java?rev=1370704&r1=1370703&r2=1370704&view=diff
==============================================================================
--- 
cxf/branches/2.6.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
 (original)
+++ 
cxf/branches/2.6.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
 Wed Aug  8 08:44:32 2012
@@ -204,7 +204,8 @@ public class ServiceProcessor extends Ab
                         name = name.substring(name.lastIndexOf('.') + 1);
                     }
                 }
-                if (serviceBinding2.getJaxwsClass().getComments() != null) {
+                if (serviceBinding2.getJaxwsClass() != null
+                    && serviceBinding2.getJaxwsClass().getComments() != null) {
                     
jaxwsBinding.setClassJavaDoc(serviceBinding2.getJaxwsClass().getComments());
                 }
                 if (!serviceBinding2.getPackageJavaDoc().equals("")) {

Modified: 
cxf/branches/2.6.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.6.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?rev=1370704&r1=1370703&r2=1370704&view=diff
==============================================================================
--- 
cxf/branches/2.6.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
 (original)
+++ 
cxf/branches/2.6.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
 Wed Aug  8 08:44:32 2012
@@ -1176,4 +1176,16 @@ public class CodeGenBugTest extends Abst
             fail("shouldn't get exception");
         }
     }
+    
+    @Test
+    public void testCXF4452() throws Exception {
+        try {
+            env.put(ToolConstants.CFG_WSDLURL, 
getLocation("/wsdl2java_wsdl/hello_world.wsdl"));
+            env.put(ToolConstants.CFG_BINDING, 
getLocation("/wsdl2java_wsdl/cxf4452/binding.xml"));
+            processor.setContext(env);
+            processor.execute();
+        } catch (Exception e) {
+            fail("shouldn't get exception");
+        }
+    }
 }


Reply via email to