You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2017/03/28 11:21:06 UTC

cxf git commit: Another hack to address the limitation of the response body being read after the chain completes on the jaxrs client side

Repository: cxf
Updated Branches:
  refs/heads/master 48c6da4be -> 08a1bd83c


Another hack to address the limitation of the response body being read after the chain completes on the jaxrs client side


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/08a1bd83
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/08a1bd83
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/08a1bd83

Branch: refs/heads/master
Commit: 08a1bd83c2a6a069a1a5c5fa45a4fe1236d4fb95
Parents: 48c6da4
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Tue Mar 28 12:20:51 2017 +0100
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Tue Mar 28 12:20:51 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/impl/AbstractPropertiesImpl.java   | 4 ++++
 .../java/org/apache/cxf/rs/security/xml/XmlSecInInterceptor.java | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/08a1bd83/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/AbstractPropertiesImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/AbstractPropertiesImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/AbstractPropertiesImpl.java
index bf34a35..af45a2d 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/AbstractPropertiesImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/AbstractPropertiesImpl.java
@@ -47,4 +47,8 @@ public abstract class AbstractPropertiesImpl {
     public Collection<String> getPropertyNames() {
         return holder.getPropertyNames();
     }
+    
+    public Message getMessage() {
+        return m;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/08a1bd83/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecInInterceptor.java b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecInInterceptor.java
index 2d4014e..403a07e 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecInInterceptor.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecInInterceptor.java
@@ -44,6 +44,7 @@ import javax.xml.stream.XMLStreamReader;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.interceptor.StaxInInterceptor;
+import org.apache.cxf.jaxrs.impl.ReaderInterceptorContextImpl;
 import org.apache.cxf.jaxrs.utils.ExceptionUtils;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.message.Message;
@@ -406,7 +407,8 @@ public class XmlSecInInterceptor extends AbstractPhaseInterceptor<Message> imple
 
     @Override
     public Object aroundReadFrom(ReaderInterceptorContext ctx) throws IOException, WebApplicationException {
-        Message message = JAXRSUtils.getCurrentMessage();    
+        Message message = ((ReaderInterceptorContextImpl)ctx).getMessage();
+        
         if (isServerGet(message)) {
             return ctx.proceed();    
         } else {