servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r780978 - /servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
Date Tue, 02 Jun 2009 09:11:36 GMT
Author: ffang
Date: Tue Jun  2 09:11:36 2009
New Revision: 780978

URL: http://svn.apache.org/viewvc?rev=780978&view=rev
Log:
[SMXCOMP-555]cxf bc provider should handle soap fault correctly with empty detail

Modified:
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java?rev=780978&r1=780977&r2=780978&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
Tue Jun  2 09:11:36 2009
@@ -222,7 +222,7 @@
         }
     }
 
-    private void handleJBIFault(SoapMessage message, Element soapFault) {
+    void handleJBIFault(SoapMessage message, Element soapFault) {
         Document doc = DomUtil.createDocument();
         Element jbiFault = DomUtil.createElement(doc, new QName(
                 JBIConstants.NS_JBI_BINDING, JBIFault.JBI_FAULT_ROOT));
@@ -236,7 +236,8 @@
             nodeList = soapFault.getElementsByTagName("faultstring");
             message.put("faultstring", nodeList.item(0).getFirstChild().getTextContent());
             nodeList = soapFault.getElementsByTagName("detail");
-            if (nodeList != null && nodeList.getLength() > 0) {
+            if (nodeList != null && nodeList.getLength() > 0 
+                    && nodeList.item(0).getFirstChild() != null) {
                 jbiFaultDetail = doc.importNode(nodeList.item(0).getFirstChild(), true);
             } else {
                 message.put("hasdetail", false);
@@ -253,7 +254,8 @@
             nodeList = soapFault.getElementsByTagName("soap:Reason");
             message.put("faultstring", nodeList.item(0).getFirstChild().getTextContent());
             nodeList = soapFault.getElementsByTagName("soap:Detail");
-            if (nodeList != null && nodeList.getLength() > 0) {
+            if (nodeList != null && nodeList.getLength() > 0
+                    && nodeList.item(0).getFirstChild() != null) {
                 jbiFaultDetail = doc.importNode(nodeList.item(0).getFirstChild(), true);
             } else {
                 message.put("hasdetail", false);



Mime
View raw message