cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Another hack to address the limitation of the response body being read after the chain completes on the jaxrs client side
Date Tue, 28 Mar 2017 11:22:46 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 1444d9873 -> 3fd465a1b


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/3fd465a1
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/3fd465a1
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/3fd465a1

Branch: refs/heads/3.1.x-fixes
Commit: 3fd465a1b74c19e819a794ff89227af2c0d268f5
Parents: 1444d98
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Tue Mar 28 12:20:51 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue Mar 28 12:22:27 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/3fd465a1/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 caf8139..2b69400 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/3fd465a1/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 3ce1047..19a7457 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 {


Mime
View raw message