servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r706116 - in /servicemix/components/bindings/servicemix-cxf-bc/trunk/src: main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java test/java/org/apache/servicemix/cxfbc/CxfBcHttpJmsBridgeMtomTest.java
Date Mon, 20 Oct 2008 03:56:41 GMT
Author: ffang
Date: Sun Oct 19 20:56:41 2008
New Revision: 706116

URL: http://svn.apache.org/viewvc?rev=706116&view=rev
Log:
[SM-1637] smx-cxf-bc provider throws NPE at JbiInWsdl1Interceptor.handleJBIFault

Modified:
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcHttpJmsBridgeMtomTest.java

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=706116&r1=706115&r2=706116&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
Sun Oct 19 20:56:41 2008
@@ -653,11 +653,12 @@
                         f = new JbiFault(
                                 new org.apache.cxf.common.i18n.Message(
                                         "Fault occured", (ResourceBundle) null));
-                        Element details = toElement(exchange.getFault()
-                                .getContent());
-                        f.setDetail(details);
                         if (exchange.getProperty("faultstring") != null) {
                             f.setMessage((String)exchange.getProperty("faultstring"));
+                        } else {
+                            Element details = toElement(exchange.getFault()
+                                .getContent());
+                            f.setDetail(details);
                         }
 
                         
@@ -733,6 +734,9 @@
 
         // this method is used for ws-policy to set BindingFaultInfo
         protected void processFaultDetail(Fault fault, Message msg) {
+            if (fault.getDetail() == null) {
+                return;
+            }
             Element exDetail = (Element) DOMUtils.getChild(fault.getDetail(),
                     Node.ELEMENT_NODE);
             if (exDetail == null) {

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcHttpJmsBridgeMtomTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcHttpJmsBridgeMtomTest.java?rev=706116&r1=706115&r2=706116&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcHttpJmsBridgeMtomTest.java
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcHttpJmsBridgeMtomTest.java
Sun Oct 19 20:56:41 2008
@@ -153,7 +153,7 @@
             mtomPort.testXop(name, param);
             fail("should catch RuntimeException");
         } catch (RuntimeException ex) {
-            //
+            assertEquals("throw runtime exception", ex.getMessage());
         }
 
     }



Mime
View raw message