Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E81731838D for ; Mon, 27 Jul 2015 17:43:52 +0000 (UTC) Received: (qmail 95294 invoked by uid 500); 27 Jul 2015 17:17:12 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 95185 invoked by uid 500); 27 Jul 2015 17:17:12 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 94908 invoked by uid 99); 27 Jul 2015 17:17:12 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Jul 2015 17:17:12 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2366BE04B3; Mon, 27 Jul 2015 17:17:12 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dkulp@apache.org To: commits@cxf.apache.org Date: Mon, 27 Jul 2015 17:17:13 -0000 Message-Id: <8618560290234030a200fe24ade523f5@git.apache.org> In-Reply-To: <9af932262085443cab76c6f73cdfb12d@git.apache.org> References: <9af932262085443cab76c6f73cdfb12d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/5] cxf git commit: [CXF-6506]:Client-side message context value HTTP_REQUEST_HEADERS is not shared between SOAP handlers [CXF-6506]:Client-side message context value HTTP_REQUEST_HEADERS is not shared between SOAP handlers Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e3f17da0 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e3f17da0 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e3f17da0 Branch: refs/heads/3.0.x-fixes Commit: e3f17da00139545a4679435870339053adf9b46c Parents: 9c863f7 Author: Jim Ma Authored: Thu Jul 23 11:00:32 2015 +0800 Committer: Daniel Kulp Committed: Mon Jul 27 13:14:49 2015 -0400 ---------------------------------------------------------------------- .../cxf/jaxws/handler/soap/SOAPMessageContextImpl.java | 2 +- .../cxf/systest/handlers/HandlerInvocationTest.java | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/e3f17da0/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPMessageContextImpl.java ---------------------------------------------------------------------- diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPMessageContextImpl.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPMessageContextImpl.java index 6dc8af0..61f3530 100644 --- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPMessageContextImpl.java +++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPMessageContextImpl.java @@ -129,7 +129,7 @@ public class SOAPMessageContextImpl extends WrappedMessageContext implements SOA if (!isRequestor() && isOutbound() && MessageContext.HTTP_RESPONSE_HEADERS.equals(key)) { return null; } - if (isRequestor() && isOutbound() && MessageContext.HTTP_REQUEST_HEADERS.equals(key)) { + if (isRequestor() && !isOutbound() && MessageContext.HTTP_REQUEST_HEADERS.equals(key)) { return null; } } http://git-wip-us.apache.org/repos/asf/cxf/blob/e3f17da0/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java ---------------------------------------------------------------------- diff --git a/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java b/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java index 5fb4bac..369f052 100644 --- a/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java +++ b/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java @@ -1134,7 +1134,7 @@ public class HandlerInvocationTest extends AbstractBusClientServerTestBase { assertTrue(e.getMessage().indexOf("HandleMessage throws exception") >= 0); } } - + @Test public void testDescription() throws PingException { TestHandler handler = new TestHandler(false) { @@ -1224,6 +1224,17 @@ public class HandlerInvocationTest extends AbstractBusClientServerTestBase { } } + + @Test + public void testHandlerMessgeContext() throws PingException { + MessageContextFirstHandler handler1 = new MessageContextFirstHandler(); + MessageContextSecondHandler handler2 = new MessageContextSecondHandler(); + addHandlersToChain((BindingProvider)handlerTest, handler1, handler2); + + List resp = handlerTest.ping(); + assertNotNull(resp); + assertNotNull("handler2 can't retrieve header map from message context", handler2.getHeaderMap()); + } void addHandlersToChain(BindingProvider bp, Handler... handlers) { @SuppressWarnings("rawtypes")