cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1310458 - in /cxf/branches/2.4.x-fixes: ./ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptorTest.java
Date Fri, 06 Apr 2012 16:35:39 GMT
Author: dkulp
Date: Fri Apr  6 16:35:38 2012
New Revision: 1310458

URL: http://svn.apache.org/viewvc?rev=1310458&view=rev
Log:
Merged revisions 1307441 via  svn merge from
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

........
  r1307441 | dkulp | 2012-03-30 10:26:10 -0400 (Fri, 30 Mar 2012) | 9 lines
  
  Merged revisions 1307403 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1307403 | dkulp | 2012-03-30 09:27:33 -0400 (Fri, 30 Mar 2012) | 2 lines
  
    [CXF-4181] Fix for SAAJ + SOAP 1.2 fault...
  
  ........
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java
    cxf/branches/2.4.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptorTest.java

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

Modified: cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java?rev=1310458&r1=1310457&r2=1310458&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java
Fri Apr  6 16:35:38 2012
@@ -226,12 +226,11 @@ public class SAAJInInterceptor extends A
             
 
             if (hasFault(message, xmlReader)) {
-                SOAPFault soapFault = 
-                    soapMessage.getSOAPPart().getEnvelope().getBody().addFault();
                 SoapFault fault = 
                     message.getVersion() instanceof Soap11 
                     ? Soap11FaultInInterceptor.unmarshalFault(message, xmlReader)
                     : Soap12FaultInInterceptor.unmarshalFault(message, xmlReader);
+<<<<<<< HEAD
                 if (fault.getFaultCode() != null) {
                     soapFault.setFaultCode(fault.getFaultCode());
                 }
@@ -243,21 +242,40 @@ public class SAAJInInterceptor extends A
                 }
                 if (fault.getDetail() != null
                     && fault.getDetail().getFirstChild() != null) {
+=======
+>>>>>>> 941b6cf... [CXF-4181] Fix for SAAJ + SOAP 1.2 fault...
                     
-                    Detail detail = null;
-                    Node child = fault.getDetail().getFirstChild();
-                    while (child != null) {
-                        if (Node.ELEMENT_NODE == child.getNodeType()) {
-                            if (detail == null) {
-                                detail = soapFault.addDetail();
+                SOAPFault soapFault = 
+                    soapMessage.getSOAPPart().getEnvelope().getBody().getFault();
+                if (soapFault == null) {
+                    soapFault = 
+                        soapMessage.getSOAPPart().getEnvelope().getBody().addFault();
+                    if (fault.getFaultCode() != null) {
+                        SAAJUtils.setFaultCode(soapFault, fault.getFaultCode());
+                    }
+                    if (fault.getMessage() != null) {
+                        soapFault.setFaultString(fault.getMessage());
+                    }
+                    if (fault.getRole() != null) {
+                        soapFault.setFaultActor(fault.getRole());
+                    }
+                    if (fault.getDetail() != null
+                        && fault.getDetail().getFirstChild() != null) {
+                        
+                        Detail detail = null;
+                        Node child = fault.getDetail().getFirstChild();
+                        if (child != null) {
+                            detail = soapFault.addDetail();
+                        }
+                        while (child != null) {
+                            if (Node.ELEMENT_NODE == child.getNodeType()) {
+                                Node importedChild = soapMessage.getSOAPPart().importNode(child,
true);
+                                detail.appendChild(importedChild);
                             }
-                            Node importedChild = soapMessage.getSOAPPart().importNode(child,
true);
-                            detail.appendChild(importedChild);
+                            child = child.getNextSibling();
                         }
-                        child = child.getNextSibling();
                     }
                 }
-
                 DOMSource bodySource = new DOMSource(soapFault);
                 xmlReader = StaxUtils.createXMLStreamReader(bodySource);
             } else { 

Modified: cxf/branches/2.4.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptorTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptorTest.java?rev=1310458&r1=1310457&r2=1310458&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptorTest.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptorTest.java
Fri Apr  6 16:35:38 2012
@@ -45,7 +45,6 @@ import org.apache.cxf.binding.soap.inter
 import org.apache.cxf.headers.Header;
 import org.apache.cxf.interceptor.StaxInInterceptor;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 
 
@@ -141,7 +140,6 @@ public class SAAJInInterceptorTest exten
     }
     
     @Test
-    @Ignore
     public void testFaultDetailSOAP12() throws Exception {
         try {
             prepareSoapMessage("../test-soap-12-fault-detail.xml");



Mime
View raw message