cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r491205 - in /incubator/cxf/trunk: rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/ systests/src/test/j...
Date Sat, 30 Dec 2006 10:23:27 GMT
Author: mmao
Date: Sat Dec 30 02:23:24 2006
New Revision: 491205

URL: http://svn.apache.org/viewvc?view=rev&rev=491205
Log:
CXF-204 Remove Stream handlers

* Apply patch contributed by Unreal Jiang

Removed:
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/StreamHandlerInterceptorTest.java
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/StreamHandler.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamHandlerInterceptor.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/TestStreamHandler.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=491205&r1=491204&r2=491205
==============================================================================
--- 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
Sat Dec 30 02:23:24 2006
@@ -109,12 +109,12 @@
         return invokeHandlerChain(protocolHandlers, context);
     }    
     
-    public boolean invokeStreamHandlers(StreamMessageContext 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 +169,7 @@
         }
         invokeClose(protocolHandlers, context);
         invokeClose(logicalHandlers, context);
-        invokeClose(streamHandlers, context);
+        //invokeClose(streamHandlers, context);
     }
 
 
@@ -350,4 +350,5 @@
         fault = ex;
     }
 }
+
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamHandler.java?view=diff&rev=491205&r1=491204&r2=491205
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamHandler.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamHandler.java
Sat Dec 30 02:23:24 2006
@@ -19,7 +19,7 @@
 
 package org.apache.cxf.jaxws.handler;
 
-import javax.xml.ws.handler.Handler;
+//import javax.xml.ws.handler.Handler;
 
 
 
@@ -29,5 +29,7 @@
  * the underlying transport.  The StreamHandler allows transformations
  * on the marshalled data.
  */
-public interface StreamHandler extends Handler<StreamMessageContext> {
+public interface StreamHandler {
+
+//public interface StreamHandler extends Handler<StreamMessageContext> {
 }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamHandlerInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamHandlerInterceptor.java?view=diff&rev=491205&r1=491204&r2=491205
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamHandlerInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamHandlerInterceptor.java
Sat Dec 30 02:23:24 2006
@@ -29,14 +29,16 @@
     public StreamHandlerInterceptor(Binding binding) {
         super(binding);
         setPhase(Phase.USER_STREAM);
+        
     }
 
     public void handleMessage(Message message) {
-        HandlerChainInvoker invoker = getInvoker(message);
+/*        HandlerChainInvoker invoker = getInvoker(message);
         if (!invoker.getStreamHandlers().isEmpty()) {
             StreamMessageContextImpl sctx = new StreamMessageContextImpl(message);
             invoker.invokeStreamHandlers(sctx);
         }
+        */
     } 
     
     public void handleFault(Message message) {

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java?view=diff&rev=491205&r1=491204&r2=491205
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
Sat Dec 30 02:23:24 2006
@@ -33,7 +33,7 @@
 import org.apache.cxf.jaxws.binding.BindingImpl;
 import org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl;
 import org.apache.cxf.jaxws.handler.LogicalHandlerInterceptor;
-import org.apache.cxf.jaxws.handler.StreamHandlerInterceptor;
+//import org.apache.cxf.jaxws.handler.StreamHandlerInterceptor;
 import org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor;
 import org.apache.cxf.jaxws.interceptors.HolderInInterceptor;
 import org.apache.cxf.jaxws.interceptors.HolderOutInterceptor;
@@ -68,7 +68,7 @@
         } else {
              // TODO: what for non soap bindings?
         }
-        handlerInterceptors.add(new StreamHandlerInterceptor(binding));
+//        handlerInterceptors.add(new StreamHandlerInterceptor(binding));
         
         List<Interceptor> fault = super.getOutFaultInterceptors();
         fault.addAll(handlerInterceptors);

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java?view=diff&rev=491205&r1=491204&r2=491205
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
Sat Dec 30 02:23:24 2006
@@ -50,7 +50,7 @@
     
     TestLogicalHandler[] logicalHandlers = new TestLogicalHandler[HANDLER_COUNT];
     TestProtocolHandler[] protocolHandlers = new TestProtocolHandler[HANDLER_COUNT];
-    TestStreamHandler[] streamHandlers = new TestStreamHandler[HANDLER_COUNT]; 
+    //TestStreamHandler[] streamHandlers = new TestStreamHandler[HANDLER_COUNT]; 
 
     public void setUp() {
         AbstractHandlerBase.clear(); 
@@ -64,10 +64,10 @@
             protocolHandlers[i] = new TestProtocolHandler();
             handlers.add(protocolHandlers[i]);
         }
-        for (int i = 0; i < protocolHandlers.length; i++) {
+  /*      for (int i = 0; i < protocolHandlers.length; i++) {
             streamHandlers[i] = new TestStreamHandler();
             handlers.add(streamHandlers[i]);
-        }
+        }*/
         invoker = new HandlerChainInvoker(handlers);
     }
     
@@ -75,7 +75,7 @@
         invoker = new HandlerChainInvoker(new ArrayList<Handler>());
         assertTrue(invoker.invokeLogicalHandlers(false, lmc));
         assertTrue(doInvokeProtocolHandlers(false));
-        assertTrue(invoker.invokeStreamHandlers(smc));
+        //assertTrue(invoker.invokeStreamHandlers(smc));
     }
 
     
@@ -86,11 +86,11 @@
             assertTrue(h instanceof LogicalHandler); 
         }
 
-        assertEquals(HANDLER_COUNT, invoker.getStreamHandlers().size());
-        for (Handler h : invoker.getStreamHandlers()) {
+//        assertEquals(HANDLER_COUNT, invoker.getStreamHandlers().size());
+/*        for (Handler h : invoker.getStreamHandlers()) {
             assertTrue(h instanceof StreamHandler); 
         }
-
+*/
         assertEquals(HANDLER_COUNT, invoker.getProtocolHandlers().size());
         for (Handler h : invoker.getProtocolHandlers()) {
             assertTrue(!(h instanceof LogicalHandler)); 
@@ -131,7 +131,7 @@
         assertEquals(4, invoker.getInvokedHandlers().size());
         assertTrue(invoker.isInbound());
 
-        checkStreamHandlersInvoked(false, true); 
+        //checkStreamHandlersInvoked(false, true); 
 
         assertFalse(invoker.isClosed()); 
         assertTrue(logicalHandlers[0].getInvokedOrder() > logicalHandlers[1].getInvokedOrder());
@@ -300,8 +300,8 @@
 
         invoker.invokeLogicalHandlers(false, lmc); 
         doInvokeProtocolHandlers(false);
-        invoker.invokeStreamHandlers(smc);
-        assertEquals(6, invoker.getInvokedHandlers().size()); 
+//        invoker.invokeStreamHandlers(smc);
+        assertEquals(4, invoker.getInvokedHandlers().size()); 
 
         invoker.mepComplete(message); 
 
@@ -309,8 +309,8 @@
         assertTrue("close not invoked on logicalHandlers", logicalHandlers[1].isCloseInvoked());

         assertTrue("close not invoked on protocolHandlers", protocolHandlers[0].isCloseInvoked());
         assertTrue("close not invoked on protocolHandlers", protocolHandlers[1].isCloseInvoked());
-        assertTrue("close not invoked on streamHandlers", streamHandlers[0].isCloseInvoked());
-        assertTrue("close not invoked on streamHandlers", streamHandlers[1].isCloseInvoked());
+//        assertTrue("close not invoked on streamHandlers", streamHandlers[0].isCloseInvoked());
+//        assertTrue("close not invoked on streamHandlers", streamHandlers[1].isCloseInvoked());
 
         assertTrue("incorrect invocation order of close", protocolHandlers[1].getInvokedOrder()

                    < protocolHandlers[0].getInvokedOrder());
@@ -383,7 +383,7 @@
         assertTrue(invoker.getInvokedHandlers().contains(protocolHandlers[0])); 
         assertTrue(invoker.getInvokedHandlers().contains(protocolHandlers[1])); 
     }
-    
+/*    
     protected void checkStreamHandlersInvoked(boolean outboundProperty, boolean requestorProperty)
{ 
         
         // InputStreamMessageContext istreamCtx = new TestInputStreamMessageContext(message);
   
@@ -398,7 +398,7 @@
         assertTrue(invoker.getInvokedHandlers().contains(streamHandlers[0])); 
         assertTrue(invoker.getInvokedHandlers().contains(streamHandlers[1])); 
     }
-    
+*/    
     private void doHandleFaultExceptionTest(RuntimeException e) { 
 
         // put invoker into fault state
@@ -418,11 +418,11 @@
         return invoker.invokeProtocolHandlers(requestor, pmc);
     }
     
-    static class TestStreamHandler extends AbstractHandlerBase<StreamMessageContext>

+  /*  static class TestStreamHandler extends AbstractHandlerBase<StreamMessageContext>

         implements StreamHandler {
 
     }
-
+*/
     static class TestProtocolHandler extends AbstractHandlerBase<SOAPMessageContext>
{
         
     }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java?view=diff&rev=491205&r1=491204&r2=491205
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java
Sat Dec 30 02:23:24 2006
@@ -215,9 +215,9 @@
 
         TestHandler<LogicalMessageContext> handler1 = new TestHandler<LogicalMessageContext>(false);
         TestHandler<LogicalMessageContext>  handler2 = new TestHandler<LogicalMessageContext>(false);
-        TestStreamHandler streamHandler = new TestStreamHandler(false);
-        addHandlersToChain((BindingProvider)handlerTest, handler1, handler2, streamHandler);
-
+//        TestStreamHandler streamHandler = new TestStreamHandler(false);
+//        addHandlersToChain((BindingProvider)handlerTest, handler1, handler2, streamHandler);
+        addHandlersToChain((BindingProvider)handlerTest, handler1, handler2);
         try {
             handlerTest.pingWithArgs("servant throw exception");
             fail("did not get expected PingException");
@@ -227,10 +227,10 @@
 
         assertEquals(1, handler1.getHandleMessageInvoked());
         assertEquals(1, handler2.getHandleMessageInvoked());
-        assertEquals(1, streamHandler.getHandleMessageInvoked());
+        //assertEquals(1, streamHandler.getHandleMessageInvoked());
         assertEquals(1, handler1.getHandleFaultInvoked());
         assertEquals(1, handler2.getHandleFaultInvoked());
-        assertEquals(1, streamHandler.getHandleFaultInvoked());
+        //assertEquals(1, streamHandler.getHandleFaultInvoked());
     }
        
     public void xtestHandlersInvoked() throws Exception {
@@ -238,11 +238,13 @@
         TestHandler<LogicalMessageContext>  handler2 = new TestHandler<LogicalMessageContext>(false);
         TestSOAPHandler soapHandler1 = new TestSOAPHandler(false);
         TestSOAPHandler soapHandler2 = new TestSOAPHandler(false);
-        TestStreamHandler streamHandler = new TestStreamHandler(false);
+//        TestStreamHandler streamHandler = new TestStreamHandler(false);
 
+//        addHandlersToChain((BindingProvider)handlerTest, handler1, handler2,
+//                           soapHandler1, soapHandler2,
+//                           streamHandler);
         addHandlersToChain((BindingProvider)handlerTest, handler1, handler2,
-                           soapHandler1, soapHandler2,
-                           streamHandler);
+                           soapHandler1, soapHandler2);
 
         List<String> resp = handlerTest.ping();
         assertNotNull(resp);
@@ -251,12 +253,12 @@
         assertEquals("handle message was not invoked", 2, handler2.getHandleMessageInvoked());
         assertEquals("handle message was not invoked", 2, soapHandler1.getHandleMessageInvoked());
         assertEquals("handle message was not invoked", 2, soapHandler2.getHandleMessageInvoked());
-        assertEquals("handle message was not invoked", 2, streamHandler.getHandleMessageInvoked());
+        //assertEquals("handle message was not invoked", 2, streamHandler.getHandleMessageInvoked());
         assertTrue("close must be  called", handler1.isCloseInvoked());
         assertTrue("close must be  called", handler2.isCloseInvoked());
         assertTrue("close must be  called", soapHandler1.isCloseInvoked());
         assertTrue("close must be  called", soapHandler2.isCloseInvoked());
-        assertTrue("close must be  called", streamHandler.isCloseInvoked());
+        //assertTrue("close must be  called", streamHandler.isCloseInvoked());
 
         // the server has encoded into the response the order in
         // which the handlers have been invoked, parse it and make

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/TestStreamHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/TestStreamHandler.java?view=diff&rev=491205&r1=491204&r2=491205
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/TestStreamHandler.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/TestStreamHandler.java
Sat Dec 30 02:23:24 2006
@@ -18,7 +18,7 @@
  */
 package org.apache.cxf.systest.handlers;
 
-
+/*
 import java.io.IOException;
 import java.util.Map;
 import java.util.logging.Logger;
@@ -31,7 +31,12 @@
 import org.apache.cxf.jaxws.handler.StreamHandler;
 import org.apache.cxf.jaxws.handler.StreamMessageContext;
 import org.apache.handler_test.PingException;
+*/
+public class TestStreamHandler {
+
+}
 
+/*
 public class  TestStreamHandler extends TestHandlerBase 
     implements StreamHandler {
 
@@ -125,4 +130,4 @@
             throw new ProtocolException(ex);
         }
     } 
-}
+}*/



Mime
View raw message