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 E781610F28 for ; Fri, 21 Mar 2014 15:59:00 +0000 (UTC) Received: (qmail 64563 invoked by uid 500); 21 Mar 2014 15:58:51 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 64406 invoked by uid 500); 21 Mar 2014 15:58:49 -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 64376 invoked by uid 99); 21 Mar 2014 15:58:48 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Mar 2014 15:58:48 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 1831432B409; Fri, 21 Mar 2014 15:58:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: asoldano@apache.org To: commits@cxf.apache.org Date: Fri, 21 Mar 2014 15:58:48 -0000 Message-Id: <367c3fcc36e04b0b928cdfca3ea0ddff@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/4] git commit: [CXF-5602] Create HttpServletRequestSnapshot for requests with WSA ReplyTo prop set Repository: cxf Updated Branches: refs/heads/2.6.x-fixes faf47eff9 -> b55e83c36 [CXF-5602] Create HttpServletRequestSnapshot for requests with WSA ReplyTo prop set Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/df7119ae Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/df7119ae Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/df7119ae Branch: refs/heads/2.6.x-fixes Commit: df7119ae5648a7509a3e3ba59bc37ca84fdd05bc Parents: faf47ef Author: Alessio Soldano Authored: Tue Mar 11 15:55:37 2014 +0100 Committer: Alessio Soldano Committed: Fri Mar 21 16:25:42 2014 +0100 ---------------------------------------------------------------------- .../cxf/transport/http/AbstractHTTPDestination.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/df7119ae/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java ---------------------------------------------------------------------- diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java index d0f7524..e4f5107 100644 --- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java +++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java @@ -72,6 +72,8 @@ import org.apache.cxf.transport.http.policy.impl.ServerPolicyCalculator; import org.apache.cxf.transport.https.CertConstraints; import org.apache.cxf.transport.https.CertConstraintsInterceptor; import org.apache.cxf.transports.http.configuration.HTTPServerPolicy; +import org.apache.cxf.ws.addressing.AddressingProperties; +import org.apache.cxf.ws.addressing.ContextUtils; import org.apache.cxf.ws.addressing.EndpointReferenceType; import org.apache.cxf.wsdl.EndpointReferenceUtils; import org.apache.cxf.wsdl.WSDLLibrary; @@ -268,8 +270,9 @@ public abstract class AbstractHTTPDestination final Exchange exchange = inMessage.getExchange(); DelegatingInputStream in = new DelegatingInputStream(req.getInputStream()) { public void cacheInput() { - if (!cached && exchange.isOneWay()) { - //For one-ways, we need to cache the values of the HttpServletRequest + if (!cached && (exchange.isOneWay() || isWSAddressingReplyToSpecified(exchange))) { + //For one-ways and WS-Addressing invocations with ReplyTo address, + //we need to cache the values of the HttpServletRequest //so they can be queried later for things like paths and schemes //and such like that. //Please note, exchange used to always get the "current" message @@ -277,6 +280,10 @@ public abstract class AbstractHTTPDestination } super.cacheInput(); } + private boolean isWSAddressingReplyToSpecified(Exchange ex) { + AddressingProperties map = ContextUtils.retrieveMAPs(ex.getInMessage(), false, false, false); + return map != null && !ContextUtils.isGenericAddress(map.getReplyTo()); + } }; inMessage.setContent(DelegatingInputStream.class, in);