cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1447661 - in /cxf/trunk/rt: frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/ frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ rs/client/src/main/java/org/apache/cxf/jaxrs/client/ transports/jms/src/main/java/org/ap...
Date Tue, 19 Feb 2013 10:41:13 GMT
Author: sergeyb
Date: Tue Feb 19 10:41:13 2013
New Revision: 1447661

URL: http://svn.apache.org/r1447661
Log:
Setting Message.REST property on the exchange, making AbstractJaxbProvider handleJaxbException
non static

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
    cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java?rev=1447661&r1=1447660&r2=1447661&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
Tue Feb 19 10:41:13 2013
@@ -251,7 +251,7 @@ public class JAXRSInInterceptor extends 
     private void setExchangeProperties(Message message, OperationResourceInfo ori, 
                                       MultivaluedMap<String, String> values,
                                       int numberOfResources) {
-        message.put(Message.REST_MESSAGE, Boolean.TRUE);
+        message.getExchange().put(Message.REST_MESSAGE, Boolean.TRUE);
         message.getExchange().put(OperationResourceInfo.class, ori);
         message.getExchange().put(JAXRSUtils.ROOT_RESOURCE_CLASS, ori.getClassResourceInfo());
         message.put(RESOURCE_METHOD, ori.getMethodToInvoke());

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java?rev=1447661&r1=1447660&r2=1447661&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
Tue Feb 19 10:41:13 2013
@@ -117,8 +117,6 @@ public class JAXRSOutInterceptor extends
         if (isResponseAlreadyHandled(message)) {
             return;
         }
-        message.put(Message.REST_MESSAGE, Boolean.TRUE);
-        
         MessageContentsList objs = MessageContentsList.getContentsList(message);
         if (objs == null || objs.size() == 0) {
             return;

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java?rev=1447661&r1=1447660&r2=1447661&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
Tue Feb 19 10:41:13 2013
@@ -671,7 +671,7 @@ public abstract class AbstractJAXBProvid
         throw read ? new BadRequestException(r, t) : new InternalServerErrorException(r,
t);
     }
     
-    protected static void handleJAXBException(JAXBException e, boolean read) {
+    protected void handleJAXBException(JAXBException e, boolean read) {
         StringBuilder sb = handleExceptionStart(e);
         if (e.getLinkedException() != null && e.getLinkedException().getMessage()
!= null) {
             sb.append(e.getLinkedException().getMessage()).append(". ");
@@ -683,7 +683,7 @@ public abstract class AbstractJAXBProvid
         handleExceptionEnd(t, message, read);
     }
     
-    protected static void handleXMLStreamException(XMLStreamException e, boolean read) {
+    protected void handleXMLStreamException(XMLStreamException e, boolean read) {
         StringBuilder sb = handleExceptionStart(e);
         handleExceptionEnd(e, sb.toString(), read);
     }

Modified: cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java?rev=1447661&r1=1447660&r2=1447661&view=diff
==============================================================================
--- cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java (original)
+++ cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java Tue
Feb 19 10:41:13 2013
@@ -856,8 +856,6 @@ public abstract class AbstractClient imp
         m.put(Message.REQUESTOR_ROLE, Boolean.TRUE);
         m.put(Message.INBOUND_MESSAGE, Boolean.FALSE);
         
-        m.put(Message.REST_MESSAGE, Boolean.TRUE);
-        
         m.put(Message.HTTP_REQUEST_METHOD, httpMethod);
         m.put(Message.PROTOCOL_HEADERS, headers);
         if (currentURI.isAbsolute() && currentURI.getScheme().startsWith(HTTP_SCHEME))
{
@@ -886,6 +884,7 @@ public abstract class AbstractClient imp
         m.setInterceptorChain(chain);
         
         exchange = createExchange(m, exchange);
+        exchange.put(Message.REST_MESSAGE, Boolean.TRUE);
         exchange.setOneWay("true".equals(headers.getFirst(Message.ONE_WAY_REQUEST)));
         exchange.put(Retryable.class, this);
         

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java?rev=1447661&r1=1447660&r2=1447661&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java (original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java Tue
Feb 19 10:41:13 2013
@@ -614,7 +614,7 @@ public final class JMSUtils {
             .get(org.apache.cxf.message.Message.PROTOCOL_HEADERS));
         
         boolean isSoapMessage = 
-            !MessageUtils.isTrue(outMessage.get(org.apache.cxf.message.Message.REST_MESSAGE));
+            !MessageUtils.isTrue(outMessage.getExchange().get(org.apache.cxf.message.Message.REST_MESSAGE));
         
         if (isSoapMessage) {
             if (!messageProperties.isSetSOAPJMSTargetService()) {



Mime
View raw message