axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject cvs commit: xml-axis/java/test/session TestSimpleSession.java
Date Wed, 06 Feb 2002 15:27:43 GMT
glyn        02/02/06 07:27:43

  Modified:    java/samples/transport/tcp AdminClient.java
               java/src/org/apache/axis EngineConfigurationFactory.java
               java/src/org/apache/axis/configuration
                        DefaultEngineConfigurationFactory.java
               java/test/functional TestTCPTransportSample.java
               java/test/session TestSimpleSession.java
  Log:
  Delete getXxxEngineConfigWithYyy nonsense from engine configuration factory.
  Their callers use getXxxEngineConfig and then augment the returned config.
  using a SimpleProvider.
  
  Revision  Changes    Path
  1.15      +9 -2      xml-axis/java/samples/transport/tcp/AdminClient.java
  
  Index: AdminClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/transport/tcp/AdminClient.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- AdminClient.java	5 Feb 2002 16:25:38 -0000	1.14
  +++ AdminClient.java	6 Feb 2002 15:27:43 -0000	1.15
  @@ -57,7 +57,9 @@
   
   import org.apache.axis.client.Call;
   import org.apache.axis.SimpleTargetedChain;
  +import org.apache.axis.EngineConfiguration;
   import org.apache.axis.configuration.DefaultEngineConfigurationFactory;
  +import org.apache.axis.configuration.SimpleProvider;
   
   import javax.xml.rpc.namespace.QName;
   
  @@ -75,10 +77,15 @@
           Call.addTransportPackage("samples.transport");
           Call.setTransportForProtocol("tcp", TCPTransport.class);
   
  +        // Deploy the transport on top of the default client configuration.
  +        EngineConfiguration defaultConfig = 
  +            (new DefaultEngineConfigurationFactory()).
  +            getClientEngineConfig();
  +        SimpleProvider config = new SimpleProvider(defaultConfig);
           SimpleTargetedChain c = new SimpleTargetedChain(new TCPSender());
  +        config.deployTransport("tcp", c);
   
  -        AdminClient.setDefaultConfiguration((new DefaultEngineConfigurationFactory())
  -            .getClientEngineConfigWithTransport(new QName(null, "tcp"), c));
  +        AdminClient.setDefaultConfiguration(config);
   
           try {
               org.apache.axis.client.AdminClient client =
  
  
  
  1.2       +0 -23     xml-axis/java/src/org/apache/axis/EngineConfigurationFactory.java
  
  Index: EngineConfigurationFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/EngineConfigurationFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EngineConfigurationFactory.java	5 Feb 2002 16:25:38 -0000	1.1
  +++ EngineConfigurationFactory.java	6 Feb 2002 15:27:43 -0000	1.2
  @@ -83,27 +83,4 @@
        * @return a server EngineConfiguration
        */
       public EngineConfiguration getServerEngineConfig();
  -   
  -    /**
  -     * Get a default client engine configuration plus the specified
  -     * transport Handler. This method is particularly useful for testcases.
  -     *
  -     * @param name a QName that identifies the transport
  -     * @param transport a Handler for the transport
  -     * @return a client EngineConfiguration
  -     */
  -    public EngineConfiguration getClientEngineConfigWithTransport(QName qname,
  -                                                                  Handler transport);
  -   
  -
  -    /**
  -     * Get a default server engine configuration plus the specified
  -     * service Handler. This method is particularly useful for testcases.
  -     *
  -     * @param name a QName that identifies the service
  -     * @param service a Handler for the service
  -     * @return a server EngineConfiguration
  -     */
  -    public EngineConfiguration getServerEngineConfigWithService(QName qname,
  -                                                                Handler service);
   }
  
  
  
  1.2       +0 -41     xml-axis/java/src/org/apache/axis/configuration/DefaultEngineConfigurationFactory.java
  
  Index: DefaultEngineConfigurationFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/configuration/DefaultEngineConfigurationFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultEngineConfigurationFactory.java	5 Feb 2002 16:25:38 -0000	1.1
  +++ DefaultEngineConfigurationFactory.java	6 Feb 2002 15:27:43 -0000	1.2
  @@ -57,9 +57,6 @@
   
   import org.apache.axis.EngineConfigurationFactory;
   import org.apache.axis.EngineConfiguration;
  -import javax.xml.rpc.namespace.QName;
  -import org.apache.axis.Handler;
  -import org.apache.axis.handlers.soap.SOAPService;
   import org.apache.axis.Constants;
   
   /**
  @@ -135,44 +132,6 @@
               return new FileProvider(serverConfigFile);
           } else {
               return userFactory.getServerEngineConfig();
  -        }
  -    }
  -   
  -    /**
  -     * Get a default client engine configuration plus the specified
  -     * transport Handler. This method is particularly useful for testcases.
  -     *
  -     * @param name a QName that identifies the transport
  -     * @param transport a Handler for the transport
  -     * @return a client EngineConfiguration
  -     */
  -    public EngineConfiguration getClientEngineConfigWithTransport(QName qname,
  -                                                                  Handler transport) {
  -        if (userFactory == null) {
  -            SimpleProvider config = new SimpleProvider(new FileProvider(clientConfigFile));
  -            config.deployTransport(qname, transport);
  -            return config;
  -        } else {
  -            return userFactory.getClientEngineConfigWithTransport(qname, transport);
  -        }
  -    }
  -
  -    /**
  -     * Get a default server engine configuration plus the specified
  -     * service Handler. This method is particularly useful for testcases.
  -     *
  -     * @param name a QName that identifies the service
  -     * @param service a Handler for the service
  -     * @return a server EngineConfiguration
  -     */
  -    public EngineConfiguration getServerEngineConfigWithService(QName qname,
  -                                                                Handler service) {
  -        if (userFactory == null) {
  -            SimpleProvider config = new SimpleProvider(new FileProvider(serverConfigFile));
  -            config.deployService(qname, (SOAPService)service);
  -            return config;
  -        } else {
  -            return userFactory.getServerEngineConfigWithService(qname, service);
           }
       }
   }
  
  
  
  1.22      +7 -3      xml-axis/java/test/functional/TestTCPTransportSample.java
  
  Index: TestTCPTransportSample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestTCPTransportSample.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- TestTCPTransportSample.java	5 Feb 2002 16:25:39 -0000	1.21
  +++ TestTCPTransportSample.java	6 Feb 2002 15:27:43 -0000	1.22
  @@ -64,6 +64,7 @@
   import org.apache.axis.encoding.XMLType;
   import org.apache.axis.EngineConfiguration;
   import org.apache.axis.configuration.DefaultEngineConfigurationFactory;
  +import org.apache.axis.configuration.SimpleProvider;
   import org.apache.log4j.Category;
   import samples.transport.tcp.AdminClient;
   import samples.transport.tcp.GetQuote;
  @@ -101,10 +102,13 @@
               tester.getQuote(new String [] { "-ltcp://localhost:8088", "XXX" });
               String   symbol = "XXX"; // args[0] ;
   
  -            SimpleTargetedChain c = new SimpleTargetedChain(new TCPSender());
  -            EngineConfiguration config =
  +            EngineConfiguration defaultConfig =
                   (new DefaultEngineConfigurationFactory()).
  -                getClientEngineConfigWithTransport(new QName(null, "tcp"), c);
  +                getClientEngineConfig();
  +            SimpleProvider config = new SimpleProvider(defaultConfig);
  +            SimpleTargetedChain c = new SimpleTargetedChain(new TCPSender());
  +            config.deployTransport("tcp", c);
  +
               Service service = new Service(config);
   
               Call     call    = (Call) service.createCall();
  
  
  
  1.11      +6 -4      xml-axis/java/test/session/TestSimpleSession.java
  
  Index: TestSimpleSession.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/session/TestSimpleSession.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TestSimpleSession.java	5 Feb 2002 16:25:39 -0000	1.10
  +++ TestSimpleSession.java	6 Feb 2002 15:27:43 -0000	1.11
  @@ -12,6 +12,7 @@
   import org.apache.axis.server.AxisServer;
   import org.apache.axis.MessageContext;
   import org.apache.axis.EngineConfiguration;
  +import org.apache.axis.configuration.SimpleProvider;
   import org.apache.axis.configuration.XMLStringProvider;
   import org.apache.axis.configuration.DefaultEngineConfigurationFactory;
   import org.apache.axis.deployment.wsdd.WSDDConstants;
  @@ -89,10 +90,11 @@
           service.setOption("className", "test.session.TestSimpleSession");
           service.setOption("allowedMethods", "counter");
   
  -        EngineConfiguration config =
  -            (new DefaultEngineConfigurationFactory()).
  -            getServerEngineConfigWithService(new QName(null, "sessionTest"),
  -                                             service);
  +        EngineConfiguration defaultConfig =
  +            (new DefaultEngineConfigurationFactory()).getServerEngineConfig();
  +        SimpleProvider config = new SimpleProvider(defaultConfig);
  +        config.deployService("sessionTest", service);
  +
           AxisServer server = new AxisServer(config);
   
           // Set up the client side (using the WSDD above)
  
  
  

Mime
View raw message