cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1073334 - in /cxf/branches/2.3.x-fixes: ./ tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/ tool...
Date Tue, 22 Feb 2011 14:16:04 GMT
Author: ffang
Date: Tue Feb 22 14:16:04 2011
New Revision: 1073334

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

........
  r1073302 | ffang | 2011-02-22 19:53:56 +0800 (二, 22  2 2011) | 1 line
  
  [CXF-3353]can't refer to java.lang.Exception in gererated fault code
........

Added:
    cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf3353/
      - copied from r1073302, cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf3353/
    cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf3353/hello_world.wsdl
      - copied unchanged from r1073302, cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf3353/hello_world.wsdl
Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/FaultGenerator.java
    cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm
    cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java

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

Modified: cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/FaultGenerator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/FaultGenerator.java?rev=1073334&r1=1073333&r2=1073334&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/FaultGenerator.java
(original)
+++ cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/FaultGenerator.java
Tue Feb 22 14:16:04 2011
@@ -87,11 +87,16 @@ public class FaultGenerator extends Abst
                     setAttributes("suid", generateTimestampSUID());
                 }
                 setAttributes("expClass", expClz);
+                String exceptionSuperclass = "Exception";
                 for (JavaField jf : expClz.getFields()) {
+                    String jfClassName = jf.getClassName();
+                    if (jfClassName.substring(jfClassName.lastIndexOf(".") + 1).equals("Exception"))
{
+                        exceptionSuperclass = "java.lang.Exception";
+                    }
                     setAttributes("paraName", ProcessorUtil.mangleNameToVariableName(jf.getName()));
                 }
                 
-                String exceptionSuperclass = "Exception";
+                
                 if (expClz.getName().equals(exceptionSuperclass)) {
                     exceptionSuperclass = "java.lang.Exception";
                 }

Modified: cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm?rev=1073334&r1=1073333&r2=1073334&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm
(original)
+++ cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm
Tue Feb 22 14:16:04 2011
@@ -94,7 +94,7 @@ public class ${implName} implements $int
             ${method.return.writeDefaultValue(${out}, "            ", ${method.Name}, "_return")}
             return _return;
 #end
-        } catch (Exception ex) {
+        } catch (java.lang.Exception ex) {
             ex.printStackTrace();
             throw new RuntimeException(ex);
         }

Modified: cxf/branches/2.3.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.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?rev=1073334&r1=1073333&r2=1073334&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
(original)
+++ cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
Tue Feb 22 14:16:04 2011
@@ -1177,4 +1177,18 @@ public class CodeGenBugTest extends Abst
         assertEquals(classLoader.loadClass("org.apache.cxf.bugs3290.services.bug2.MyBugService"),
                      m.getReturnType());
     }
+    
+    @Test
+    public void testCXF3353() throws Exception {
+        try {
+            env.put(ToolConstants.CFG_COMPILE, "compile");
+            env.put(ToolConstants.CFG_OUTPUTDIR, output.getCanonicalPath());
+            env.put(ToolConstants.CFG_CLASSDIR, output.getCanonicalPath() + "/classes");
+            env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/cxf3353/hello_world.wsdl"));
+            processor.setContext(env);
+            processor.execute();
+        } catch (Exception e) {
+            fail("shouldn't get exception");
+        }
+    }
 }



Mime
View raw message