axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glyn Normington" <glyn_norming...@uk.ibm.com>
Subject [PATCH] Make SimpleTargetedChain extend SimpleChain
Date Fri, 21 Dec 2001 15:23:21 GMT
The following patch removes quite a bit of duplicate logic from
SimpleTargetedChain by making it extend SimpleChain and also formalises the
relationship implied by the names of these classes -- SimpleTargetedChain
is a specialised type of SimpleChain.

The patch contains some small testcase changes as the SimpleTargetedChain
is now passed its handlers on construction so they added into the
SimpleChain handler vector in the correct order, so scrutiny is in order.

Note that the resultant server-side Transport class has some redundant
logic removed and is now an even more trivial extension of
SimpleTargetedChain.

I'm back on January 2. Happy Christmas/holidays!

Glyn

Index: xml-axis/java/samples/proxy/ProxyService.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/samples/proxy/ProxyService.java,v
retrieving revision 1.10
diff -u -r1.10 ProxyService.java
--- xml-axis/java/samples/proxy/ProxyService.java  2001/12/03 22:49:22
1.10
+++ xml-axis/java/samples/proxy/ProxyService.java  2001/12/21 15:09:50
@@ -94,9 +94,8 @@
             service.setEngine( msgContext.getAxisEngine().getClientEngine
() );
             Call    call = (Call) service.createCall();

-            SimpleTargetedChain c = new SimpleTargetedChain();
-            c.setPivotHandler(new TCPSender());
-        service.getEngine().deployTransport("tcp", c);
+            SimpleTargetedChain c = new SimpleTargetedChain(new TCPSender
());
+            service.getEngine().deployTransport("tcp", c);

             // add TCP for proxy testing
             call.addTransportPackage("samples.transport");
Index: xml-axis/java/samples/transport/FileTest.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/samples/transport/FileTest.java,v
retrieving revision 1.20
diff -u -r1.20 FileTest.java
--- xml-axis/java/samples/transport/FileTest.java  2001/11/26 02:21:38      1.20
+++ xml-axis/java/samples/transport/FileTest.java  2001/12/21 15:09:50
@@ -37,8 +37,7 @@
         AxisEngine engine = service.getEngine();

         // Manually deploy file sender and file transport for this example
-        SimpleTargetedChain c = new SimpleTargetedChain();
-        c.setPivotHandler(new FileSender());
+        SimpleTargetedChain c = new SimpleTargetedChain(new FileSender());
         engine.deployTransport("FileTransport", c);

         call.setOperationName( "getQuote" );
Index: xml-axis/java/samples/transport/tcp/AdminClient.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/samples/transport/tcp/AdminClient.java,v
retrieving revision 1.11
diff -u -r1.11 AdminClient.java
--- xml-axis/java/samples/transport/tcp/AdminClient.java     2001/11/15 19:48:42 1.11
+++ xml-axis/java/samples/transport/tcp/AdminClient.java     2001/12/21 15:09:50
@@ -77,8 +77,7 @@
             org.apache.axis.client.AdminClient client =
                 new org.apache.axis.client.AdminClient(System.err);

-            SimpleTargetedChain c = new SimpleTargetedChain();
-            c.setPivotHandler(new TCPSender());
+            SimpleTargetedChain c = new SimpleTargetedChain(new TCPSender());
             client.getCall().getService().getEngine().deployTransport("tcp", c);

             System.out.println(client.process(args));
Index: xml-axis/java/samples/transport/tcp/GetQuote.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/samples/transport/tcp/GetQuote.java,v
retrieving revision 1.13
diff -u -r1.13 GetQuote.java
--- xml-axis/java/samples/transport/tcp/GetQuote.java   2001/11/15 19:48:42 1.13
+++ xml-axis/java/samples/transport/tcp/GetQuote.java   2001/12/21 15:09:50
@@ -93,8 +93,7 @@
         Service service = new Service();
         Call call = (Call)service.createCall();

-        SimpleTargetedChain c = new SimpleTargetedChain();
-        c.setPivotHandler(new TCPSender());
+        SimpleTargetedChain c = new SimpleTargetedChain(new TCPSender());
         service.getEngine().deployTransport("tcp", c);

         call.setTransport(new TCPTransport());
Index: xml-axis/java/samples/transport/tcp/TCPListener.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/samples/transport/tcp/TCPListener.java,v
retrieving revision 1.13
diff -u -r1.13 TCPListener.java
--- xml-axis/java/samples/transport/tcp/TCPListener.java     2001/12/03 22:49:22 1.13
+++ xml-axis/java/samples/transport/tcp/TCPListener.java     2001/12/21 15:09:50
@@ -155,8 +155,7 @@
                 engine = new AxisServer();
                 engine.init();

-                SimpleTargetedChain c = new SimpleTargetedChain();
-                c.setPivotHandler(new TCPSender());
+                SimpleTargetedChain c = new SimpleTargetedChain(new TCPSender());

                 try {
                     engine.deployTransport(transportName, c);
Index: xml-axis/java/src/org/apache/axis/SimpleTargetedChain.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/src/org/apache/axis/SimpleTargetedChain.java,v
retrieving revision 1.33
diff -u -r1.33 SimpleTargetedChain.java
--- xml-axis/java/src/org/apache/axis/SimpleTargetedChain.java    2001/12/07 18:30:27 1.33
+++ xml-axis/java/src/org/apache/axis/SimpleTargetedChain.java    2001/12/21 15:09:51
@@ -67,8 +67,9 @@
 /**
  *
  * @author Doug Davis (dug@us.ibm.com)
+ * @author Glyn Normington (norm@uk.ibm.com)
  */
-public class SimpleTargetedChain extends BasicHandler implements TargetedChain
+public class SimpleTargetedChain extends SimpleChain implements TargetedChain
 {
    static Category category =
             Category.getInstance(SimpleTargetedChain.class.getName());
@@ -76,208 +77,64 @@
     protected Handler    requestHandler ;
     protected Handler    pivotHandler ;
     protected Handler    responseHandler ;
+
+    /**
+     * Pivot indicator sets "past pivot point" before the response handler
+     * runs. This avoids having to reimplement SimpleChain.invoke and
+     * SimpleChain.generateWSDL.
+     */
+    private class PivotIndicator extends BasicHandler {
+    public PivotIndicator() {}

-    public void init() {
-        if ( requestHandler   != null )   requestHandler.init();
-        if ( pivotHandler != null ) pivotHandler.init();
-        if ( responseHandler  != null )  responseHandler.init();
-    }
+        public void undo(MessageContext msgContext) {}

-    public void cleanup() {
-        if ( requestHandler   != null )   requestHandler.cleanup();
-        if ( pivotHandler != null ) pivotHandler.cleanup();
-        if ( responseHandler  != null )  responseHandler.cleanup();
+        public void invoke(MessageContext msgContext) throws AxisFault {
+        msgContext.setPastPivot(true);
+    }
     }

     /**
-     * Invoke the request chain, pivot handler and response chain.  If there's
-     * a fault we need to make sure that we undo any completed handler
-     * that has been successfully invoked and then rethrow the fault.
+     * Default no-arg constructor.
      */
-    public void invoke(MessageContext msgContext) throws AxisFault {
-        if (category.isDebugEnabled()) {
-            category.debug(JavaUtils.getMessage("enter00", "SimpleTargetedChain::invoke")
);
-        }
-
-        if ( requestHandler != null ) requestHandler.invoke( msgContext );
-        try {
-            if ( pivotHandler != null ) pivotHandler.invoke( msgContext );
-        }
-        catch( Exception e ) {
-            category.error( "SimpleTargetedChain caught exception", e );
-            if ( requestHandler != null )
-                requestHandler.undo( msgContext );
-            throw AxisFault.makeFault(e);
-        }
-        msgContext.setPastPivot(true);
-        try {
-            if ( responseHandler != null )
-                responseHandler.invoke( msgContext );
-        }
-        catch( Exception e ) {
-            category.error( e );
-            if ( pivotHandler != null ) pivotHandler.undo( msgContext );
-            if ( requestHandler != null )
-                requestHandler.undo( msgContext );
-            throw AxisFault.makeFault(e);
-        }
-
-        if (category.isDebugEnabled()) {
-            category.debug(JavaUtils.getMessage("exit00", "SimpleTargetedChain::invoke")
);
-        }
-    }
+    public SimpleTargetedChain() {}

-    public void generateWSDL(MessageContext msgContext) throws AxisFault {
-        if (category.isDebugEnabled()) {
-            category.debug(JavaUtils.getMessage("enter00", "SimpleTargetedChain::editWSDL")
);
-        }
-
-        if ( requestHandler != null ) requestHandler.generateWSDL( msgContext );
-        try {
-            if ( pivotHandler != null ) pivotHandler.generateWSDL( msgContext );
-        }
-        catch( Exception e ) {
-            category.error( e );
-            if ( requestHandler != null )
-                requestHandler.undo( msgContext );
-            throw AxisFault.makeFault(e);
-        }
-        msgContext.setPastPivot(true);
-        try {
-            if ( responseHandler != null )
-                responseHandler.generateWSDL( msgContext );
-        }
-        catch( Exception e ) {
-            category.error( e );
-            throw AxisFault.makeFault(e);
-        }
-
-        if (category.isDebugEnabled()) {
-            category.debug(JavaUtils.getMessage("exit00", "SimpleTargetedChain::editWSDL")
);
-        }
-    }
+    /**
+     * Constructor for an instance with effectively only a pivot handler.
+     */
+    public SimpleTargetedChain(Handler handler) {
+    pivotHandler = handler;
+    if (pivotHandler != null) {
+        addHandler(pivotHandler);
+        addHandler(new PivotIndicator());
+    }
+   }

     /**
-     * Undo all of the work - in reverse order.
+     * Constructor which takes real or null request, pivot, and response
+     * handlers.
      */
-    public void undo(MessageContext msgContext) {
-        if (category.isDebugEnabled()) {
-            category.debug(JavaUtils.getMessage("enter00", "SimpleTargetedChain::undo") );
-        }
-
-        if ( responseHandler   != null )   responseHandler.undo( msgContext );
-        if ( pivotHandler  != null )  pivotHandler.undo( msgContext );
-        if ( requestHandler    != null )    requestHandler.undo( msgContext );
-
-        if (category.isDebugEnabled()) {
-            category.debug(JavaUtils.getMessage("exit00", "SimpleTargetedChain::undo") );
-        }
-    }
+    public SimpleTargetedChain(Handler reqHandler, Handler pivHandler,
+                     Handler respHandler) {
+
+        requestHandler = reqHandler;
+    if (requestHandler != null)
+        addHandler(requestHandler);
+
+    pivotHandler = pivHandler;
+    if (pivotHandler != null) {
+        addHandler(pivotHandler);
+        addHandler(new PivotIndicator());
+    }

-    public boolean canHandleBlock(QName qname) {
-        // TODO !!! : Need to look at this logic
-        return ((requestHandler==null) ? false :
-                  (requestHandler.canHandleBlock(qname) ||
-                   (pivotHandler==null)) ? false :
-                       (pivotHandler.canHandleBlock(qname) ||
-                        (responseHandler==null))  ? false :
-                            responseHandler.canHandleBlock(qname) );
+        responseHandler = respHandler;
+    if (responseHandler != null)
+        addHandler(responseHandler);
     }

     public Handler getRequestHandler() { return( requestHandler ); }

-    public void setRequestHandler(Handler reqHandler)
-    {
-        requestHandler = reqHandler;
-    }
-
     public Handler getPivotHandler() { return( pivotHandler ); }

-    public void setPivotHandler(Handler handler) { pivotHandler = handler ; }
-
     public Handler getResponseHandler() { return( responseHandler ); }
-
-    public void setResponseHandler(Handler respHandler)
-    {
-        responseHandler = respHandler;
-    }
-
-    public void clear() {
-        requestHandler = null ;
-        pivotHandler = null ;
-        responseHandler = null ;
-    }
-
-    public Element getDeploymentData(Document doc) {
-        if (category.isDebugEnabled()) {
-            category.debug(JavaUtils.getMessage("enter00", "SimpleTargetedChain::getDeploymentData")
);
-        }
-
-        Element   root = doc.createElementNS("", "chain");
-        fillInDeploymentData(root);
-
-        if (category.isDebugEnabled()) {
-            category.debug(JavaUtils.getMessage("exit00", "SimpleTargetedChain::getDeploymentData")
);
-        }
-        return( root );
-    }
-
-    /**
-     * Used by subclasses (i.e. SOAPService) to fill in deployment
-     * data into an Element which might not be named "chain".
-     *
-     * @param root the Element to fill in with deployment data.
-     */
-    public void fillInDeploymentData(Element root)
-    {
-        Document doc = root.getOwnerDocument();
-        StringBuffer str  = new StringBuffer();
-        Handler      h ;
-
-        if ( requestHandler != null ) {
-            if (requestHandler instanceof Chain) {
-                Handler[]  handlers = ((Chain)requestHandler).getHandlers();
-                str = new StringBuffer();
-                for ( int i = 0 ; i < handlers.length ; i++ ) {
-                    h = (Handler) handlers[i];
-                    if ( i != 0 ) str.append(",");
-                    str.append( h.getName() );
-                }
-            } else {
-                str.append(requestHandler.getName());
-            }
-            root.setAttribute( "request", str.toString() );
-        }
-        if ( pivotHandler != null ) {
-            root.setAttribute( "pivot", pivotHandler.getName() );
-        }
-        if ( responseHandler != null ) {
-            if (responseHandler instanceof Chain) {
-                Handler[]  handlers = ((Chain)responseHandler).getHandlers();
-                str = new StringBuffer();
-                for ( int i = 0 ; i < handlers.length ; i++ ) {
-                    h = (Handler) handlers[i];
-                    if ( i != 0 ) str.append(",");
-                    str.append( h.getName() );
-                }
-            } else {
-                str.append(responseHandler.getName());
-            }
-            root.setAttribute( "response", str.toString() );
-        }
-
-        options = this.getOptions();
-        if ( options != null ) {
-            Enumeration e = options.keys();
-            while ( e.hasMoreElements() ) {
-                String k = (String) e.nextElement();
-                Object v = options.get(k);
-                Element e1 = doc.createElementNS("", "option");
-                e1.setAttribute( "name", k );
-                e1.setAttribute( "value", v.toString() );
-                root.appendChild( e1 );
-            }
-        }
-    }

 };
Index: xml-axis/java/src/org/apache/axis/TargetedChain.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/src/org/apache/axis/TargetedChain.java,v
retrieving revision 1.7
diff -u -r1.7 TargetedChain.java
--- xml-axis/java/src/org/apache/axis/TargetedChain.java     2001/10/30 16:46:34 1.7
+++ xml-axis/java/src/org/apache/axis/TargetedChain.java     2001/12/21 15:09:51
@@ -65,33 +65,13 @@
     public Handler   getRequestHandler();

     /**
-     * Sets the Request Chain
-     */
-    public void    setRequestHandler(Handler reqHandler);
-
-    /**
      * Returns the Pivot Handler
      */
     public Handler getPivotHandler();

     /**
-     * Sets the Pivot Handler
-     */
-    public void    setPivotHandler(Handler handler);
-
-    /**
      * Returns the Response Handler
      */
     public Handler   getResponseHandler();
-
-    /**
-     * Sets the Response Handler
-     */
-    public void    setResponseHandler(Handler respHandler);
-
-    /**
-     * Clears the Handlers
-     */
-    public void    clear();
-
+
 }
Index: xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDDeployableItem.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDDeployableItem.java,v
retrieving revision 1.15
diff -u -r1.15 V2DDDeployableItem.java
--- xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDDeployableItem.java    2001/11/14
17:26:18 1.15
+++ xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDDeployableItem.java    2001/12/21
15:09:51
@@ -55,7 +55,6 @@
 package org.apache.axis.deployment.v2dd;

 import org.apache.axis.Handler;
-import org.apache.axis.SimpleTargetedChain;
 import org.apache.axis.deployment.DeployableItem;
 import org.apache.axis.deployment.DeploymentRegistry;
 import org.apache.axis.deployment.DeploymentException;
@@ -99,8 +98,6 @@
         // definition to configure the instance

         try {
-            SimpleTargetedChain stc = new SimpleTargetedChain();
-
             V2DDProvider prov = service.getProvider();
             String[] methods = prov.getMethods();

Index: xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDService.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDService.java,v
retrieving revision 1.28
diff -u -r1.28 WSDDService.java
--- xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDService.java      2001/12/16 18:07:43
1.28
+++ xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDService.java      2001/12/21 15:09:51
@@ -205,34 +205,38 @@
             return cachedService;
         }

-        SOAPService   service  = new SOAPService();
-        if ( getQName() != null )
-            service.setName(getQName().getLocalPart());
-        service.setOptions(getParametersTable());
-
-        WSDDChain     request  = getRequestFlow();
-        WSDDChain      response = getResponseFlow();
+    Handler reqHandler = null;
+        WSDDChain request = getRequestFlow();

         if (request != null) {
-            service.setRequestHandler(request.getInstance(registry));
+            reqHandler = request.getInstance(registry);
         }

-        //service.setPivotHandler(getProvider().getInstance(registry));
+        Handler providerHandler = null;
+
         if (providerQName != null) {
-            Handler providerHandler = WSDDProvider.getInstance(providerQName,
-                                                               this,
-                                                               registry);
+            providerHandler = WSDDProvider.getInstance(providerQName,
+                                                       this,
+                                                       registry);
             if (providerHandler == null)
                 throw new WSDDException(
                         JavaUtils.getMessage("couldntConstructProvider00"));
-
-            service.setPivotHandler(providerHandler);
         }
-
+
+        Handler respHandler = null;
+        WSDDChain response = getResponseFlow();
+
         if (response != null) {
-            service.setResponseHandler(response.getInstance(registry));
+            respHandler = response.getInstance(registry);
         }

+        SOAPService service = new SOAPService(reqHandler, providerHandler,
+                                              respHandler);
+
+        if ( getQName() != null )
+            service.setName(getQName().getLocalPart());
+        service.setOptions(getParametersTable());
+
         if (tmr == null) {
             tmr = new TypeMappingRegistry();
         }
Index: xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDTargetedChain.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDTargetedChain.java,v
retrieving revision 1.3
diff -u -r1.3 WSDDTargetedChain.java
--- xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDTargetedChain.java     2001/11/14
17:26:18 1.3
+++ xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDTargetedChain.java     2001/12/21
15:09:51
@@ -185,11 +185,10 @@
     public Handler makeNewInstance(DeploymentRegistry registry)
         throws Exception
     {
-        TargetedChain c = new org.apache.axis.SimpleTargetedChain();
-
+    Handler reqHandler = null;
         WSDDChain req = getRequestFlow();
         if (req != null)
-            c.setRequestHandler(req.getInstance(registry));
+            reqHandler = req.getInstance(registry);

         Handler pivot = null;
         if (pivotQName != null) {
@@ -199,14 +198,14 @@
                 pivot = registry.getHandler(pivotQName);
             }
         }
-
-        c.setPivotHandler(pivot);

+        Handler respHandler = null;
         WSDDChain resp = getResponseFlow();
         if (resp != null)
-            c.setResponseHandler(resp.getInstance(registry));
+            respHandler = resp.getInstance(registry);

-        return c;
+        return new org.apache.axis.SimpleTargetedChain(reqHandler, pivot,
+                                                       respHandler);
     }

     /**
Index: xml-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java,v
retrieving revision 1.37
diff -u -r1.37 SOAPService.java
--- xml-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java   2001/12/12 18:17:52
1.37
+++ xml-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java   2001/12/21 15:09:51
@@ -105,10 +105,23 @@
      */
     public SOAPService()
     {
+    initTypeMappingRegistry();
+    }
+
+    /** Constructor with real or null request, pivot, and response
+     *   handlers.
+     */
+    public SOAPService(Handler reqHandler, Handler pivHandler,
+                Handler respHandler) {
+    super(reqHandler, pivHandler, respHandler);
+    initTypeMappingRegistry();
+    }
+
+    private void initTypeMappingRegistry() {
         typeMap = new TypeMappingRegistry();
         typeMap.setParent(SOAPTypeMappingRegistry.getSingleton());
     }
-
+
     public TypeMappingRegistry getTypeMappingRegistry()
     {
         return typeMap;
@@ -124,8 +137,8 @@
      */
     public SOAPService(Handler serviceHandler)
     {
-        this();
-        setPivotHandler(serviceHandler);
+        super(serviceHandler);
+    initTypeMappingRegistry();
     }

     /** Tell this service which engine it's deployed to.
@@ -287,29 +300,6 @@
             category.debug(JavaUtils.getMessage("exit00",
                 "SOAPService::undo") );
         }
-    }
-
-    public Element getDeploymentData(Document doc) {
-      if (category.isDebugEnabled()) {
-          category.debug(JavaUtils.getMessage("enter00",
-              "SOAPService::getDeploymentData") );
-      }
-
-      Element  root = doc.createElementNS("", "service");
-
-      fillInDeploymentData(root);
-
-      if (!getTypeMappingRegistry().isEmpty()) {
-        Element elem = doc.createElementNS("", "typeMappings");
-        getTypeMappingRegistry().dumpToElement(elem);
-        root.appendChild(elem);
-      }
-
-      if (category.isDebugEnabled()) {
-          category.debug(JavaUtils.getMessage("exit00",
-              "SOAPService::getDeploymentData") );
-      }
-      return( root );
     }

     /*********************************************************************
Index: xml-axis/java/src/org/apache/axis/server/Transport.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/src/org/apache/axis/server/Transport.java,v
retrieving revision 1.9
diff -u -r1.9 Transport.java
--- xml-axis/java/src/org/apache/axis/server/Transport.java  2001/11/08 21:43:59 1.9
+++ xml-axis/java/src/org/apache/axis/server/Transport.java  2001/12/21 15:09:52
@@ -72,14 +72,4 @@
     static Category category =
             Category.getInstance(Transport.class.getName());

-    public Element getDeploymentData(Document doc) {
-        category.debug(JavaUtils.getMessage("enter00", "Transport::getDeploymentData"));
-
-        Element  root = doc.createElementNS("", "transport");
-
-        fillInDeploymentData(root);
-
-        category.debug(JavaUtils.getMessage("exit00", "Transport::getDeploymentData"));
-        return( root );
-    }
 }
Index: xml-axis/java/test/functional/TestTCPTransportSample.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/test/functional/TestTCPTransportSample.java,v
retrieving revision 1.16
diff -u -r1.16 TestTCPTransportSample.java
--- xml-axis/java/test/functional/TestTCPTransportSample.java     2001/12/03 23:23:03 1.16
+++ xml-axis/java/test/functional/TestTCPTransportSample.java     2001/12/21 15:09:53
@@ -99,8 +99,7 @@
             Service  service = new Service();
             Call     call    = (Call) service.createCall();

-            SimpleTargetedChain c = new SimpleTargetedChain();
-            c.setPivotHandler(new TCPSender());
+            SimpleTargetedChain c = new SimpleTargetedChain(new TCPSender());
             service.getEngine().deployTransport("tcp", c);

             call.setTargetEndpointAddress( new URL("tcp://localhost:8088") );
Index: xml-axis/java/test/session/TestSimpleSession.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/test/session/TestSimpleSession.java,v
retrieving revision 1.5
diff -u -r1.5 TestSimpleSession.java
--- xml-axis/java/test/session/TestSimpleSession.java   2001/11/25 19:11:59 1.5
+++ xml-axis/java/test/session/TestSimpleSession.java   2001/12/21 15:09:53
@@ -71,14 +71,15 @@
     public void testSessionService() throws Exception
     {
         // Set up the server side
-        SOAPService service = new SOAPService(new RPCProvider());
         SimpleSessionHandler sessionHandler = new SimpleSessionHandler();
         // Set a 3-second reap period, and a 3-second timeout
         sessionHandler.setReapPeriodicity(3000);
         sessionHandler.setDefaultSessionTimeout(3000);

-        service.setRequestHandler(sessionHandler);
-        service.setResponseHandler(sessionHandler);
+        SOAPService service = new SOAPService(sessionHandler,
+                              new RPCProvider(),
+                              sessionHandler);
+
         service.setOption("scope", "session");
         service.setOption("className", "test.session.TestSimpleSession");
         service.setOption("methodName", "counter");


Mime
View raw message