cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r796013 - /cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
Date Mon, 20 Jul 2009 21:15:19 GMT
Author: dkulp
Date: Mon Jul 20 21:15:16 2009
New Revision: 796013

URL: http://svn.apache.org/viewvc?rev=796013&view=rev
Log:
[CXF-2348] Fix TCK message properties issues
Patch from Guillaume Sauthier applied

Modified:
    cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java

Modified: cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java?rev=796013&r1=796012&r2=796013&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
Mon Jul 20 21:15:16 2009
@@ -216,23 +216,15 @@
             } else if (MessageContext.MESSAGE_OUTBOUND_PROPERTY.equals(key)) {
                 ret = isOutbound();
             } else if (MessageContext.HTTP_REQUEST_HEADERS.equals(key)) {
-                if (!isResponse()) {
+                if (!isOutbound() && !isRequestor()) {
+                    // HTTP_REQUEST_HEADERS only available on inbound messages of the server
side
                     ret = message.get(Message.PROTOCOL_HEADERS);
-                } else if (reqMessage != null && !isRequestor()) {
-                    ret = reqMessage.get(Message.PROTOCOL_HEADERS);
                 }
             } else if (MessageContext.HTTP_RESPONSE_HEADERS.equals(key)) {
-                Map mp = null;
-                if (isResponse()) {
-                    mp = (Map)message.get(Message.PROTOCOL_HEADERS);
-                } else if (exchange != null) {
-                    //may have to create the out message and add the headers
-                    Message tmp = createResponseMessage();
-                    if (tmp != null) {
-                        ret = (Map)tmp.get(Message.PROTOCOL_HEADERS);
-                    }
+                if (!isOutbound() && isRequestor()) {
+                    // HTTP_RESPONSE_HEADERS only available on inbound messages of the requestor
side
+                    ret = message.get(Message.PROTOCOL_HEADERS);
                 }
-                ret = mp;
             } else if (BindingProvider.USERNAME_PROPERTY.equals(key)) {
                 AuthorizationPolicy authPolicy =
                     (AuthorizationPolicy)message.get(AuthorizationPolicy.class.getName());



Mime
View raw message