cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r496630 - in /incubator/cxf/trunk/rt: frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/ frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/ transports/http/src/main/java/org/apache/cxf/transport/http/
Date Tue, 16 Jan 2007 09:14:49 GMT
Author: jliu
Date: Tue Jan 16 01:14:48 2007
New Revision: 496630

URL: http://svn.apache.org/viewvc?view=rev&rev=496630
Log:
CXF-245: skip SOAPHandlerInterceptor if no handlers registered, also fixed the bug reported
in cxf-245 which is caused by flushing headers twice, the MAPTest fails without this fix.

Modified:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java?view=diff&rev=496630&r1=496629&r2=496630
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
Tue Jan 16 01:14:48 2007
@@ -108,13 +108,7 @@
 
         return invokeHandlerChain(protocolHandlers, context);
     }    
-    
-/*    public boolean invokeStreamHandlers(StreamMessageContext context) {
-        context.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, this.outbound);
-        // return invokeHandlerChain(streamHandlers, new StreamMessageContextImpl(ctx));
-        return invokeHandlerChain(streamHandlers, context);
-    }
-*/        
+       
     public void closeHandlers() {
         //nothing to do
     }
@@ -169,7 +163,6 @@
         }
         invokeClose(protocolHandlers, context);
         invokeClose(logicalHandlers, context);
-        //invokeClose(streamHandlers, context);
     }
 
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java?view=diff&rev=496630&r1=496629&r2=496630
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java
Tue Jan 16 01:14:48 2007
@@ -86,6 +86,10 @@
     }
 
     public void handleMessage(SoapMessage message) {
+
+        if (getInvoker(message).getProtocolHandlers().isEmpty()) {
+            return;
+        }
         if (getInvoker(message).isOutbound()) {
             OutputStream os = message.getContent(OutputStream.class);
             CachedStream cs = new CachedStream();

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java?view=diff&rev=496630&r1=496629&r2=496630
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
(original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
Tue Jan 16 01:14:48 2007
@@ -339,7 +339,7 @@
         } else {
             String m = (new org.apache.cxf.common.i18n.Message("NULL_RESPONSE_MSG", LOG)).toString();
             LOG.log(Level.WARNING, m);
-            throw new IOException(m);
+            throw new IOException(m);            
         }
 
         if (isOneWay(outMessage)) {
@@ -428,9 +428,11 @@
          * reset output stream ... etc.)
          */
         protected void doFlush() throws IOException {
-            OutputStream responseStream = flushHeaders(outMessage);
-            if (null != responseStream && !alreadyFlushed()) {
-                resetOut(responseStream, true);
+            if (!alreadyFlushed()) {
+                OutputStream responseStream = flushHeaders(outMessage);
+                if (null != responseStream) {
+                    resetOut(responseStream, true);
+                }
             }
         }
 



Mime
View raw message