cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1044369 - in /cxf/branches/2.3.x-fixes/rt/ws/addr/src: main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java
Date Fri, 10 Dec 2010 14:19:02 GMT
Author: ema
Date: Fri Dec 10 14:19:02 2010
New Revision: 1044369

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

........
  r1044361 | ema | 2010-12-10 22:07:27 +0800 (Fri, 10 Dec 2010) | 1 line
  
  [CXF-3181]:Responder supports the inbound soap message with wsa MessageID and RelatesTo
headers
........

Modified:
    cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
    cxf/branches/2.3.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java

Modified: cxf/branches/2.3.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.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java?rev=1044369&r1=1044368&r2=1044369&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
Fri Dec 10 14:19:02 2010
@@ -796,7 +796,7 @@ public class MAPCodec extends AbstractSo
                 synchronized (correlatedExchange) {
                     message.setExchange(correlatedExchange);
                 }
-            } else {
+            } else if (ContextUtils.isRequestor(message) && !message.getExchange().isOneWay())
{
                 if (ContextUtils.retrieveDeferUncorrelatedMessageAbort(message)) {
                     LOG.fine("deferring uncorrelated message abort");
                     ContextUtils.storeDeferredUncorrelatedMessageAbort(message);

Modified: cxf/branches/2.3.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java?rev=1044369&r1=1044368&r2=1044369&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java
Fri Dec 10 14:19:02 2010
@@ -190,6 +190,19 @@ public class MAPCodecTest extends Assert
     }
 
     @Test
+    public void testResponderInboundWithRelatesTo() throws Exception {
+        SoapMessage message = setUpMessage(false, false, false, false, Boolean.TRUE,
+                                           Names.WSA_NAMESPACE_NAME);
+        //empty the uncorrelatedExchanges in responder
+        for (String key : codec.uncorrelatedExchanges.keySet()) {
+            codec.uncorrelatedExchanges.remove(key);
+        }
+        codec.handleMessage(message);
+        control.verify();
+        verifyMessage(message, false, false, false);
+    }
+
+    @Test
     public void testResponderInboundNonNative() throws Exception {
         String uri = VersionTransformer.Names200408.WSA_NAMESPACE_NAME;
         SoapMessage message = setUpMessage(false, false, false, false, uri);
@@ -281,9 +294,16 @@ public class MAPCodecTest extends Assert
 
     private SoapMessage setUpMessage(boolean requestor, boolean outbound, boolean invalidMAP,
                                      boolean preExistingSOAPAction, String exposeAs) throws
Exception {
+        return setUpMessage(requestor, outbound, invalidMAP, preExistingSOAPAction, null,
exposeAs);
+    }
+    
+    private SoapMessage setUpMessage(boolean requestor, boolean outbound, boolean invalidMAP,
+                                     boolean preExistingSOAPAction, Boolean generateRelatesTo,

+                                     String exposeAs) throws Exception {
         SoapMessage message = new SoapMessage(new MessageImpl());
         setUpOutbound(message, outbound);
-        expectRelatesTo = (requestor && !outbound) || (!requestor && outbound);
+        expectRelatesTo = generateRelatesTo != null ? generateRelatesTo 
+            : (requestor && !outbound) || (!requestor && outbound);
         message.put(REQUESTOR_ROLE, Boolean.valueOf(requestor));
         String mapProperty = getMAPProperty(requestor, outbound);
         AddressingPropertiesImpl maps = getMAPs(requestor, outbound, exposeAs);



Mime
View raw message