You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/04/06 18:33:43 UTC

svn commit: r1310453 - in /cxf/branches/2.4.x-fixes: ./ rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptorTest.java rt/bindings/soap/src/test/resources/org/apache/cxf/binding/soap/test-soap-12-fault-detail.xml

Author: dkulp
Date: Fri Apr  6 16:33:42 2012
New Revision: 1310453

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

........
  r1307318 | asoldano | 2012-03-30 04:56:49 -0400 (Fri, 30 Mar 2012) | 2 lines
  
  [CXF-4181] Adding (excluded) test reproducing regression with SOAP12 faults
  
........

Added:
    cxf/branches/2.4.x-fixes/rt/bindings/soap/src/test/resources/org/apache/cxf/binding/soap/test-soap-12-fault-detail.xml
      - copied unchanged from r1307318, cxf/branches/2.5.x-fixes/rt/bindings/soap/src/test/resources/org/apache/cxf/binding/soap/test-soap-12-fault-detail.xml
Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    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/
            ('svn:mergeinfo' removed)

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/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=1310453&r1=1310452&r2=1310453&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:33:42 2012
@@ -45,6 +45,7 @@ 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;
 
 
@@ -139,6 +140,32 @@ public class SAAJInInterceptorTest exten
         
     }
     
+    @Test
+    @Ignore
+    public void testFaultDetailSOAP12() throws Exception {
+        try {
+            prepareSoapMessage("../test-soap-12-fault-detail.xml");
+        } catch (IOException ioe) {
+            fail("Failed in creating soap message");
+        }
+
+        staxIntc.handleMessage(soapMessage);
+        rhi.handleMessage(soapMessage);
+        sbi.handleMessage(soapMessage);
+
+        // check the xmlReader should be placed on the first entry of the body
+        // element
+        XMLStreamReader xmlReader = soapMessage.getContent(XMLStreamReader.class);
+        xmlReader.nextTag();
+        saajIntc.handleMessage(soapMessage);
+        
+        SOAPMessage parsedMessage = soapMessage.getContent(SOAPMessage.class);
+        SOAPFault fault = parsedMessage.getSOAPBody().getFault();
+        assertEquals("Simulated failure", fault.getFaultReasonTexts().next());
+        assertEquals("soap:Receiver", fault.getFaultCode());
+        
+    }
+    
 
     private void prepareSoapMessage(String message) throws IOException {