cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1182811 - in /cxf/branches/2.3.x-fixes: ./ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/core/src/main/java/org/apache/cxf/interceptor/ systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/deta...
Date Thu, 13 Oct 2011 12:44:43 GMT
Author: ningjiang
Date: Thu Oct 13 12:44:43 2011
New Revision: 1182811

URL: http://svn.apache.org/viewvc?rev=1182811&view=rev
Log:
Merged revisions 1182747,1182789 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.4.x-fixes

................
  r1182747 | ningjiang | 2011-10-13 17:50:04 +0800 (Thu, 13 Oct 2011) | 9 lines
  
  Merged revisions 1182717 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1182717 | ningjiang | 2011-10-13 16:32:10 +0800 (Thu, 13 Oct 2011) | 1 line
    
    CXF-3736 clean up the codes
  ........
................
  r1182789 | ningjiang | 2011-10-13 19:27:42 +0800 (Thu, 13 Oct 2011) | 9 lines
  
  Merged revisions 1182752 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1182752 | ningjiang | 2011-10-13 18:07:40 +0800 (Thu, 13 Oct 2011) | 1 line
    
    CXF-3736 polished the code of caused by message
  ........
................

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor.java
    cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java
    cxf/branches/2.3.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/details/Soap11ClientServerTest.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Oct 13 12:44:43 2011
@@ -1,2 +1,2 @@
-/cxf/branches/2.4.x-fixes:1179850,1180650,1180655,1181613,1182639,1182730
-/cxf/trunk:1179846,1180649,1180653,1181611,1182637,1182716
+/cxf/branches/2.4.x-fixes:1179850,1180650,1180655,1181613,1182639,1182730,1182747-1182789
+/cxf/trunk:1179846,1180649,1180653,1181611,1182637,1182716-1182717,1182752

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

Modified: cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor.java?rev=1182811&r1=1182810&r2=1182811&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor.java
Thu Oct 13 12:44:43 2011
@@ -79,13 +79,14 @@ public abstract class AbstractSoapInterc
             StringBuilder sb = new StringBuilder();
             Throwable throwable = fault.getCause();
             while (throwable != null) {
-                for (StackTraceElement ste : fault.getCause().getStackTrace()) {
+                for (StackTraceElement ste : throwable.getStackTrace()) {
                     sb.append(ste.getClassName() + "!" + ste.getMethodName() + "!" + ste.getFileName()
+ "!"
                           + ste.getLineNumber() + "\n");
                 }
                 throwable = throwable.getCause();
                 if (throwable != null) {
-                    sb.append("Caused by:" +  throwable.getClass() + ":" + throwable.getMessage()
+ " ");
+                    sb.append("Caused by: " +  throwable.getClass().getCanonicalName() 
+                              + " : " + throwable.getMessage() + "\n");
                 }
             }
             Element detail = fault.getDetail();

Modified: cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java?rev=1182811&r1=1182810&r2=1182811&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java
Thu Oct 13 12:44:43 2011
@@ -243,6 +243,11 @@ public class ClientFaultConverter extend
             StringTokenizer st = new StringTokenizer(ss, "\n");
             while (st.hasMoreTokens()) {
                 String oneLine = st.nextToken();
+                if (oneLine.startsWith("Caused by:")) {
+                    // need to skip this part of message,
+                    // as we can't create the cause exception instance directly. 
+                    break;
+                }
                 StringTokenizer stInner = new StringTokenizer(oneLine, "!");
                 StackTraceElement ste = new StackTraceElement(stInner.nextToken(), stInner.nextToken(),
                         stInner.nextToken(), Integer.parseInt(stInner.nextToken()));

Modified: cxf/branches/2.3.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/details/Soap11ClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/details/Soap11ClientServerTest.java?rev=1182811&r1=1182810&r2=1182811&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/details/Soap11ClientServerTest.java
(original)
+++ cxf/branches/2.3.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapfault/details/Soap11ClientServerTest.java
Thu Oct 13 12:44:43 2011
@@ -24,14 +24,12 @@ import java.net.MalformedURLException;
 
 import javax.xml.ws.soap.SOAPFaultException;
 
-
 import org.apache.cxf.greeter_control.Greeter;
 import org.apache.cxf.greeter_control.GreeterService;
 import org.apache.cxf.greeter_control.PingMeFault;
 import org.apache.cxf.greeter_control.types.FaultDetail;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 
-
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -55,15 +53,6 @@ public class Soap11ClientServerTest exte
             StackTraceElement[] elements = ex.getCause().getStackTrace();
             assertEquals("org.apache.cxf.systest.soapfault.details.GreeterImpl11", 
                          elements[0].getClassName());
-            ex.printStackTrace();
-            boolean findNPE = false;
-            for (StackTraceElement element : elements) {
-                if (element.getClassName().indexOf("java.lang.NullPointerException") >
0) {
-                    findNPE = true;
-                    break;
-                }
-            }
-            assertTrue("Cannot find the Cause of NPE", findNPE);
         } 
     }
     



Mime
View raw message