cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r950132 - in /cxf/branches/2.2.x-fixes: ./ rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/ systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/ systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_di...
Date Tue, 01 Jun 2010 16:00:15 GMT
Author: dkulp
Date: Tue Jun  1 16:00:15 2010
New Revision: 950132

URL: http://svn.apache.org/viewvc?rev=950132&view=rev
Log:
Merged revisions 949678 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r949678 | ema | 2010-05-31 03:30:15 -0400 (Mon, 31 May 2010) | 1 line
  
  [CXF-2834]:Check addressingDisabled property in Message before abort interceptorChain
........

Added:
    cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/resources/
      - copied from r949678, cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/resources/
    cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/resources/AddNumbersDispatchReq.xml
      - copied unchanged from r949678, cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/resources/AddNumbersDispatchReq.xml
Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
    cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java

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

Modified: cxf/branches/2.2.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java?rev=950132&r1=950131&r2=950132&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
Tue Jun  1 16:00:15 2010
@@ -778,7 +778,9 @@ public class MAPCodec extends AbstractSo
                 if (ContextUtils.retrieveDeferUncorrelatedMessageAbort(message)) {
                     LOG.fine("deferring uncorrelated message abort");
                     ContextUtils.storeDeferredUncorrelatedMessageAbort(message);
-                } else {
+                } else if (!MessageUtils.getContextualBoolean(message,
+                                          "org.apache.cxf.ws.addressing.MAPAggregator.addressingDisabled",
+                                          false)) {
                     LOG.log(Level.WARNING, "CORRELATION_FAILURE_MSG");
                     message.getInterceptorChain().abort();
                 }

Modified: cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java?rev=950132&r1=950131&r2=950132&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java
Tue Jun  1 16:00:15 2010
@@ -20,14 +20,20 @@
 package org.apache.cxf.systest.ws.addr_disable;
 
 import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
 import java.net.URL;
+
 import javax.xml.namespace.QName;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPMessage;
 import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Dispatch;
 import javax.xml.ws.soap.AddressingFeature;
 
 import org.apache.cxf.systest.ws.AbstractWSATestBase;
 import org.apache.cxf.systest.ws.addr_feature.AddNumbersPortType;
 import org.apache.cxf.systest.ws.addr_feature.AddNumbersService;
+
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -85,6 +91,28 @@ public class WSADisableTest extends Abst
         assertTrue(output.toString().indexOf(expectedOut) == -1);
         assertTrue(input.toString().indexOf(expectedIn) == -1);
     }
+    
+    
+    @Test
+    public void testDiaptchWithWsaDisable() throws Exception {
+
+        QName port = new QName("http://apache.org/cxf/systest/ws/addr_feature/", "AddNumbersPort");
+        Dispatch<SOAPMessage> disptch = getService().createDispatch(port, SOAPMessage.class,
+                                                                    javax.xml.ws.Service.Mode.MESSAGE,
+                                                                    new AddressingFeature(false));
+        ((BindingProvider)disptch).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+                                                           "http://localhost:9095/jaxws/add");
+
+        InputStream is = getClass().getResourceAsStream("resources/AddNumbersDispatchReq.xml");
+        SOAPMessage soapReqMsg = MessageFactory.newInstance().createMessage(null, is);
+        assertNotNull(soapReqMsg);
+        try {
+            disptch.invoke(soapReqMsg);
+            fail("The MAPcodec ate the SOAPFaultException");
+        } catch (javax.xml.ws.soap.SOAPFaultException e) {
+            //expected
+        }
+    }
 
     private AddNumbersService getService() {
         URL wsdl = getClass().getResource("/wsdl_systest_wsspec/add_numbers.wsdl");



Mime
View raw message