Author: ruwan
Date: Fri Dec  3 05:37:17 2010
New Revision: 1041700

URL: http://svn.apache.org/viewvc?rev=1041700&view=rev
Log:
Fixing the issue SYNAPSE-393

Modified:
    
synapse/branches/2.0/modules/core/src/main/java/org/apache/synapse/core/axis2/SOAPUtils.java

Modified: 
synapse/branches/2.0/modules/core/src/main/java/org/apache/synapse/core/axis2/SOAPUtils.java
URL: 
http://svn.apache.org/viewvc/synapse/branches/2.0/modules/core/src/main/java/org/apache/synapse/core/axis2/SOAPUtils.java?rev=1041700&r1=1041699&r2=1041700&view=diff
==============================================================================
--- 
synapse/branches/2.0/modules/core/src/main/java/org/apache/synapse/core/axis2/SOAPUtils.java
 (original)
+++ 
synapse/branches/2.0/modules/core/src/main/java/org/apache/synapse/core/axis2/SOAPUtils.java
 Fri Dec  3 05:37:17 2010
@@ -21,6 +21,7 @@ package org.apache.synapse.core.axis2;
 
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.soap.*;
 import org.apache.axis2.AxisFault;
@@ -191,6 +192,18 @@ public class SOAPUtils {
                         newSOAPFault.setReason(newSOAPFaultReason);
                     }
 
+                    SOAPFaultDetail detail = soapFault.getDetail();
+                    if(detail != null) {
+                        SOAPFaultDetail newSOAPFaultDetail
+                                = 
soap12Factory.createSOAPFaultDetail(newSOAPFault);
+                        Iterator<OMElement> iter = 
detail.getAllDetailEntries();
+                        while (iter.hasNext()) {
+                          OMElement detailEntry = iter.next();
+                          newSOAPFaultDetail.addDetailEntry(detailEntry);
+                        }
+                         newSOAPFault.setDetail(newSOAPFaultDetail);
+                    }
+
                 } else {
                     newEnvelope.getBody().addChild(omNode);
 
@@ -321,6 +334,19 @@ public class SOAPUtils {
                         newSOAPFaultReason.setText(soapFaultText.getText());
                     }
                 }
+
+                SOAPFaultDetail detail = soapFault.getDetail();
+                if(detail != null) {
+                    SOAPFaultDetail newSOAPFaultDetail
+                            = 
soap11Factory.createSOAPFaultDetail(newSOAPFault);
+                    Iterator<OMElement> iter = detail.getAllDetailEntries();
+                    while (iter.hasNext()) {
+                        OMElement detailEntry = iter.next();
+                        newSOAPFaultDetail.addDetailEntry(detailEntry);
+                    }
+                    newSOAPFault.setDetail(newSOAPFaultDetail);
+                }
+
             } else {
                 Iterator itr = clonedOldEnv.getBody().getChildren();
                 while (itr.hasNext()) {


Reply via email to