cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1497433 - in /cxf/branches/2.7.x-fixes: ./ parent/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/ rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/context/
Date Thu, 27 Jun 2013 16:39:42 GMT
Author: ay
Date: Thu Jun 27 16:39:42 2013
New Revision: 1497433

URL: http://svn.apache.org/r1497433
Log:
Merged revisions 1497340 via  svn merge from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1497340 | ay | 2013-06-27 15:12:22 +0200 (Thu, 27 Jun 2013) | 1 line
  
  [CXF-5095] Allow adding attachments to the context using jaxws attachments
........

Added:
    cxf/branches/2.7.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedAttachments.java
      - copied unchanged from r1497340, cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedAttachments.java
    cxf/branches/2.7.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/context/WrappedMessageContextTest.java
      - copied unchanged from r1497340, cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/context/WrappedMessageContextTest.java
Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/parent/pom.xml
    cxf/branches/2.7.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java

Propchange: cxf/branches/2.7.x-fixes/
            ('svn:mergeinfo' removed)

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

Modified: cxf/branches/2.7.x-fixes/parent/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/parent/pom.xml?rev=1497433&r1=1497432&r2=1497433&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/parent/pom.xml (original)
+++ cxf/branches/2.7.x-fixes/parent/pom.xml Thu Jun 27 16:39:42 2013
@@ -93,8 +93,8 @@
         <cxf.commons-collections.version>3.2.1</cxf.commons-collections.version>
         <cxf.commons-lang.version>2.6</cxf.commons-lang.version>
         <cxf.derby.version>10.2.2.0</cxf.derby.version>
-        <cxf.ehcache.version>2.5.1</cxf.ehcache.version>
-        <cxf.ehcache.bundle.version>2.5.1_1</cxf.ehcache.bundle.version>
+        <cxf.ehcache.version>2.6.6</cxf.ehcache.version>
+        <cxf.ehcache.bundle.version>2.6.6_1</cxf.ehcache.bundle.version>
         <cxf.fastinfoset.bundle.version>1.2.7_4</cxf.fastinfoset.bundle.version>
         <cxf.hazelcast.version>1.9.4</cxf.hazelcast.version>
         <cxf.httpcomponents.asyncclient.version>4.0-beta3</cxf.httpcomponents.asyncclient.version>

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java?rev=1497433&r1=1497432&r2=1497433&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
Thu Jun 27 16:39:42 2013
@@ -358,11 +358,15 @@ public class WrappedMessageContext imple
             return null;
         }
         Collection<Attachment> attachments = CastUtils.cast((Collection<?>)mc.get(Message.ATTACHMENTS));
-        Map<String, DataHandler> dataHandlers = 
-            AttachmentUtil.getDHMap(attachments);
-        mc.put(propertyName, 
-               dataHandlers);
-        scopes.put(propertyName, Scope.APPLICATION);
+        Map<String, DataHandler> dataHandlers;
+        if (attachments instanceof WrappedAttachments) {
+            dataHandlers = ((WrappedAttachments) attachments).getAttachments();
+        } else {
+            dataHandlers = AttachmentUtil.getDHMap(attachments);
+            mc.put(propertyName, 
+                   dataHandlers);
+            scopes.put(propertyName, Scope.APPLICATION);
+        }
         return dataHandlers;
     }    
         
@@ -416,7 +420,6 @@ public class WrappedMessageContext imple
         Object ret = null;
         if ((MessageContext.HTTP_RESPONSE_HEADERS.equals(key)
             || MessageContext.HTTP_RESPONSE_CODE.equals(key)
-            || MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS.equals(key)
             || MessageContext.HTTP_RESPONSE_CODE.equals(key))
             && !isResponse() && !isRequestor()) { 
             Message tmp = createResponseMessage();
@@ -447,6 +450,9 @@ public class WrappedMessageContext imple
             authPolicy.setPassword((String)value);
         } else if (MessageContext.HTTP_REQUEST_HEADERS.equals(key)) {
             ret = message.put(Message.PROTOCOL_HEADERS, value);
+        } else if (MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS.equals(key)) {
+            Map<String, DataHandler> attachments = CastUtils.cast((Map<?, ?>)value);
+            ret = message.put(Message.ATTACHMENTS, new WrappedAttachments(attachments));
         } else if (SoapBindingConstants.SOAP_ACTION.equals(mappedKey)
             && !isRequestor() && exchange != null) {
             Message tmp = createResponseMessage();



Mime
View raw message