axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/test/outparams TestOutParams.java
Date Wed, 31 Oct 2001 23:50:22 GMT
gdaniels    01/10/31 15:50:22

  Modified:    java     build.xml
               java/samples/bidbuy deploy.xml
               java/samples/echo deploy.xml
               java/samples/proxy ProxyService.java deploy.xml
               java/samples/stock GetQuote1.java testit.cmd testit.sh
               java/samples/transport FileTest.java
               java/samples/transport/tcp GetQuote.java TCPListener.java
               java/src/org/apache/axis AxisEngine.java Constants.java
                        FaultableHandler.java MessageContext.java
                        Supplier.java
               java/src/org/apache/axis/client AdminClient.java
                        AxisClient.java
               java/src/org/apache/axis/deployment DeployableItem.java
                        DeploymentDocument.java DeploymentException.java
                        DeploymentRegistry.java
                        SimpleDeploymentManager.java
               java/src/org/apache/axis/deployment/v2dd
                        DeploymentDescriptor.java V2DDDeployableItem.java
               java/src/org/apache/axis/deployment/wsdd
                        SimpleWsddDeploymentManager.java WSDDChain.java
                        WSDDConstants.java WSDDDeployableItem.java
                        WSDDDeployment.java WSDDDocument.java
                        WSDDElement.java WSDDFlow.java
                        WSDDGlobalConfiguration.java WSDDHandler.java
                        WSDDProvider.java WSDDService.java
                        WSDDTransport.java WSDDTypeMapping.java
               java/src/org/apache/axis/deployment/wsml ServiceMapping.java
                        WSMLDeployableItem.java
               java/src/org/apache/axis/encoding
                        SOAPTypeMappingRegistry.java
                        SerializationContext.java TypeMappingRegistry.java
               java/src/org/apache/axis/message MessageElement.java
                        SOAPEnvelope.java
               java/src/org/apache/axis/registries SupplierRegistry.java
               java/src/org/apache/axis/server AxisServer.java
               java/src/org/apache/axis/suppliers SimpleChainSupplier.java
                        TargetedChainSupplier.java TransportSupplier.java
               java/src/org/apache/axis/transport/http AdminServlet.java
                        AxisServlet.java SimpleAxisServer.java
               java/src/org/apache/axis/transport/local LocalSender.java
               java/src/org/apache/axis/utils Admin.java
               java/test/RPCDispatch TestRPC.java TestSerializedRPC.java
               java/test/encoding TestArrayListConversions.java
                        TestBody.java
               java/test/functional FunctionalTests.java
                        TestStockSample.java TestTCPTransportSample.java
                        TestTransportSample.java
               java/test/outparams TestOutParams.java
  Added:       java/samples/stock deploy.wsdd
               java/src/org/apache/axis/client client-config.wsdd
               java/src/org/apache/axis/configuration NullProvider.java
               java/src/org/apache/axis/deployment/simple
                        SimpleHandler.java
               java/src/org/apache/axis/deployment/wsdd
                        WSDDTypeMappingContainer.java
               java/src/org/apache/axis/deployment/wsdd/providers
                        WSDDHandlerProvider.java
               java/src/org/apache/axis/encoding ElementSerializer.java
               java/src/org/apache/axis/server server-config.wsdd
  Removed:     java/samples/stock deploy.xml
               java/src/org/apache/axis/client client-config.xml
               java/src/org/apache/axis/description ServiceBinding.java
                        ServiceDescription.java ServiceOperation.java
                        ServiceOperationPart.java readme
               java/src/org/apache/axis/server server-config.xml
  Log:
  WSDD integration!
  
  There's a lot here, and I want to get home, but the functional tests do work
  on my machine with these changes.  Hopefully this will be true for you too!
  Note that the old syntax for configuration still works, with a small caveat
  or two.  The big one is that Service pivots may ONLY be "RPCDispatcher" or
  "MsgDispatcher", not custom chains.  I altered the deploy.xml's which were
  affected by this in the samples.
  
  SOME DETAILS:
  
  * The engine now gets all its Handlers and Services and such from a
     DeploymentManager which is initialized by a WSDD document.  This
     connects with the whole config/deploy conversation, which I'd love to
     get closure on in the next week or so. (nailing down where everything
     comes from, how pluggable we want/need to be, the whole JNDI
     situation, etc.)
  
  * Changed newInstance() to getInstance() in DeployableItem - since we may
    want to cache/pool/etc., this seemed more intuitive
  
  * Removed all direct usage of HandlerRegistries, always going through the
    AxisEngine or DeploymentRegistry APIs instead.
  
  * Switch the default config from *.xml to *.wsdd
  
  * Added an ElementSerializer while I was working on this, too
  
  * Added initial support for polymorphic serialization - will look for
    serializers for the class, followed by all implemented interfaces,
    and do that for each class up the hierarchy (see TypeMappingRegistry for
    details)
  
  * Took out a couple of places where we were re-initializing the Engine
  
  ISSUES + COMMENTS:
  
  The encodingStyle support still needs to be hooked in (though I don't think
  it'll really get much usage judging from the current SOAP community).
  
  The "provider" configuration is still a little grotty, and I'd like to figure
  out a final nice form for this.  Will send a more detailed message to the
  list on this subject in the next day or so.
  
  When new services are deployed into an active engine, an in-memory version of
  the DOM document is modified via the WSDD APIs.  Therefore the resulting
  server-config.wsdd files are in the order of deployment, not arranged via type
  like server-config.xml used to be.  Also, this does NOT catch duplicates,
  so after running the functional tests, you end up with a rather large
  server-config.wsdd file.  This will get fixed.
  
  Right now we still use the Admin class to configure the engine via the
  usual FileProvider.  There's a new method, processWSDD(), which hands off
  deployment tasks to the WSDD code if the Admin class notices the root element
  is in the WSDD namespace. The old style XML configuration will continue to
  work through this next release as well, but when it disappears we can clean up
  a lot of code, including the Admin class.
  
  STILL TO DO:
  
  * Cleanup (probably including some refactoring)
  
  * Test writing
  
  * Fix generated WSDD docs so they look better (organization and no dups)
  
  * Several places which used to use "client" deployment via the Admin class
    (in particular the transport tests) have been switched to hardcoded transport
    deployments.  I'll work on getting the equivalent functionality into WSDD,
    but it's not there yet.
  
  * Switch all the samples and tests over to using WSDD (only the stock sample
    does it now)
  
  OK, that's it for now.  I'll be working on this more tomorrow, so if any
  issues arise I'll be on them quickly.
  
  Revision  Changes    Path
  1.73      +2 -2      xml-axis/java/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/build.xml,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- build.xml	2001/10/27 20:27:24	1.72
  +++ build.xml	2001/10/31 23:50:18	1.73
  @@ -165,9 +165,9 @@
         <exclude name="org/apache/axis/security/servlet/*" unless="servlet.present"/>
         <exclude name="**/*TestSuite.java" unless="junit.present"/>
       </javac>
  -    <copy file="${src.dir}/org/apache/axis/server/server-config.xml"
  +    <copy file="${src.dir}/org/apache/axis/server/server-config.wsdd"
             toDir="${build.dest}/org/apache/axis/server"/>
  -    <copy file="${src.dir}/org/apache/axis/client/client-config.xml"
  +    <copy file="${src.dir}/org/apache/axis/client/client-config.wsdd"
             toDir="${build.dest}/org/apache/axis/client"/>
       <copy file="${src.dir}/log4j.properties"
             toDir="${build.dest}"/>
  
  
  
  1.10      +2 -6      xml-axis/java/samples/bidbuy/deploy.xml
  
  Index: deploy.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/bidbuy/deploy.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- deploy.xml	2001/10/19 01:36:50	1.9
  +++ deploy.xml	2001/10/31 23:50:18	1.10
  @@ -8,9 +8,7 @@
   <!-- This file will be replaced by WSDD once it's ready         -->
   
   <m:deploy xmlns:m="AdminService">
  -  <chain   name="bid"     flow="RPCDispatcher" />
  -
  -  <service name="http://www.soapinterop.org/Bid" pivot="bid" >
  +  <service name="http://www.soapinterop.org/Bid" pivot="RPCDispatcher" >
       <option name="className" value="samples.bidbuy.BidService" />
       <option name="methodName" value="RequestForQuote SimpleBuy Buy Ping" />
     </service>
  @@ -22,10 +20,8 @@
     </beanMappings>
   
     <!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
  -
  -  <chain   name="registry"  flow="RPCDispatcher" />
   
  -  <service name="http://www.soapinterop.org/Registry" pivot="registry" >
  +  <service name="http://www.soapinterop.org/Registry" pivot="RPCDispatcher" >
      <option name="className" value="samples.bidbuy.RegistryService" />
      <option name="methodName" value="Register Unregister Lookup LookupAsString"/>
     </service>
  
  
  
  1.3       +1 -3      xml-axis/java/samples/echo/deploy.xml
  
  Index: deploy.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/echo/deploy.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- deploy.xml	2001/07/08 14:18:35	1.2
  +++ deploy.xml	2001/10/31 23:50:18	1.3
  @@ -8,9 +8,7 @@
   <!-- This file will be replaced by WSDD once it's ready         -->
   
   <m:deploy xmlns:m="AdminService">
  -  <chain   name="echo"   flow="RPCDispatcher" />
  -
  -  <service name="http://soapinterop.org/" pivot="echo" >
  +  <service name="http://soapinterop.org/" pivot="RPCDispatcher" >
       <option name="className" value="samples.echo.EchoService" />
       <option name="methodName" value="*" />
     </service>
  
  
  
  1.8       +6 -0      xml-axis/java/samples/proxy/ProxyService.java
  
  Index: ProxyService.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/proxy/ProxyService.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ProxyService.java	2001/10/30 16:46:32	1.7
  +++ ProxyService.java	2001/10/31 23:50:19	1.8
  @@ -59,10 +59,12 @@
   import org.apache.axis.Handler;
   import org.apache.axis.Message;
   import org.apache.axis.MessageContext;
  +import org.apache.axis.SimpleTargetedChain;
   import org.apache.axis.client.Call;
   import org.apache.axis.client.Service;
   import org.w3c.dom.Document;
   import samples.transport.tcp.TCPTransport;
  +import samples.transport.tcp.TCPSender;
   
   /**
    * Proxy sample.  Relays message on to hardcoded URL.
  @@ -91,6 +93,10 @@
               Service service = new Service();
               Call    call = (Call) service.createCall();
               call.setEngine( msgContext.getAxisEngine().getClientEngine() );
  +
  +            SimpleTargetedChain c = new SimpleTargetedChain();
  +            c.setPivotHandler(new TCPSender());
  +	    call.getEngine().deployTransport("tcp", c);
       
               // add TCP for proxy testing
               call.addTransportPackage("samples.transport");
  
  
  
  1.2       +1 -3      xml-axis/java/samples/proxy/deploy.xml
  
  Index: deploy.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/proxy/deploy.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- deploy.xml	2001/07/10 22:52:38	1.1
  +++ deploy.xml	2001/10/31 23:50:19	1.2
  @@ -1,12 +1,10 @@
   <m:deploy xmlns:m="AdminService">
   
  -  <chain   name="proxyPivot"   flow="MsgDispatcher" />
  -
     <!-- NEED TO DEPLOY HTTPActionHandler FOR THE FIRST TIME EVER?!?!?! - RobJ -->
     <handler name="HTTPActionHandler" class="org.apache.axis.handlers.http.HTTPActionHandler"/>
     <transport name="SimpleHTTP" pivot="HTTPSender" request="HTTPActionHandler" />
    
  -  <service name="ProxyService" pivot="proxyPivot" >
  +  <service name="ProxyService" pivot="MsgDispatcher" >
       <option name="className" value="samples.proxy.ProxyService" />
       <option name="methodName" value="ProxyService" />
       <option name="FullMessageService" value="true" />
  
  
  
  1.16      +2 -1      xml-axis/java/samples/stock/GetQuote1.java
  
  Index: GetQuote1.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/stock/GetQuote1.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- GetQuote1.java	2001/10/30 16:46:32	1.15
  +++ GetQuote1.java	2001/10/31 23:50:19	1.16
  @@ -119,7 +119,8 @@
   
         /* Get symbol and invoke the service */
         /*************************************/
  -      Object result = call.invoke( new Object[] { symbol = args[0] } );
  +        Object result = call.invoke( new Object[] { symbol = args[0] } );
  +        result = call.invoke( new Object[] { symbol = args[0] } );
   
         return( ((Float) result).floatValue() );
       }
  
  
  
  1.13      +1 -1      xml-axis/java/samples/stock/testit.cmd
  
  Index: testit.cmd
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/stock/testit.cmd,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- testit.cmd	2001/10/19 13:20:27	1.12
  +++ testit.cmd	2001/10/31 23:50:19	1.13
  @@ -4,7 +4,7 @@
   java samples.stock.GetQuote -uuser1 -wpass1 XXX -s/axis/StockQuoteService.jws %*
   
   @echo Deploy everything first
  -java org.apache.axis.client.AdminClient deploy.xml %*
  +java org.apache.axis.client.AdminClient deploy.wsdd %*
   
   @echo These next 3 should work...
   java samples.stock.GetQuote -uuser1 -wpass1 XXX %*
  
  
  
  1.11      +1 -1      xml-axis/java/samples/stock/testit.sh
  
  Index: testit.sh
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/stock/testit.sh,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- testit.sh	2001/10/19 13:20:27	1.10
  +++ testit.sh	2001/10/31 23:50:19	1.11
  @@ -2,7 +2,7 @@
   # this assumes webserver is running on port 8080
   
   echo "Deploy everything first"
  -java org.apache.axis.client.AdminClient deploy.xml $*
  +java org.apache.axis.client.AdminClient deploy.wsdd $*
   
   echo "These next 3 should work..."
   java samples.stock.GetQuote -uuser1 -wpass1 XXX $*
  
  
  
  1.1                  xml-axis/java/samples/stock/deploy.wsdd
  
  Index: deploy.wsdd
  ===================================================================
  <!-- Use this file to deploy some handlers/chains and services  -->
  <!-- Two ways to do this:                                       -->
  <!--   java org.apache.axis.utils.Admin deploy.xml              -->
  <!--      from the same dir that the Axis engine runs           -->
  <!-- or                                                         -->
  <!--   java org.apache.axis.client.http.AdminClient deploy.xml  -->
  <!--      after the axis server is running                      -->
  <!-- This file will be replaced by WSDD once it's ready         -->
  
   <deployment 	name="test" xmlns="http://xml.apache.org/axis/wsdd/" 
  			xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
  			xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance">
    <service name="urn:xmltoday-delayed-quotes">
      <parameter name="className" value="samples.stock.StockQuoteService" />
      <parameter name="methodName" value="getQuote" />
      <parameter name="allowedRoles" value="user1,user2"/>
  
      <requestFlow name="checks">
        <handler type="java:org.apache.axis.handlers.SimpleAuthenticationHandler" />
        <handler type="java:org.apache.axis.handlers.SimpleAuthorizationHandler" />
      </requestFlow>
  
      <provider type="java:org.apache.axis.providers.java.RPCProvider" >
       <java:provider className="samples.stock.StockQuoteService"/>
      </provider>
    </service>
  
    <service name="urn:cominfo">
      <parameter name="className" value="samples.stock.ComInfoService" />
      <parameter name="methodName" value="getInfo" />
      <parameter name="allowedRoles" value="user3"/>
  
      <requestFlow type="checks"/>
  
      <provider type="java:org.apache.axis.providers.java.RPCProvider" >
       <java:provider className="samples.stock.ComInfoService"/>
      </provider>
    </service>
   </deployment>
  
  
  
  
  1.18      +4 -9      xml-axis/java/samples/transport/FileTest.java
  
  Index: FileTest.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/transport/FileTest.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- FileTest.java	2001/10/18 13:28:37	1.17
  +++ FileTest.java	2001/10/31 23:50:19	1.18
  @@ -1,6 +1,7 @@
   package samples.transport ;
   
   import org.apache.axis.AxisEngine;
  +import org.apache.axis.SimpleTargetedChain;
   import org.apache.axis.client.Call;
   import org.apache.axis.client.Service;
   import org.apache.axis.client.Transport;
  @@ -37,15 +38,9 @@
           AxisEngine engine = call.getEngine();
   
           // Manually deploy file sender and file transport for this example
  -        engine.deployHandler("FileSender", new FileSender());
  -        engine.deployTransport("FileTransport",
  -                               new TransportSupplier("FileTransport",
  -                                                     null,
  -                                                     null,
  -                                                     "FileSender",
  -                                                     null,
  -                                                     engine.getHandlerRegistry())
  -                                );
  +        SimpleTargetedChain c = new SimpleTargetedChain();
  +        c.setPivotHandler(new FileSender());
  +        engine.deployTransport("FileTransport", c);
   
           call.setOperationName( "getQuote" );
           call.addParameter( "symbol", XMLType.XSD_STRING, Call.PARAM_MODE_IN );
  
  
  
  1.12      +123 -117  xml-axis/java/samples/transport/tcp/GetQuote.java
  
  Index: GetQuote.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/transport/tcp/GetQuote.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- GetQuote.java	2001/10/30 16:46:32	1.11
  +++ GetQuote.java	2001/10/31 23:50:19	1.12
  @@ -1,61 +1,62 @@
   /*
  - * The Apache Software License, Version 1.1
  - *
  - *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  - * reserved.
  - *
  - * Redistribution and use in source and binary forms, with or without
  - * modification, are permitted provided that the following conditions
  - * are met:
  - *
  - * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer.
  - *
  - * 2. Redistributions in binary form must reproduce the above copyright
  - *    notice, this list of conditions and the following disclaimer in
  - *    the documentation and/or other materials provided with the
  - *    distribution.
  - *
  - * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:
  - *       "This product includes software developed by the
  - *        Apache Software Foundation (http://www.apache.org/)."
  - *    Alternately, this acknowledgment may appear in the software itself,
  - *    if and wherever such third-party acknowledgments normally appear.
  - *
  - * 4. The names "Axis" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written
  - *    permission, please contact apache@apache.org.
  - *
  - * 5. Products derived from this software may not be called "Apache",
  - *    nor may "Apache" appear in their name, without prior written
  - *    permission of the Apache Software Foundation.
  - *
  - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  - * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  - * SUCH DAMAGE.
  - * ====================================================================
  - *
  - * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  - */
  +* The Apache Software License, Version 1.1
  +*
  +*
  +* Copyright (c) 2001 The Apache Software Foundation.  All rights
  +* reserved.
  +*
  +* Redistribution and use in source and binary forms, with or without
  +* modification, are permitted provided that the following conditions
  +* are met:
  +*
  +* 1. Redistributions of source code must retain the above copyright
  +*    notice, this list of conditions and the following disclaimer.
  +*
  +* 2. Redistributions in binary form must reproduce the above copyright
  +*    notice, this list of conditions and the following disclaimer in
  +*    the documentation and/or other materials provided with the
  +*    distribution.
  +*
  +* 3. The end-user documentation included with the redistribution,
  +*    if any, must include the following acknowledgment:
  +*       "This product includes software developed by the
  +*        Apache Software Foundation (http://www.apache.org/)."
  +*    Alternately, this acknowledgment may appear in the software itself,
  +*    if and wherever such third-party acknowledgments normally appear.
  +*
  +* 4. The names "Axis" and "Apache Software Foundation" must
  +*    not be used to endorse or promote products derived from this
  +*    software without prior written permission. For written
  +*    permission, please contact apache@apache.org.
  +*
  +* 5. Products derived from this software may not be called "Apache",
  +*    nor may "Apache" appear in their name, without prior written
  +*    permission of the Apache Software Foundation.
  +*
  +* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  +* DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  +* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  +* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  +* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  +* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  +* SUCH DAMAGE.
  +* ====================================================================
  +*
  +* This software consists of voluntary contributions made by many
  +* individuals on behalf of the Apache Software Foundation.  For more
  +* information on the Apache Software Foundation, please see
  +* <http://www.apache.org/>.
  +*/
   
   package samples.transport.tcp ;
   
   import org.apache.axis.AxisFault;
  +import org.apache.axis.SimpleTargetedChain;
   import org.apache.axis.client.Call;
   import org.apache.axis.client.Service;
   import org.apache.axis.client.Transport;
  @@ -72,80 +73,85 @@
   public class GetQuote {
       public  String symbol ;
       
  -  // helper function; does all the real work
  +    // helper function; does all the real work
       public float getQuote (String args[]) throws Exception {
  -      Call.addTransportPackage("samples.transport");
  +        Call.addTransportPackage("samples.transport");
           Call.setTransportForProtocol("tcp", TCPTransport.class);
  -
  -      Options opts = new Options( args );
  -
  -      args = opts.getRemainingArgs();
  -
  -      if ( args == null ) {
  -        System.err.println( "Usage: GetQuote <symbol>" );
  -        System.exit(1);
  -      }
  -
  -      String namespace = "urn:xmltoday-delayed-quotes";
  -      symbol = args[0] ;
  -
  -      Service service = new Service();
  -      Call call = (Call)service.createCall();
  -      call.setTransport(new TCPTransport());
  -
  +        
  +        Options opts = new Options( args );
  +        
  +        args = opts.getRemainingArgs();
  +        
  +        if ( args == null ) {
  +            System.err.println( "Usage: GetQuote <symbol>" );
  +            System.exit(1);
  +        }
  +        
  +        String namespace = "urn:xmltoday-delayed-quotes";
  +        symbol = args[0] ;
  +        
  +        Service service = new Service();
  +        Call call = (Call)service.createCall();
  +        
  +        SimpleTargetedChain c = new SimpleTargetedChain();
  +        c.setPivotHandler(new TCPSender());
  +        call.getEngine().deployTransport("tcp", c);
  +        
  +        call.setTransport(new TCPTransport());
  +        
           call.setTargetEndpointAddress( new URL(opts.getURL()) );
           call.setOperationName( "getQuote" );
           call.setProperty( Call.NAMESPACE, "urn:xmltoday-delayed-quotes" );
           call.addParameter( "symbol", XMLType.XSD_STRING, Call.PARAM_MODE_IN );
           call.setReturnType( XMLType.XSD_FLOAT );
  -
  -      // TESTING HACK BY ROBJ
  -      if (symbol.equals("XXX_noaction")) {
  -          symbol = "XXX";
  -          call.setProperty( HTTPConstants.MC_HTTP_SOAPACTION, "" );
  -      }
  -
  +        
  +        // TESTING HACK BY ROBJ
  +        if (symbol.equals("XXX_noaction")) {
  +            symbol = "XXX";
  +            call.setProperty( HTTPConstants.MC_HTTP_SOAPACTION, "" );
  +        }
  +        
           call.setProperty( Transport.USER, opts.getUser() );
           call.setProperty( Transport.PASSWORD, opts.getPassword() );
  -
  -      // useful option for profiling - perhaps we should remove before
  -      // shipping?
  -      String countOption = opts.isValueSet('c');
  -      int count=1;
  -      if ( countOption != null) {
  -        count=Integer.valueOf(countOption).intValue();
  -        System.out.println("Iterating " + count + " times");
  -      }
  -
  -      Float res = new Float(0.0F);
  -      for (int i=0; i<count; i++) {
  -          Object ret = call.invoke(new Object[] {symbol} );
  -          if (ret instanceof String) {
  -              System.out.println("Received problem response from server: "+ret);
  -              throw new AxisFault("", (String)ret, null, null);
  -          }
  -        res = (Float) ret;
  -      }
  -
  +        
  +        // useful option for profiling - perhaps we should remove before
  +        // shipping?
  +        String countOption = opts.isValueSet('c');
  +        int count=1;
  +        if ( countOption != null) {
  +            count=Integer.valueOf(countOption).intValue();
  +            System.out.println("Iterating " + count + " times");
  +        }
  +        
  +        Float res = new Float(0.0F);
  +        for (int i=0; i<count; i++) {
  +            Object ret = call.invoke(new Object[] {symbol} );
  +            if (ret instanceof String) {
  +                System.out.println("Received problem response from server: "+ret);
  +                throw new AxisFault("", (String)ret, null, null);
  +            }
  +            res = (Float) ret;
  +        }
  +        
           return res.floatValue();
  -    }
  -
  -  public static void main(String args[]) {
  -    try {
  -        GetQuote gq = new GetQuote();
  -        float val = gq.getQuote(args);
  -        // args array gets side-effected
  -        System.out.println(gq.symbol + ": " + val);
       }
  -    catch( Exception e ) {
  -        if ( e instanceof AxisFault ) {
  -            ((AxisFault)e).dump();
  -        } else
  -            e.printStackTrace();
  +    
  +    public static void main(String args[]) {
  +        try {
  +            GetQuote gq = new GetQuote();
  +            float val = gq.getQuote(args);
  +            // args array gets side-effected
  +            System.out.println(gq.symbol + ": " + val);
  +        }
  +        catch( Exception e ) {
  +            if ( e instanceof AxisFault ) {
  +                ((AxisFault)e).dump();
  +            } else
  +                e.printStackTrace();
  +        }
       }
  -  }
  -  
  -  public GetQuote () {
  -  };
  -
  +    
  +    public GetQuote () {
  +    };
  +    
   };
  
  
  
  1.10      +8 -8      xml-axis/java/samples/transport/tcp/TCPListener.java
  
  Index: TCPListener.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/transport/tcp/TCPListener.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TCPListener.java	2001/10/30 16:46:32	1.9
  +++ TCPListener.java	2001/10/31 23:50:19	1.10
  @@ -60,7 +60,7 @@
   import org.apache.axis.Message;
   import org.apache.axis.MessageContext;
   import org.apache.axis.SimpleTargetedChain;
  -import org.apache.axis.registries.HandlerRegistry;
  +import org.apache.axis.deployment.DeploymentException;
   import org.apache.axis.server.AxisServer;
   import org.apache.axis.utils.Options;
   import org.apache.log4j.Category;
  @@ -155,15 +155,15 @@
                   engine = new AxisServer();
                   engine.init();
                   
  -                HandlerRegistry hr = engine.getHandlerRegistry();
  -                HandlerRegistry sr = engine.getServiceRegistry();
  -                // add the TCPSender
  -                //hr.add("TCPSender", new TCPSender());
  -                
                   SimpleTargetedChain c = new SimpleTargetedChain();
                   c.setPivotHandler(new TCPSender());
  -                
  -                engine.deployTransport(transportName, c);
  +
  +                try {
  +                    engine.deployTransport(transportName, c);
  +                } catch (DeploymentException e) {
  +                    // !!! We're toast.  What to do about it?
  +                    System.exit(-1);
  +                }
               }
               
               /* Place the Request message in the MessagContext object - notice */
  
  
  
  1.42      +79 -57    xml-axis/java/src/org/apache/axis/AxisEngine.java
  
  Index: AxisEngine.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/AxisEngine.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- AxisEngine.java	2001/10/30 16:46:34	1.41
  +++ AxisEngine.java	2001/10/31 23:50:19	1.42
  @@ -55,6 +55,11 @@
   
   package org.apache.axis;
   
  +import org.apache.axis.deployment.DeploymentRegistry;
  +import org.apache.axis.deployment.DeploymentException;
  +import org.apache.axis.deployment.simple.SimpleHandler;
  +import org.apache.axis.deployment.wsdd.*;
  +import org.apache.axis.deployment.wsdd.providers.WSDDJavaProvider;
   import org.apache.axis.encoding.DeserializerFactory;
   import org.apache.axis.encoding.SOAPTypeMappingRegistry;
   import org.apache.axis.encoding.Serializer;
  @@ -92,19 +97,9 @@
       /** Our go-to guy for configuration... */
       protected ConfigurationProvider configProvider;
   
  -    /** The handler registry this Engine uses. */
  -    protected HandlerRegistry _handlerRegistry = new SupplierRegistry();
  +    protected DeploymentRegistry myRegistry =
  +            new SimpleWsddDeploymentManager();
   
  -    /** The service registry this Engine uses. */
  -    protected HandlerRegistry _serviceRegistry = new SupplierRegistry();
  -
  -    /** A map of protocol names to "client" (sender) transports  */
  -    protected SupplierRegistry transportRegistry = new SupplierRegistry();
  -
  -    /** This Engine's global type mappings     */
  -    protected TypeMappingRegistry _typeMappingRegistry =
  -                                                 new TypeMappingRegistry();
  -
       /** Has the user changed the password yet? */
       protected boolean _hasSafePassword = false;
   
  @@ -144,14 +139,15 @@
       public void init() {
           category.debug("Enter: AxisEngine::init" );
   
  -        _typeMappingRegistry.setParent(SOAPTypeMappingRegistry.getSingleton());
  +        getTypeMappingRegistry().setParent(SOAPTypeMappingRegistry.getSingleton());
   
           try {
               configProvider.configureEngine(this);
           } catch (Exception e) {
  -            // !!! throw new EngineConfigException();
  +            e.printStackTrace();
  +            throw new NullPointerException("Problem deploying!");
           }
  -
  +        
           category.debug("Exit: AxisEngine::init" );
       }
   
  @@ -231,40 +227,47 @@
       {
           this.shouldSaveConfig = shouldSaveConfig;
       }
  -
  -    public HandlerRegistry getHandlerRegistry()
  -    {
  -        return _handlerRegistry;
  -    }
  -
  -    public void setHandlerRegistry(HandlerRegistry registry)
  -    {
  -        _handlerRegistry = registry;
  -    }
  -
  -    public HandlerRegistry getServiceRegistry()
  +    
  +    /**
  +     * (should throw more specific exceptions)
  +     */ 
  +    public Handler getHandler(String name) throws AxisFault
       {
  -        return _serviceRegistry;
  +        return myRegistry.getHandler(new QName(null, name));
       }
  -
  -    public void setServiceRegistry(HandlerRegistry registry)
  +    
  +    /**
  +     * (should throw more specific exceptions)
  +     */ 
  +    public Handler getService(String name) throws AxisFault
       {
  -        _serviceRegistry = registry;
  +        return myRegistry.getService(new QName(null, name));
       }
  -
  -    public SupplierRegistry getTransportRegistry()
  +    
  +    public Handler getTransport(String name) throws AxisFault
       {
  -        return transportRegistry;
  +        return myRegistry.getTransport(new QName(null, name));
       }
   
  -    public void setTransportRegistry(SupplierRegistry registry)
  +    public DeploymentRegistry getDeploymentRegistry()
       {
  -        transportRegistry = registry;
  +        return myRegistry;
       }
  -
  +    
       public TypeMappingRegistry getTypeMappingRegistry()
       {
  -        return _typeMappingRegistry;
  +        TypeMappingRegistry tmr = null;
  +        try {
  +            tmr = myRegistry.getTypeMappingRegistry("");
  +            if (tmr == null) {
  +                tmr = new TypeMappingRegistry();
  +                myRegistry.addTypeMappingRegistry("", tmr);
  +            }
  +        } catch (DeploymentException e) {
  +            category.error(e);
  +        }
  +        
  +        return tmr;
       }
   
       /*********************************************************************
  @@ -300,11 +303,11 @@
           category.info("Registering type mapping " + qName + " -> " +
                          cls.getName());
           if (deserFactory != null)
  -            _typeMappingRegistry.addDeserializerFactory(qName,
  +            getTypeMappingRegistry().addDeserializerFactory(qName,
                                                           cls,
                                                           deserFactory);
           if (serializer != null)
  -            _typeMappingRegistry.addSerializer(cls, qName, serializer);
  +            getTypeMappingRegistry().addSerializer(cls, qName, serializer);
       }
   
       /**
  @@ -312,70 +315,89 @@
        */
       public void unregisterTypeMapping(QName qName, Class cls)
       {
  -        _typeMappingRegistry.removeDeserializer(qName);
  -        _typeMappingRegistry.removeSerializer(cls);
  +        getTypeMappingRegistry().removeDeserializer(qName);
  +        getTypeMappingRegistry().removeSerializer(cls);
       }
   
  +    public void deployWSDD(WSDDDocument doc) throws DeploymentException
  +    {
  +        myRegistry.deploy(doc);
  +    }
  +    
       /**
        * Deploy a Handler into our handler registry
        */
       public void deployHandler(String key, Handler handler)
  +        throws DeploymentException
       {
           handler.setName(key);
  -        getHandlerRegistry().add(key, handler);
  +        WSDDDocument doc = (WSDDDocument)myRegistry.getConfigDocument();
  +        WSDDHandler newHandler = doc.getDeployment().createHandler();
  +        newHandler.setName(key);
  +        newHandler.setType("java:" + handler.getClass().getName());
  +        myRegistry.deployHandler(newHandler);
       }
   
       /**
        * Undeploy (remove) a Handler from the handler registry
        */
       public void undeployHandler(String key)
  +        throws DeploymentException
       {
  -        getHandlerRegistry().remove(key);
  +        myRegistry.removeDeployedItem(new QName("", key));
       }
   
       /**
        * Deploy a Service into our service registry
        */
       public void deployService(String key, SOAPService service)
  +        throws DeploymentException
       {
           category.info("Deploying service '" + key + "' into " + this);
           service.setName(key);
           service.setEngine(this);
  +        
  +        WSDDDocument doc = (WSDDDocument)myRegistry.getConfigDocument();
  +        WSDDService newService = doc.getDeployment().createService();
  +        newService.setName(key);
  +        newService.setOptionsHashtable(service.getOptions());
  +        WSDDProvider provider = newService.createProvider(WSDDJavaProvider.class);
  +        provider.setAttribute("type", "java:" + service.getPivotHandler().getClass().getName());
  +        provider.setProviderAttribute("className", (String)service.getOption("className"));
  +        
  +        myRegistry.deployHandler(newService);
   
  -        getServiceRegistry().add(key, service);
  +        myRegistry.deployService(new SimpleHandler(new QName(null, key),
  +                                                   service));
       }
   
       /**
        * Undeploy (remove) a Service from the handler registry
        */
       public void undeployService(String key)
  +        throws DeploymentException
       {
  -        getServiceRegistry().remove(key);
  +        myRegistry.removeDeployedItem(new QName("", key));
       }
   
       /**
  -     * Deploy a (client) Transport
  +     * Deploy a Transport
        */
       public void deployTransport(String key, Handler transport)
  +        throws DeploymentException
       {
           transport.setName(key);
  -        transportRegistry.add(key, transport);
  -    }
  -
  -    /**
  -     * Deploy a (client) Transport
  -     */
  -    public void deployTransport(String key, Supplier supplier)
  -    {
  -        transportRegistry.add(key, supplier);
  +        myRegistry.deployTransport(new SimpleHandler(new QName("", transport.getName()),
  +                                                     transport));
       }
   
       /**
        * Undeploy (remove) a client Transport
        */
       public void undeployTransport(String key)
  +        throws DeploymentException
       {
  -        transportRegistry.remove(key);
  +        myRegistry.removeDeployedItem(new QName("", key));
       }
   
       /**
  
  
  
  1.41      +2 -2      xml-axis/java/src/org/apache/axis/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Constants.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- Constants.java	2001/10/30 16:46:34	1.40
  +++ Constants.java	2001/10/31 23:50:19	1.41
  @@ -198,6 +198,6 @@
       
       public static final String JWSPROCESSOR_TARGET = "JWSProcessor" ;
   
  -    public static final String SERVER_CONFIG_FILE = "server-config.xml";
  -    public static final String CLIENT_CONFIG_FILE = "client-config.xml";
  +    public static final String SERVER_CONFIG_FILE = "server-config.wsdd";
  +    public static final String CLIENT_CONFIG_FILE = "client-config.wsdd";
   }
  
  
  
  1.26      +2 -2      xml-axis/java/src/org/apache/axis/FaultableHandler.java
  
  Index: FaultableHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/FaultableHandler.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- FaultableHandler.java	2001/10/30 16:46:34	1.25
  +++ FaultableHandler.java	2001/10/31 23:50:19	1.26
  @@ -115,7 +115,7 @@
                   fault = new AxisFault( e );
               }
   
  -            HandlerRegistry hr = msgContext.getAxisEngine().getHandlerRegistry();
  +            AxisEngine engine = msgContext.getAxisEngine();
   
               /** Index off fault code.
                *
  @@ -134,7 +134,7 @@
               while (enum.hasMoreElements()) {
                   String s = (String) enum.nextElement();
                   if (s.equals("fault-" + fault.getFaultCode().getLocalPart())) {
  -                    faultHandler = hr.find((String)options.get(s));
  +                    faultHandler = (Handler)options.get(s);
                   }
               }
   
  
  
  
  1.63      +7 -5      xml-axis/java/src/org/apache/axis/MessageContext.java
  
  Index: MessageContext.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/MessageContext.java,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- MessageContext.java	2001/10/30 16:46:34	1.62
  +++ MessageContext.java	2001/10/31 23:50:19	1.63
  @@ -356,14 +356,16 @@
           category.debug("MessageContext: setTargetService(" + tServ+")");
           targetService = tServ ;
   
  -        HandlerRegistry sr = axisEngine.getServiceRegistry();
  -
  -        if (sr == null || targetService == null)
  +        if (targetService == null)
               setServiceHandler(null);
  -        else
  +        else {
               // Do NOT throw an exception if the service handler is not found,
               // since we may be on the client!  -- yow... this is messy. -- RobJ
  -            setServiceHandler(sr.find(tServ));
  +            try {
  +                setServiceHandler(getAxisEngine().getService(tServ));
  +            } catch (AxisFault fault) {
  +            }
  +        }
       }
   
       /** ServiceHandler is the handler that is the "service".  This handler
  
  
  
  1.6       +1 -1      xml-axis/java/src/org/apache/axis/Supplier.java
  
  Index: Supplier.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Supplier.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Supplier.java	2001/10/30 16:46:34	1.5
  +++ Supplier.java	2001/10/31 23:50:19	1.6
  @@ -67,5 +67,5 @@
        * argument to this method to allow for individual Suppliers being a bit
        * more sharable.
        */
  -    public Handler getHandler();
  +    public Handler getHandler() throws AxisFault;
   }
  
  
  
  1.42      +1 -0      xml-axis/java/src/org/apache/axis/client/AdminClient.java
  
  Index: AdminClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/AdminClient.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- AdminClient.java	2001/10/30 16:46:35	1.41
  +++ AdminClient.java	2001/10/31 23:50:19	1.42
  @@ -156,6 +156,7 @@
           StringBuffer sb = new StringBuffer();
   
           Options opts = new Options( args );
  +        opts.setDefaultURL("http://localhost:8080/axis/services/AdminService");
   
           if (opts.isFlagSet('d') > 0) {
               // Set log4j properties... !!!
  
  
  
  1.28      +6 -11     xml-axis/java/src/org/apache/axis/client/AxisClient.java
  
  Index: AxisClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/AxisClient.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- AxisClient.java	2001/10/30 16:46:35	1.27
  +++ AxisClient.java	2001/10/31 23:50:19	1.28
  @@ -62,7 +62,6 @@
   import org.apache.axis.Handler;
   import org.apache.axis.MessageContext;
   import org.apache.axis.SimpleTargetedChain;
  -import org.apache.axis.registries.HandlerRegistry;
   import org.apache.log4j.Category;
   
   /**
  @@ -101,15 +100,12 @@
           String  hName = null ;
           Handler h     = null ;
   
  -        HandlerRegistry hr = getHandlerRegistry();
  -        HandlerRegistry sr = getServiceRegistry();
  -
           try {
               hName = msgContext.getStrProp( MessageContext.ENGINE_HANDLER );
               category.debug( "EngineHandler: " + hName );
   
               if ( hName != null ) {
  -                h = hr.find( hName );
  +                h = getHandler( hName );
                   if ( h != null )
                       h.invoke(msgContext);
                   else
  @@ -140,7 +136,7 @@
                   /* Process the Service Specific Request Chain */
                   /**********************************************/
                   hName =  msgContext.getTargetService();
  -                if ( hName != null && (h = sr.find( hName )) != null ) {
  +                if ( hName != null && (h = getService( hName )) != null ) {
                       if ( h instanceof SimpleTargetedChain ) {
                           service = (SimpleTargetedChain) h ;
                           h = service.getRequestHandler();
  @@ -151,7 +147,7 @@
                   /* Process the Global Request Chain */
                   /**********************************/
                   hName = Constants.GLOBAL_REQUEST ;
  -                if ( hName != null  && (h = hr.find( hName )) != null )
  +                if ( hName != null  && (h = getHandler( hName )) != null )
                       h.invoke(msgContext);
   
                   /** Process the Transport Specific stuff
  @@ -161,16 +157,15 @@
                    * this is the pivot point in the Transport chain.
                    */
                   hName = msgContext.getTransportName();
  -                HandlerRegistry tr = getTransportRegistry();
  -                if ( hName != null && (h = tr.find( hName )) != null )
  +                if ( hName != null && (h = getTransport( hName )) != null )
                       h.invoke(msgContext);
                   else
  -                    msgContext.setPastPivot(true);
  +                    throw new AxisFault("No client transport named '" + hName + "' found!");
   
                   /* Process the Global Response Chain */
                   /***********************************/
                   hName = Constants.GLOBAL_RECEIVE ;
  -                if ( hName != null && (h = hr.find( hName )) != null )
  +                if ( hName != null && (h = getHandler( hName )) != null )
                       h.invoke(msgContext);
   
                   if ( service != null ) {
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/client/client-config.wsdd
  
  Index: client-config.wsdd
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <deployment name="defaultClientConfig"
              xmlns="http://xml.apache.org/axis/wsdd/"
              xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
   <transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>
   <transport name="local" pivot="java:org.apache.axis.transport.local.LocalSender"/>
  </deployment>
  
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/configuration/NullProvider.java
  
  Index: NullProvider.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.axis.configuration;
  
  import org.apache.axis.AxisEngine;
  import org.apache.axis.ConfigurationProvider;
  
  /**
   * A do-nothing ConfigurationProvider
   *
   * @author Glen Daniels (gdaniels@macromedia.com)
   */
  public class NullProvider implements ConfigurationProvider
  {
      public void configureEngine(AxisEngine engine) throws Exception
      {
      }
  
      public void writeEngineConfig(AxisEngine engine) throws Exception
      {
      }
  }
  
  
  
  1.12      +10 -8     xml-axis/java/src/org/apache/axis/deployment/DeployableItem.java
  
  Index: DeployableItem.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/DeployableItem.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DeployableItem.java	2001/10/30 16:46:35	1.11
  +++ DeployableItem.java	2001/10/31 23:50:19	1.12
  @@ -60,24 +60,26 @@
   
   
   /**
  - * Interface representing an item that is deployable into the
  + * Interface representing a Handler-derived object that is deployable into the
    * Axis Deployment Registry
    */
   public interface DeployableItem
   {
  -
       /**
  -     *
  -     * @return XXX
  +     * Get the QName of this item
  +     * 
  +     * @return the QName of this item
        */
       public QName getQName();
   
       /**
  +     * Obtain an instance of this item.
        *
  -     * @param registry XXX
  -     * @return XXX
  -     * @throws Exception XXX
  +     * @param registry the DeploymentRegistry to use for any further lookups
  +     *                 which may occur as a part of this operation
  +     * @return a Handler which is assumedly the correct type
  +     * @throws Exception (!!! probably should be more specific)
        */
  -    public Handler newInstance(DeploymentRegistry registry)
  +    public Handler getInstance(DeploymentRegistry registry)
           throws Exception;
   }
  
  
  
  1.6       +6 -0      xml-axis/java/src/org/apache/axis/deployment/DeploymentDocument.java
  
  Index: DeploymentDocument.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/DeploymentDocument.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DeploymentDocument.java	2001/10/30 16:46:35	1.5
  +++ DeploymentDocument.java	2001/10/31 23:50:19	1.6
  @@ -54,6 +54,8 @@
    */
   package org.apache.axis.deployment;
   
  +import org.w3c.dom.Document;
  +
   /**
    * Represents a deployment descriptor document of some sort
    */
  @@ -67,4 +69,8 @@
        */
       void deploy(DeploymentRegistry registry)
           throws DeploymentException;
  +    
  +    void importItem(DeployableItem item) throws DeploymentException;
  +    
  +    Document getDOMDocument() throws DeploymentException;
   }
  
  
  
  1.6       +3 -1      xml-axis/java/src/org/apache/axis/deployment/DeploymentException.java
  
  Index: DeploymentException.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/DeploymentException.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DeploymentException.java	2001/10/30 16:46:35	1.5
  +++ DeploymentException.java	2001/10/31 23:50:19	1.6
  @@ -54,11 +54,13 @@
    */
   package org.apache.axis.deployment;
   
  +import org.apache.axis.AxisFault;
  +
   /**
    *
    */
   public class DeploymentException
  -    extends Exception
  +    extends AxisFault
   {
   
       /**
  
  
  
  1.14      +48 -2     xml-axis/java/src/org/apache/axis/deployment/DeploymentRegistry.java
  
  Index: DeploymentRegistry.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/DeploymentRegistry.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DeploymentRegistry.java	2001/10/30 16:46:35	1.13
  +++ DeploymentRegistry.java	2001/10/31 23:50:19	1.14
  @@ -56,7 +56,9 @@
   
   import org.apache.axis.Handler;
   import org.apache.axis.deployment.wsdd.WSDDGlobalConfiguration;
  +import org.apache.axis.deployment.wsdd.WSDDDocument;
   import org.apache.axis.encoding.TypeMappingRegistry;
  +import org.w3c.dom.Document;
   
   import javax.xml.rpc.namespace.QName;
   import java.io.FileInputStream;
  @@ -78,7 +80,9 @@
   public abstract class DeploymentRegistry
       implements Serializable
   {
  -
  +    public abstract DeploymentDocument getConfigDocument()
  +        throws DeploymentException;
  +    
       /**
        * retrieve the global configuration for the axis engine
        * @return XXX
  @@ -92,11 +96,29 @@
        * @param qname XXX
        * @return XXX
        * @throws DeploymentException XXX
  +     */
  +    public abstract Handler getHandler(QName qname)
  +        throws DeploymentException;
  +
  +    /**
  +     * retrieve an instance of the named handler
  +     * @param qname XXX
  +     * @return XXX
  +     * @throws DeploymentException XXX
        */
  -    public abstract Handler getDeployedItem(QName qname)
  +    public abstract Handler getService(QName qname)
           throws DeploymentException;
   
       /**
  +     * retrieve an instance of the named transport
  +     * @param qname XXX
  +     * @return XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public abstract Handler getTransport(QName qname)
  +        throws DeploymentException;
  +
  +    /**
        * retrieve an instance of the named mapping registry
        * @param encodingStyle XXX
        * @return XXX
  @@ -138,6 +160,30 @@
        * @throws DeploymentException XXX
        */
       public abstract void deployItem(DeployableItem item)
  +        throws DeploymentException;
  +
  +    /**
  +     * deploy the given item
  +     * @param item XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public abstract void deployService(DeployableItem item)
  +        throws DeploymentException;
  +
  +    /**
  +     * deploy the given item
  +     * @param item XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public abstract void deployHandler(DeployableItem item)
  +        throws DeploymentException;
  +
  +    /**
  +     * deploy the given item
  +     * @param item XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public abstract void deployTransport(DeployableItem item)
           throws DeploymentException;
   
       /**
  
  
  
  1.16      +125 -18   xml-axis/java/src/org/apache/axis/deployment/SimpleDeploymentManager.java
  
  Index: SimpleDeploymentManager.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/SimpleDeploymentManager.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- SimpleDeploymentManager.java	2001/10/30 16:46:35	1.15
  +++ SimpleDeploymentManager.java	2001/10/31 23:50:19	1.16
  @@ -57,8 +57,11 @@
   import org.apache.axis.Constants;
   import org.apache.axis.Handler;
   import org.apache.axis.deployment.wsdd.WSDDGlobalConfiguration;
  +import org.apache.axis.deployment.wsdd.WSDDDocument;
  +import org.apache.axis.deployment.wsdd.WSDDHandler;
   import org.apache.axis.encoding.SOAPTypeMappingRegistry;
   import org.apache.axis.encoding.TypeMappingRegistry;
  +import org.w3c.dom.Document;
   
   import javax.xml.rpc.namespace.QName;
   import java.util.Hashtable;
  @@ -68,46 +71,63 @@
    * This is a simple implementation of the DeploymentRegistry class
    *
    * @author James Snell
  + * @author Glen Daniels (gdaniels@macromedia.com)
    */
   public class SimpleDeploymentManager
       extends DeploymentRegistry
   {
  -
  -    /** XXX */
  +    /** Our global configuration */
       WSDDGlobalConfiguration globalConfig;
   
  -    /** XXX */
  -    Hashtable items;
  +    /** Storage for our handlers */
  +    Hashtable handlers = new Hashtable();
  +    Hashtable services = new Hashtable();
  +    Hashtable transports = new Hashtable();
   
  -    /** XXX */
  +    /** Storage for our TypeMappingRegistries */
       Hashtable mappings;
  +    
  +    /** The deployment document we're rooted off of.
  +     * This will be updated as new items are deployed into the registry.
  +     */
  +    DeploymentDocument doc = null;
   
       /**
  -     *
  +     * Constructor - sets up a default encoding style
        */
       public SimpleDeploymentManager()
       {
  -
  -        items    = new Hashtable();
           mappings = new Hashtable();
   
           mappings.put(Constants.URI_SOAP_ENC, new SOAPTypeMappingRegistry());
       }
   
       /**
  -     * Deploy a SOAP v2.x deployment descriptor
  -     * @param deployment XXX
  -     * @throws DeploymentException XXX
  +     * Deploy a deployment document into this registry.
  +     * 
  +     * @param deployment the DeploymentDocument we'll operate on
  +     * @throws DeploymentException if there was a problem
        */
       public void deploy(DeploymentDocument deployment)
           throws DeploymentException
       {
  +        if (doc == null)
  +            doc = deployment;
           deployment.deploy(this);
       }
   
       /**
  -     * return the global configuration
  -     * @return XXX
  +     * Obtain our "root" deployment document.
  +     */ 
  +    public DeploymentDocument getConfigDocument()
  +            throws DeploymentException {
  +        return doc;
  +    }
  +
  +    /**
  +     * Return the global configuration
  +     * 
  +     * @return our global configuration
        * @throws DeploymentException XXX
        */
       public WSDDGlobalConfiguration getGlobalConfiguration()
  @@ -132,8 +152,48 @@
        */
       public void deployItem(DeployableItem item)
           throws DeploymentException
  +    {
  +        QName qn = item.getQName();
  +        handlers.put(qn, item);
  +    }
  +
  +    /**
  +     * Deploy the given WSDD Deployable Item
  +     * @param item XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public void deployHandler(DeployableItem item)
  +        throws DeploymentException
  +    {
  +        if (doc == null) doc = new WSDDDocument();
  +        handlers.put(item.getQName(), item);
  +        doc.importItem(item);
  +    }
  +
  +    /**
  +     * Deploy the given WSDD Deployable Item
  +     * @param item XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public void deployService(DeployableItem item)
  +        throws DeploymentException
  +    {
  +        if (doc == null) doc = new WSDDDocument();
  +        services.put(item.getQName(), item);
  +        doc.importItem(item);
  +    }
  +
  +    /**
  +     * Deploy the given WSDD Transport
  +     * @param item XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public void deployTransport(DeployableItem item)
  +        throws DeploymentException
       {
  -        items.put(item.getQName(), item);
  +        if (doc == null) doc = new WSDDDocument();
  +        transports.put(item.getQName(), item);
  +        doc.importItem(item);
       }
   
       /**
  @@ -141,14 +201,61 @@
        * @param qname XXX
        * @return XXX
        * @throws DeploymentException XXX
  +     */
  +    public Handler getHandler(QName qname)
  +        throws DeploymentException
  +    {
  +        try {
  +            DeployableItem item = (DeployableItem)handlers.get(qname);
  +            
  +            if (item == null)
  +                return null;
  +
  +            return item.getInstance(this);
  +        }
  +        catch (Exception e) {
  +            throw new DeploymentException(e.getMessage());
  +        }
  +    }
  +
  +    /**
  +     * Return an instance of the deployed service
  +     * @param qname XXX
  +     * @return XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public Handler getService(QName qname)
  +        throws DeploymentException
  +    {
  +        try {
  +            DeployableItem item = (DeployableItem)services.get(qname);
  +            
  +            if (item == null)
  +                return null;
  +
  +            return item.getInstance(this);
  +        }
  +        catch (Exception e) {
  +            throw new DeploymentException(e.getMessage());
  +        }
  +    }
  +
  +    /**
  +     * Return an instance of the deployed transport
  +     * @param qname XXX
  +     * @return XXX
  +     * @throws DeploymentException XXX
        */
  -    public Handler getDeployedItem(QName qname)
  +    public Handler getTransport(QName qname)
           throws DeploymentException
       {
           try {
  -            DeployableItem item = (DeployableItem) items.get(qname);
  +            DeployableItem item = (DeployableItem)transports.get(qname);
  +            
  +            if (item == null)
  +                return null;
   
  -            return item.newInstance(this);
  +            return item.getInstance(this);
           }
           catch (Exception e) {
               throw new DeploymentException(e.getMessage());
  @@ -163,7 +270,7 @@
       public void removeDeployedItem(QName qname)
           throws DeploymentException
       {
  -        items.remove(qname);
  +        handlers.remove(qname);
       }
   
   
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/deployment/simple/SimpleHandler.java
  
  Index: SimpleHandler.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.axis.deployment.simple;
  
  import org.apache.axis.deployment.DeployableItem;
  import org.apache.axis.deployment.DeploymentRegistry;
  import org.apache.axis.Handler;
  
  import javax.xml.rpc.namespace.QName;
  
  /**
   * SimpleHandler is just a holder for pre-made Handlers
   * (just like SimpleSupplier) which follows our DeployableItem interface.
   * 
   * This is used for dealing with processing old-style XML config (see
   * Admin.java for usages).
   *
   * @author Glen Daniels (gdaniels@macromedia.com)
   */
  public class SimpleHandler implements DeployableItem {
      QName qName;
      Handler handler;
      
      public SimpleHandler(QName qName, Handler handler)
      {
          this.qName = qName;
          this.handler = handler;
      }
      /**
       *
       * @return XXX
       */
      public QName getQName() {
          return qName;
      }
  
      /**
       *
       * @param registry XXX
       * @return XXX
       * @throws Exception XXX
       */
      public Handler getInstance(DeploymentRegistry registry)
              throws Exception {
          return handler;
      }
  }
  
  
  
  1.9       +9 -0      xml-axis/java/src/org/apache/axis/deployment/v2dd/DeploymentDescriptor.java
  
  Index: DeploymentDescriptor.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/v2dd/DeploymentDescriptor.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DeploymentDescriptor.java	2001/10/30 16:46:35	1.8
  +++ DeploymentDescriptor.java	2001/10/31 23:50:20	1.9
  @@ -57,6 +57,7 @@
   import org.apache.axis.deployment.DeploymentDocument;
   import org.apache.axis.deployment.DeploymentException;
   import org.apache.axis.deployment.DeploymentRegistry;
  +import org.apache.axis.deployment.DeployableItem;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   
  @@ -89,6 +90,10 @@
           this.d = e.getOwnerDocument();
       }
   
  +    public Document getDOMDocument() throws DeploymentException {
  +        return d;
  +    }
  +
       public V2DDService getService() {
           if (service == null) {
               service = new V2DDService(d.getDocumentElement());
  @@ -105,5 +110,9 @@
           }
           V2DDDeployableItem item = new V2DDDeployableItem(service);
           registry.deployItem(item);
  +    }
  +
  +    public void importItem(DeployableItem item) throws DeploymentException {
  +        throw new DeploymentException("ImportItem not implemented!");
       }
   }
  
  
  
  1.14      +1 -1      xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDDeployableItem.java
  
  Index: V2DDDeployableItem.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDDeployableItem.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- V2DDDeployableItem.java	2001/10/30 16:46:35	1.13
  +++ V2DDDeployableItem.java	2001/10/31 23:50:20	1.14
  @@ -91,7 +91,7 @@
           return qname;
       }
   
  -    public Handler newInstance(DeploymentRegistry registry) {
  +    public Handler getInstance(DeploymentRegistry registry) {
           
           // we would create an instance of the SOAP v2.x
           // compatible handler here using the service
  
  
  
  1.11      +2 -10     xml-axis/java/src/org/apache/axis/deployment/wsdd/SimpleWsddDeploymentManager.java
  
  Index: SimpleWsddDeploymentManager.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/SimpleWsddDeploymentManager.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SimpleWsddDeploymentManager.java	2001/10/30 16:46:36	1.10
  +++ SimpleWsddDeploymentManager.java	2001/10/31 23:50:20	1.11
  @@ -66,16 +66,8 @@
   public class SimpleWsddDeploymentManager
       extends SimpleDeploymentManager
   {
  -
  -    /**
  -     * Return the RAW deployed item
  -     * @param qname XXX
  -     * @return XXX
  -     * @throws DeploymentException XXX
  -     */
  -    public WSDDDeployableItem getDeployedWsddItem(QName qname)
  -        throws DeploymentException
  +    public WSDDDeployment getDeployment()
       {
  -        return getDeployedWsddItem(qname);
  +        return null;
       }
   }
  
  
  
  1.15      +3 -3      xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDChain.java
  
  Index: WSDDChain.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDChain.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- WSDDChain.java	2001/10/30 16:46:36	1.14
  +++ WSDDChain.java	2001/10/31 23:50:20	1.15
  @@ -169,17 +169,17 @@
        * @return XXX
        * @throws Exception XXX
        */
  -    public Handler newInstance(DeploymentRegistry registry)
  +    public Handler getInstance(DeploymentRegistry registry)
           throws Exception
       {
   
           try {
  -            Handler       h        = super.newInstance(registry);
  +            Handler       h        = super.getInstance(registry);
               Chain         c        = (Chain) h;
               WSDDHandler[] handlers = getHandlers();
   
               for (int n = 0; n < handlers.length; n++) {
  -                c.addHandler(handlers[n].newInstance(registry));
  +                c.addHandler(handlers[n].getInstance(registry));
               }
   
               return c;
  
  
  
  1.8       +3 -0      xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDConstants.java
  
  Index: WSDDConstants.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDConstants.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WSDDConstants.java	2001/10/30 16:46:36	1.7
  +++ WSDDConstants.java	2001/10/31 23:50:20	1.8
  @@ -65,6 +65,9 @@
       /** XXX */
       public final static String WSDD_JAVA =
           "http://xml.apache.org/axis/wsdd/providers/java";
  +    
  +    public final static String WSDD_HANDLER =
  +        "http://xml.apache.org/axis/wsdd/providers/handler";
   
       /** XXX */
       public final static String WSDD_COM =
  
  
  
  1.15      +25 -4     xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDDeployableItem.java
  
  Index: WSDDDeployableItem.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDDeployableItem.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- WSDDDeployableItem.java	2001/10/30 16:46:36	1.14
  +++ WSDDDeployableItem.java	2001/10/31 23:50:20	1.15
  @@ -64,6 +64,8 @@
   import org.w3c.dom.Node;
   
   import javax.xml.rpc.namespace.QName;
  +import java.util.Hashtable;
  +import java.util.Iterator;
   
   
   /**
  @@ -182,13 +184,32 @@
               for (int n = 0; n < ps.length; n++) {
                   WSDDParameter p = (WSDDParameter) ps[n];
   
  -                // parms.put(p.getName(), p.getValue(), p.getLocked());
  -                parms.put(p.getName(), "", p.getLocked());
  +                parms.put(p.getName(), p.getValue(), p.getLocked());
               }
           }
   
           return parms;
       }
  +    
  +    /**
  +     * Convenience method for using old deployment XML with WSDD.
  +     * This allows us to set the options directly after the Admin class
  +     * has parsed them out of the old format.
  +     */ 
  +    public void setOptionsHashtable(Hashtable hashtable)
  +    {
  +        if (hashtable == null)
  +            return;
  +        
  +        parms = new LockableHashtable(hashtable);
  +        Iterator i = parms.keySet().iterator();
  +        while (i.hasNext()) {
  +            String name = (String)i.next();
  +            String value = (String)parms.get(name);
  +            WSDDParameter param = createParameter(name);
  +            param.setValue(value);
  +        }
  +    }
   
       /**
        *
  @@ -253,7 +274,7 @@
        * @return XXX
        * @throws Exception XXX
        */
  -    abstract public Handler newInstance(DeploymentRegistry registry)
  +    abstract public Handler getInstance(DeploymentRegistry registry)
           throws Exception;
   
       /**
  @@ -274,7 +295,7 @@
               if (c != null) {
                   h = (Handler)createInstance(c);
               } else {
  -                h = registry.getDeployedItem(getType());
  +                h = registry.getHandler(getType());
               }
   
               if (h != null) {
  
  
  
  1.8       +2 -1      xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDDeployment.java
  
  Index: WSDDDeployment.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDDeployment.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WSDDDeployment.java	2001/10/30 16:46:36	1.7
  +++ WSDDDeployment.java	2001/10/31 23:50:20	1.8
  @@ -65,6 +65,7 @@
    */
   public class WSDDDeployment
       extends WSDDElement
  +    implements WSDDTypeMappingContainer
   {
   
       /**
  @@ -288,7 +289,7 @@
       {
           removeChild(victim);
       }
  -
  +    
       /**
        *
        * @return XXX
  
  
  
  1.10      +81 -42    xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDDocument.java
  
  Index: WSDDDocument.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDDocument.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- WSDDDocument.java	2001/10/30 16:46:36	1.9
  +++ WSDDDocument.java	2001/10/31 23:50:20	1.10
  @@ -57,10 +57,13 @@
   import org.apache.axis.deployment.DeploymentDocument;
   import org.apache.axis.deployment.DeploymentException;
   import org.apache.axis.deployment.DeploymentRegistry;
  +import org.apache.axis.deployment.DeployableItem;
   import org.apache.axis.encoding.DeserializerFactory;
   import org.apache.axis.encoding.Serializer;
   import org.apache.axis.encoding.TypeMappingRegistry;
  +import org.apache.axis.encoding.SOAPTypeMappingRegistry;
   import org.apache.axis.utils.XMLUtils;
  +import org.apache.axis.Constants;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   
  @@ -72,7 +75,8 @@
   {
   
       /** XXX */
  -    private Document d;
  +    private Document doc;
  +    private Element deploymentElement;
   
       /** XXX */
       private WSDDDeployment dep;
  @@ -90,7 +94,8 @@
        */
       public WSDDDocument(Document doc)
       {
  -        d = doc;
  +        this.doc = doc;
  +        deploymentElement = doc.getDocumentElement();
       }
   
       /**
  @@ -99,9 +104,14 @@
        */
       public WSDDDocument(Element e)
       {
  -        d = e.getOwnerDocument();
  +        deploymentElement = e;
  +        doc = e.getOwnerDocument();
       }
   
  +    public Document getDOMDocument() throws DeploymentException {
  +        return getDocument();
  +    }
  +
       /**
        *
        * @return XXX
  @@ -112,11 +122,9 @@
   
           if (null == dep) {
               try {
  -                Element deploymentElement = d.getDocumentElement();
  -
                   if (null == deploymentElement) {
                       // create both the DOM and WSDD deployment 'child'
  -                    dep = new WSDDDeployment(d);
  +                    dep = new WSDDDeployment(doc);
                   }
                   else {
                       // create the WSDD 'child' from the given DOM deployment
  @@ -141,11 +149,22 @@
        */
       public Document getDocument()
       {
  -        if (null == d) {
  -            d = XMLUtils.newDocument();
  +        if (null == doc) {
  +            doc = XMLUtils.newDocument();
  +            Element el = doc.createElementNS(WSDDConstants.WSDD_NS, "deployment");
  +            el.setAttributeNS(
  +                            Constants.NS_URI_XMLNS,
  +                            "xmlns",
  +                            WSDDConstants.WSDD_NS);
  +            doc.appendChild(el);
  +            try {
  +                dep = new WSDDDeployment(el);
  +            } catch (WSDDException e) {
  +                return null;
  +            }
           }
   
  -        return d;
  +        return doc;
       }
   
       /**
  @@ -154,7 +173,7 @@
        */
       public void setDocument(Document document)
       {
  -        d = document;
  +        doc = document;
   
           dep = null;
       }
  @@ -198,59 +217,79 @@
           WSDDTypeMapping[] mappings   = dep.getTypeMappings();
   
           for (int n = 0; n < handlers.length; n++) {
  -            registry.deployItem(handlers[n]);
  +            registry.deployHandler(handlers[n]);
           }
   
           for (int n = 0; n < chains.length; n++) {
  -            registry.deployItem(chains[n]);
  +            registry.deployHandler(chains[n]);
           }
   
           for (int n = 0; n < transports.length; n++) {
  -            registry.deployItem(transports[n]);
  +            registry.deployTransport(transports[n]);
           }
   
           for (int n = 0; n < services.length; n++) {
  -            registry.deployItem(services[n]);
  +            registry.deployService(services[n]);
           }
   
           for (int n = 0; n < mappings.length; n++) {
               WSDDTypeMapping     mapping = mappings[n];
  -            TypeMappingRegistry tmr     =
  -                registry.getTypeMappingRegistry(mapping.getEncodingStyle());
  +            deployMappingToRegistry(mapping, registry);
  +        }
  +    }
   
  -            if (tmr == null) {
  -                tmr = new TypeMappingRegistry();
  +    public static void deployMappingToRegistry(WSDDTypeMapping mapping, 
  +                                               DeploymentRegistry registry) 
  +            throws DeploymentException {
  +        TypeMappingRegistry tmr     =
  +            registry.getTypeMappingRegistry(mapping.getEncodingStyle());
   
  -                registry.addTypeMappingRegistry(mapping.getEncodingStyle(),
  -                                                tmr);
  -            }
  +        if (tmr == null) {
  +            tmr = new SOAPTypeMappingRegistry();
   
  -            Serializer          ser   = null;
  -            DeserializerFactory deser = null;
  +            registry.addTypeMappingRegistry(mapping.getEncodingStyle(),
  +                                            tmr);
  +        }
   
  -            try {
  -                ser   = (Serializer) mapping.getSerializer().newInstance();
  -                deser =
  -                    (DeserializerFactory) mapping.getDeserializer()
  -                        .newInstance();
  -            }
  -            catch (Exception e) {
  -            }
  +        Serializer          ser   = null;
  +        DeserializerFactory deser = null;
   
  -            try {
  -                if (ser != null) {
  -                    tmr.addSerializer(mapping.getLanguageSpecificType(),
  -                                      mapping.getQName(), ser);
  -                }
  +        try {
  +            ser   = (Serializer) mapping.getSerializer().newInstance();
  +            deser =
  +                (DeserializerFactory) mapping.getDeserializer()
  +                    .newInstance();
   
  -                if (deser != null) {
  -                    tmr.addDeserializerFactory(mapping.getQName(), mapping
  -                        .getLanguageSpecificType(), deser);
  -                }
  +            if (ser != null) {
  +                tmr.addSerializer(mapping.getLanguageSpecificType(),
  +                                  mapping.getQName(), ser);
               }
  -            catch (Exception e) {
  -                throw new DeploymentException(e.getMessage());
  +
  +            if (deser != null) {
  +                tmr.addDeserializerFactory(mapping.getQName(), mapping
  +                    .getLanguageSpecificType(), deser);
               }
           }
  +        catch (Exception e) {
  +            throw new DeploymentException(e.getMessage());
  +        }
  +    }
  +
  +    public void importItem(DeployableItem item) throws DeploymentException {
  +        if (!(item instanceof WSDDElement))
  +            return;
  +/*
  +            throw new DeploymentException("Importing non-WSDD item " +
  +                                          item.getClass().getName() +
  +                                          " into WSDD document!");
  +*/
  +        
  +        WSDDElement elem = (WSDDElement)item;
  +        
  +        // Don't bother importing if we own it already.
  +        if (elem.getElement().getOwnerDocument().equals(getDOMDocument()))
  +            return;
  +        
  +        getDeployment().addChild((WSDDElement)item);
       }
   }
  
  
  
  1.8       +7 -2      xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDElement.java
  
  Index: WSDDElement.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDElement.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WSDDElement.java	2001/10/30 16:46:36	1.7
  +++ WSDDElement.java	2001/10/31 23:50:20	1.8
  @@ -88,9 +88,7 @@
       public WSDDElement(Document doc, Node parent, String name)
           throws WSDDException
       {
  -
           element = doc.createElementNS(WSDDConstants.WSDD_NS, name);
  -
           validateCandidateElement(element, name);
           parent.appendChild(element);
       }
  @@ -388,6 +386,13 @@
           }
   
           children.put(w.getElement(), w);
  +        
  +        Document doc = element.getOwnerDocument();
  +        if (w.getElement().getOwnerDocument().equals(doc))
  +            return;
  +        
  +        Node newEl = element.getOwnerDocument().importNode(w.getElement(), true);
  +        element.appendChild(newEl);
       }
   
       /**
  
  
  
  1.15      +2 -2      xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDFlow.java
  
  Index: WSDDFlow.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDFlow.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- WSDDFlow.java	2001/10/30 16:46:36	1.14
  +++ WSDDFlow.java	2001/10/31 23:50:20	1.15
  @@ -188,7 +188,7 @@
        * @return XXX
        * @throws Exception XXX
        */
  -    public Handler newInstance(DeploymentRegistry registry)
  +    public Handler getInstance(DeploymentRegistry registry)
           throws Exception
       {
   
  @@ -198,7 +198,7 @@
               WSDDHandler[] handlers = getHandlers();
   
               for (int n = 0; n < handlers.length; n++) {
  -                c.addHandler(handlers[n].newInstance(registry));
  +                c.addHandler(handlers[n].getInstance(registry));
               }
   
               return c;
  
  
  
  1.13      +1 -1      xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDGlobalConfiguration.java
  
  Index: WSDDGlobalConfiguration.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDGlobalConfiguration.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- WSDDGlobalConfiguration.java	2001/10/30 16:46:36	1.12
  +++ WSDDGlobalConfiguration.java	2001/10/31 23:50:20	1.13
  @@ -371,7 +371,7 @@
        * @param registry XXX
        * @return XXX
        */
  -    public Handler newInstance(DeploymentRegistry registry)
  +    public Handler getInstance(DeploymentRegistry registry)
       {
           return null;
       }
  
  
  
  1.8       +1 -1      xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDHandler.java
  
  Index: WSDDHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDHandler.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WSDDHandler.java	2001/10/30 16:46:36	1.7
  +++ WSDDHandler.java	2001/10/31 23:50:20	1.8
  @@ -121,7 +121,7 @@
        * @return XXX
        * @throws Exception XXX
        */
  -    public Handler newInstance(DeploymentRegistry registry)
  +    public Handler getInstance(DeploymentRegistry registry)
           throws Exception
       {
           return makeNewInstance(registry);
  
  
  
  1.11      +3 -1      xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDProvider.java
  
  Index: WSDDProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDProvider.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- WSDDProvider.java	2001/10/30 16:46:36	1.10
  +++ WSDDProvider.java	2001/10/31 23:50:20	1.11
  @@ -59,6 +59,7 @@
   import org.apache.axis.deployment.wsdd.providers.WSDDBsfProvider;
   import org.apache.axis.deployment.wsdd.providers.WSDDComProvider;
   import org.apache.axis.deployment.wsdd.providers.WSDDJavaProvider;
  +import org.apache.axis.deployment.wsdd.providers.WSDDHandlerProvider;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   import org.w3c.dom.Node;
  @@ -90,6 +91,7 @@
           providers.put(WSDDConstants.WSDD_JAVA, WSDDJavaProvider.class);
           providers.put(WSDDConstants.WSDD_COM, WSDDComProvider.class);
           providers.put(WSDDConstants.WSDD_BSF, WSDDBsfProvider.class);
  +        providers.put(WSDDConstants.WSDD_HANDLER, WSDDHandlerProvider.class);
       }
   
       /**
  @@ -243,7 +245,7 @@
        * @return XXX
        * @throws Exception XXX
        */
  -    public Handler newInstance(DeploymentRegistry registry)
  +    public Handler getInstance(DeploymentRegistry registry)
           throws Exception
       {
           return newProviderInstance(registry);
  
  
  
  1.17      +64 -33    xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDService.java
  
  Index: WSDDService.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDService.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- WSDDService.java	2001/10/30 16:46:36	1.16
  +++ WSDDService.java	2001/10/31 23:50:20	1.17
  @@ -56,8 +56,14 @@
   
   import org.apache.axis.Handler;
   import org.apache.axis.TargetedChain;
  +import org.apache.axis.FaultableHandler;
  +import org.apache.axis.handlers.soap.SOAPService;
  +import org.apache.axis.encoding.TypeMappingRegistry;
  +import org.apache.axis.encoding.SOAPTypeMappingRegistry;
  +import org.apache.axis.encoding.Serializer;
  +import org.apache.axis.encoding.DeserializerFactory;
   import org.apache.axis.deployment.DeploymentRegistry;
  -import org.apache.axis.description.ServiceDescription;
  +import org.apache.axis.deployment.DeploymentException;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   import org.w3c.dom.Node;
  @@ -71,10 +77,13 @@
    */
   public class WSDDService
       extends WSDDDeployableItem
  +    implements WSDDTypeMappingContainer
   {
       public static final QName DEFAULT_QNAME =
               new QName(WSDDConstants.WSDD_JAVA,
  -                      "org.apache.axis.SimpleTargetedChain");
  +                      "org.apache.axis.handlers.soap.SOAPService");
  +    
  +    public TypeMappingRegistry tmr = null;
   
       /**
        *
  @@ -133,17 +142,6 @@
       }
   
       /**
  -     * Eventually need to fill this in with the code to
  -     * actually return the Service Description object
  -     * @return XXX
  -     */
  -    public ServiceDescription getServiceDescription()
  -    {
  -		// Nothing here yet
  -        return null;
  -    }
  -
  -    /**
        *
        * @return XXX
        */
  @@ -398,30 +396,63 @@
        * @return XXX
        * @throws Exception XXX
        */
  -    public Handler newInstance(DeploymentRegistry registry)
  +    public Handler getInstance(DeploymentRegistry registry)
           throws Exception
       {
  -
  -        try {
  -            Handler       h        = super.makeNewInstance(registry);
  -            TargetedChain c        = (TargetedChain) h;
  -            WSDDFlow      request  = getRequestFlow();
  -            WSDDFlow      response = getResponseFlow();
  -
  -            if (request != null) {
  -                c.setRequestHandler(request.newInstance(registry));
  -            }
  -
  -            c.setPivotHandler(getProvider().newInstance(registry));
  -
  -            if (response != null) {
  -                c.setResponseHandler(response.newInstance(registry));
  +        SOAPService   service  = (SOAPService)super.makeNewInstance(registry);
  +        WSDDFlow      request  = getRequestFlow();
  +        WSDDFlow      response = getResponseFlow();
  +        
  +        if (request != null) {
  +            service.setRequestHandler(request.getInstance(registry));
  +        }
  +        
  +        service.setPivotHandler(getProvider().getInstance(registry));
  +        
  +        if (response != null) {
  +            service.setResponseHandler(response.getInstance(registry));
  +        }
  +        
  +        if (tmr == null) {
  +            tmr = new TypeMappingRegistry();
  +            tmr.setParent(registry.getTypeMappingRegistry(""));
  +            
  +            WSDDTypeMapping [] mappings = getTypeMappings();
  +            for (int n = 0; n < mappings.length; n++) {
  +                WSDDTypeMapping     mapping = mappings[n];
  +                
  +                Serializer          ser   = null;
  +                DeserializerFactory deser = null;
  +                
  +                ser   = (Serializer) mapping.getSerializer().newInstance();
  +                deser =
  +                        (DeserializerFactory) mapping.getDeserializer()
  +                        .newInstance();
  +                
  +                if (ser != null) {
  +                    tmr.addSerializer(mapping.getLanguageSpecificType(),
  +                                      mapping.getQName(), ser);
  +                }
  +                
  +                if (deser != null) {
  +                    tmr.addDeserializerFactory(mapping.getQName(), mapping
  +                                                                   .getLanguageSpecificType(), deser);
  +                }
               }
  -
  -            return c;
           }
  -        catch (Exception e) {
  -            return null;
  +        
  +        service.setTypeMappingRegistry(tmr);
  +        
  +        WSDDFaultFlow [] faultFlows = getFaultFlows();
  +        if (faultFlows != null && faultFlows.length > 0) {
  +            FaultableHandler wrapper = new FaultableHandler(service);
  +            for (int i = 0; i < faultFlows.length; i++) {
  +                WSDDFaultFlow flow = faultFlows[i];
  +                Handler faultHandler = flow.getInstance(registry);
  +                wrapper.addOption("fault-" + flow.getName(), faultHandler);
  +            }
           }
  +        
  +        return service;
       }
   }
  
  
  
  1.15      +31 -22    xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDTransport.java
  
  Index: WSDDTransport.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDTransport.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- WSDDTransport.java	2001/10/30 16:46:36	1.14
  +++ WSDDTransport.java	2001/10/31 23:50:20	1.15
  @@ -56,7 +56,10 @@
   
   import org.apache.axis.Handler;
   import org.apache.axis.TargetedChain;
  +import org.apache.axis.utils.XMLUtils;
  +import org.apache.axis.transport.http.HTTPSender;
   import org.apache.axis.deployment.DeploymentRegistry;
  +import org.apache.axis.deployment.DeploymentException;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   import org.w3c.dom.Node;
  @@ -70,6 +73,8 @@
   public class WSDDTransport
       extends WSDDDeployableItem
   {
  +    public static final QName DEFAULT_QNAME =
  +            new QName(WSDDConstants.WSDD_JAVA, "org.apache.axis.SimpleTargetedChain");
   
       /**
        *
  @@ -218,14 +223,15 @@
           removeChild(victim);
       }
   
  -
  -    /**
  -     *
  -     * @return XXX
  -     */
       public QName getType()
       {
  -        return null;
  +        QName type = super.getType();
  +
  +        if (type == null) {
  +            type = DEFAULT_QNAME;
  +        }
  +
  +        return type;
       }
   
       /**
  @@ -255,33 +261,36 @@
   
       /**
        *
  -     * @param registry XXX
  -     * @return XXX
  -     * @throws Exception XXX
  -     */
  -    public Handler newInstance(DeploymentRegistry registry)
  -        throws Exception
  -    {
  -        return newInstance(null, registry);
  -    }
  -
  -    /**
  -     *
        * @param pivot XXX
        * @param registry XXX
        * @return XXX
        * @throws Exception XXX
        */
  -    public Handler newInstance(Handler pivot, DeploymentRegistry registry)
  +    public Handler getInstance(DeploymentRegistry registry)
           throws Exception
       {
  -
           Handler       h = super.makeNewInstance(registry);
           TargetedChain c = (TargetedChain) h;
   
  -        c.setRequestHandler(getRequestFlow().newInstance(registry));
  +            WSDDFlow req = getRequestFlow();
  +            if (req != null)
  +                c.setRequestHandler(req.getInstance(registry));
  +        
  +        Handler pivot = null;
  +        QName pivotName = XMLUtils.getQNameFromString(getAttribute("pivot"), getElement());
  +        if (pivotName != null) {
  +            if (WSDDConstants.WSDD_JAVA.equals(pivotName.getNamespaceURI())) {
  +                pivot = (Handler)Class.forName(pivotName.getLocalPart()).newInstance();
  +            } else {
  +                pivot = registry.getHandler(pivotName);
  +            }
  +        }
  +        
           c.setPivotHandler(pivot);
  -        c.setResponseHandler(getResponseFlow().newInstance(registry));
  +
  +        WSDDFlow resp = getResponseFlow();
  +        if (resp != null)
  +            c.setResponseHandler(getResponseFlow().getInstance(registry));
   
           return c;
       }
  
  
  
  1.12      +22 -5     xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDTypeMapping.java
  
  Index: WSDDTypeMapping.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDTypeMapping.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- WSDDTypeMapping.java	2001/10/30 16:46:36	1.11
  +++ WSDDTypeMapping.java	2001/10/31 23:50:20	1.12
  @@ -57,6 +57,7 @@
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   import org.w3c.dom.Node;
  +import org.apache.axis.utils.XMLUtils;
   
   import javax.xml.rpc.namespace.QName;
   
  @@ -160,7 +161,12 @@
        */
       public void setQName(QName name)
       {
  -        setAttribute("qName", name.toString());
  +        String prefix = XMLUtils.getPrefix(name.getNamespaceURI(), getElement());
  +        if (prefix == null)
  +            prefix = XMLUtils.getNewPrefix(getElement().getOwnerDocument(),
  +                                           name.getNamespaceURI());
  +        String qstr = prefix + ":" + name.getLocalPart();
  +        setAttribute("qName", qstr);
       }
   
       /**
  @@ -173,8 +179,18 @@
       {
   
           String type = getAttribute("languageSpecificType");
  -
  -        return Class.forName(type);
  +        QName typeQName = XMLUtils.getQNameFromString(type, getElement());
  +        if (typeQName != null) {
  +            if (!WSDDConstants.WSDD_JAVA.equals(typeQName.getNamespaceURI())) {
  +                throw new ClassNotFoundException("Found languageSpecificType namespace '" +
  +                    typeQName.getNamespaceURI() + "', expected '" +
  +                    WSDDConstants.WSDD_JAVA + "'");
  +            }
  +
  +            return Class.forName(typeQName.getLocalPart());
  +        }
  +        
  +        throw new ClassNotFoundException("Couldn't locate class '" + type + "'");
       }
   
       /**
  @@ -183,7 +199,9 @@
        */
       public void setLanguageSpecificType(Class lsType)
       {
  -        setAttribute("languageSpecificType", lsType.getName());
  +        String type = lsType.getName();
  +        String prefix = XMLUtils.getPrefix(WSDDConstants.WSDD_JAVA, getElement());
  +        setAttribute("languageSpecificType", prefix + ":" + type );
       }
   
       /**
  @@ -217,7 +235,6 @@
       public Class getDeserializer()
           throws ClassNotFoundException
       {
  -
           String type = getAttribute("deserializer");
   
           return Class.forName(type);
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDTypeMappingContainer.java
  
  Index: WSDDTypeMappingContainer.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.axis.deployment.wsdd;
  
  /**
   * A common interface for things which contain type mappings (i.e. services
   * and deployments).   This simplifies the code in Admin for now.
   * 
   * @author Glen Daniels (gdaniels@macromedia.com)
   */ 
  public interface WSDDTypeMappingContainer {
      public WSDDTypeMapping createTypeMapping();
  }
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/deployment/wsdd/providers/WSDDHandlerProvider.java
  
  Index: WSDDHandlerProvider.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.axis.deployment.wsdd.providers;
  
  import org.apache.axis.Handler;
  import org.apache.axis.deployment.DeploymentException;
  import org.apache.axis.deployment.DeploymentRegistry;
  import org.apache.axis.deployment.wsdd.WSDDConstants;
  import org.apache.axis.deployment.wsdd.WSDDException;
  import org.apache.axis.deployment.wsdd.WSDDProvider;
  import org.w3c.dom.Document;
  import org.w3c.dom.Element;
  import org.w3c.dom.Node;
  
  
  /**
   * This is a simple provider for using Handler-based services which don't
   * need further configuration (such as Java classes, etc).
   * 
   * @author Glen Daniels (gdaniels@macromedia.com)
   */
  public class WSDDHandlerProvider
      extends WSDDProvider
  {
      /**
       *
       * Wrap an extant DOM element in WSDD
       *
       * @param e (Element) XXX
       * @throws WSDDException XXX
       */
      public WSDDHandlerProvider(Element e)
          throws WSDDException
      {
          super(e);
      }
  
      /**
       *
       * Create a new DOM element and wrap in WSDD
       *
       * @param d (Document) XXX
       * @param n (Node) XXX
       * @throws WSDDException XXX
       */
      public WSDDHandlerProvider(Document d, Node n)
          throws WSDDException
      {
          super(d, n);
  
  		Element specificProvider =
  			d.createElementNS(WSDDConstants.WSDD_HANDLER, "handler:provider");
  		getElement().appendChild(specificProvider);
      }
  
  	protected Element getProviderElement()
  		throws WSDDException
  	{
  		Element prov =
  		    (Element) getElement()
  		        .getElementsByTagNameNS(WSDDConstants.WSDD_HANDLER, "provider")
  		        .item(0);
  
  		if (prov == null) {
  		    throw new WSDDException(
  		        "The Handler Provider requires the presence of a handler:provider element in the WSDD");
  		}
  
  		return prov;
  	}
  
      /**
       *
       * @param registry XXX
       * @return XXX
       * @throws Exception XXX
       */
      public Handler newProviderInstance(DeploymentRegistry registry)
          throws Exception
      {
          Class _class = getJavaClass();
  
          if (_class == null) {
              throw new DeploymentException("No class specified!");
          }
          
          if (!(Handler.class.isAssignableFrom(_class))) {
              throw new DeploymentException("Class " + _class.getName() +
                  " is not a Handler!");
          }
  
          return (Handler)_class.newInstance();
      }
  }
  
  
  
  1.4       +11 -0     xml-axis/java/src/org/apache/axis/deployment/wsml/ServiceMapping.java
  
  Index: ServiceMapping.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsml/ServiceMapping.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ServiceMapping.java	2001/10/30 14:19:29	1.3
  +++ ServiceMapping.java	2001/10/31 23:50:20	1.4
  @@ -57,6 +57,9 @@
   
   import org.apache.axis.deployment.DeploymentDocument;
   import org.apache.axis.deployment.DeploymentRegistry;
  +import org.apache.axis.deployment.DeploymentException;
  +import org.apache.axis.deployment.DeployableItem;
  +import org.w3c.dom.Document;
   
   /**
    * This will eventually be an implementation of the
  @@ -76,5 +79,13 @@
       
       public void deploy(DeploymentRegistry registry) {
           
  +    }
  +
  +    public Document getDOMDocument() throws DeploymentException {
  +        return null;
  +    }
  +    
  +    public void importItem(DeployableItem item) throws DeploymentException {
  +        throw new DeploymentException("ImportItem not implemented!");
       }
   }
  
  
  
  1.7       +1 -1      xml-axis/java/src/org/apache/axis/deployment/wsml/WSMLDeployableItem.java
  
  Index: WSMLDeployableItem.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsml/WSMLDeployableItem.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WSMLDeployableItem.java	2001/10/30 14:19:29	1.6
  +++ WSMLDeployableItem.java	2001/10/31 23:50:20	1.7
  @@ -65,7 +65,7 @@
           return null;
       }
   
  -    public Handler newInstance(org.apache.axis.deployment.DeploymentRegistry registry) {
  +    public Handler getInstance(org.apache.axis.deployment.DeploymentRegistry registry) {
           return null;
       }
   }
  
  
  
  1.45      +5 -1      xml-axis/java/src/org/apache/axis/encoding/SOAPTypeMappingRegistry.java
  
  Index: SOAPTypeMappingRegistry.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/SOAPTypeMappingRegistry.java,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- SOAPTypeMappingRegistry.java	2001/10/30 16:46:37	1.44
  +++ SOAPTypeMappingRegistry.java	2001/10/31 23:50:21	1.45
  @@ -283,7 +283,7 @@
               new DateSerializer.DateDeserializerFactory());
           
           addDeserializerFactory(XSD_ANYTYPE, java.lang.Object.class, new ObjDeserializerFactory());
  -        addSerializer(java.lang.Object.class, XSD_ANYTYPE, new ObjSerializer());
  +        //addSerializer(java.lang.Object.class, XSD_ANYTYPE, new ObjSerializer());
   
           // handle the various base64 QNames...
           addDeserializerFactory(SOAP_BASE64, byte[].class, base64Ser);
  @@ -301,6 +301,10 @@
                         new MapSerializer());
           addDeserializerFactory(TYPE_MAP, java.util.HashMap.class,
                                  MapSerializer.factory);
  +        
  +        // only serializer
  +        addSerializer(org.w3c.dom.Element.class, null,
  +                      new ElementSerializer());
   
           // only deserializer
           addDeserializerFactory(TYPE_VECTOR, java.util.Vector.class,
  
  
  
  1.50      +1 -0      xml-axis/java/src/org/apache/axis/encoding/SerializationContext.java
  
  Index: SerializationContext.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/SerializationContext.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- SerializationContext.java	2001/10/30 14:19:29	1.49
  +++ SerializationContext.java	2001/10/31 23:50:21	1.50
  @@ -266,6 +266,7 @@
           if (Number.class.isAssignableFrom(type)) return true;
           if (Boolean.class.isAssignableFrom(type)) return true;
           if (Date.class.isAssignableFrom(type)) return true;
  +        if (Element.class.isAssignableFrom(type)) return true;
           if (type.isPrimitive()) return true;
           return false;
       }
  
  
  
  1.33      +34 -9     xml-axis/java/src/org/apache/axis/encoding/TypeMappingRegistry.java
  
  Index: TypeMappingRegistry.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/TypeMappingRegistry.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- TypeMappingRegistry.java	2001/10/30 16:46:37	1.32
  +++ TypeMappingRegistry.java	2001/10/31 23:50:21	1.33
  @@ -136,6 +136,9 @@
                                 QName qName,
                                 Serializer serializer) {
           if (s == null) s = new Hashtable();
  +        if (serializer instanceof BeanSerializer) {
  +            ((BeanSerializer)serializer).setCls(_class);
  +        }
           s.put(_class, new SerializerDescriptor(qName, serializer));
       }
       
  @@ -209,7 +212,8 @@
       public Attributes setTypeAttribute(Attributes attributes, QName type,
                                          SerializationContext context)
       {
  -        if (!context.shouldSendXSIType() ||
  +        if (type == null ||
  +            !context.shouldSendXSIType() ||
               ((attributes != null) &&
                (attributes.getIndex(Constants.URI_CURRENT_SCHEMA_XSI,
                                   "type") != -1)))
  @@ -237,15 +241,36 @@
       {
           if (value != null) {
               Class _class = value.getClass();
  -            Serializer ser = getSerializer(_class);
  -            if (ser != null) {
  -                QName type = getTypeQName(_class);
  -                attributes = setTypeAttribute(attributes, type, context);
  -                ser.serialize(name, attributes, value, context);
  -            } else {
  -                throw new IOException("No serializer found for class " + _class.getName() +
  -                                      " in registry " + this);
  +            
  +            // Find a Serializer for this class, walking up the inheritance
  +            // hierarchy and implemented interfaces list.
  +            while (_class != null) {
  +                Serializer ser = getSerializer(_class);
  +                if (ser != null) {
  +                    QName type = getTypeQName(_class);
  +                    attributes = setTypeAttribute(attributes, type, context);
  +                    ser.serialize(name, attributes, value, context);
  +                    return;
  +                }
  +
  +                Class [] ifaces = _class.getInterfaces();
  +                for (int i = 0; i < ifaces.length; i++) {
  +                    Class iface = ifaces[i];
  +                    ser = getSerializer(iface);
  +                    if (ser != null) {
  +                        QName type = getTypeQName(iface);
  +                        attributes = setTypeAttribute(attributes, type, context);
  +                        ser.serialize(name, attributes, value, context);
  +                        return;
  +                    }
  +                }
  +                
  +                _class = _class.getSuperclass();
               }
  +            
  +            throw new IOException("No serializer found for class " +
  +                                  value.getClass().getName() +
  +                                  " in registry " + this);
           }
           // !!! Write out a generic null, or get type info from somewhere else?
       }
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/encoding/ElementSerializer.java
  
  Index: ElementSerializer.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.axis.encoding;
  
  import org.xml.sax.Attributes;
  import org.xml.sax.SAXException;
  import org.w3c.dom.Element;
  
  import javax.xml.rpc.namespace.QName;
  import java.io.IOException;
  
  /**
   * Serializer for DOM elements
   *
   * @author Glen Daniels (gdaniels@macromedia.com)
   */
  public class ElementSerializer implements Serializer {
      /** 
       * Serialize a DOM Element
       */
      public void serialize(QName name, Attributes attributes,
                            Object value, SerializationContext context)
          throws IOException
      {
          if (!(value instanceof Element))
              throw new IOException("Can't serialize non-Elements with an ElementSerializer!");
          
          context.writeDOMElement((Element)value);
      }
  }
  
  
  
  1.56      +5 -4      xml-axis/java/src/org/apache/axis/message/MessageElement.java
  
  Index: MessageElement.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/MessageElement.java,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- MessageElement.java	2001/10/30 14:19:29	1.55
  +++ MessageElement.java	2001/10/31 23:50:21	1.56
  @@ -57,6 +57,7 @@
   
   import org.apache.axis.Constants;
   import org.apache.axis.MessageContext;
  +import org.apache.axis.configuration.NullProvider;
   import org.apache.axis.client.AxisClient;
   import org.apache.axis.encoding.DeserializationContext;
   import org.apache.axis.encoding.Deserializer;
  @@ -436,12 +437,12 @@
       public String toString() {
           try {
               StringWriter  writer = new StringWriter();
  -            SerializationContext context = null ;
  -            AxisClient     tmpEngine = new AxisClient(null);
  +            SerializationContext serContext = null ;
  +            AxisClient     tmpEngine = new AxisClient(new NullProvider());
               tmpEngine.addOption(tmpEngine.PROP_XML_DECL, new Boolean(false));
               MessageContext msgContext = new MessageContext(tmpEngine);
  -            context = new SerializationContext(writer, msgContext);
  -            this.output(context);
  +            serContext = new SerializationContext(writer, msgContext);
  +            this.output(serContext);
               return( writer.toString() );
           }
           catch( Exception exp ) {
  
  
  
  1.44      +2 -1      xml-axis/java/src/org/apache/axis/message/SOAPEnvelope.java
  
  Index: SOAPEnvelope.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/SOAPEnvelope.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- SOAPEnvelope.java	2001/10/30 14:19:29	1.43
  +++ SOAPEnvelope.java	2001/10/31 23:50:21	1.44
  @@ -58,6 +58,7 @@
   import org.apache.axis.Constants;
   import org.apache.axis.Message;
   import org.apache.axis.MessageContext;
  +import org.apache.axis.configuration.NullProvider;
   import org.apache.axis.client.AxisClient;
   import org.apache.axis.encoding.DeserializationContext;
   import org.apache.axis.encoding.SerializationContext;
  @@ -117,7 +118,7 @@
           try {
               InputSource is = new InputSource(input);
               DeserializationContext dser = null ;
  -            AxisClient     tmpEngine = new AxisClient(null);
  +            AxisClient     tmpEngine = new AxisClient(new NullProvider());
               MessageContext msgContext = new MessageContext(tmpEngine);
               dser = new DeserializationContext(is, msgContext,
                                                 Message.REQUEST, this );
  
  
  
  1.17      +8 -1      xml-axis/java/src/org/apache/axis/registries/SupplierRegistry.java
  
  Index: SupplierRegistry.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/registries/SupplierRegistry.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- SupplierRegistry.java	2001/10/30 16:46:38	1.16
  +++ SupplierRegistry.java	2001/10/31 23:50:21	1.17
  @@ -57,6 +57,7 @@
   
   import org.apache.axis.Handler;
   import org.apache.axis.Supplier;
  +import org.apache.axis.AxisFault;
   import org.apache.axis.suppliers.SimpleSupplier;
   import org.apache.log4j.Category;
   
  @@ -133,7 +134,13 @@
                   category.debug( "Exit: SupplierRegistry::find - supplier is null" );
               return null;
           }
  -        Handler h = supplier.getHandler();
  +        Handler h = null;
  +        try {
  +            h = supplier.getHandler();
  +        } catch (AxisFault fault) {
  +            // ???
  +        }
  +        
           if (category.isDebugEnabled())
               category.debug( "Exit: SupplierRegistry::find"  );
           return h ;
  
  
  
  1.43      +9 -24     xml-axis/java/src/org/apache/axis/server/AxisServer.java
  
  Index: AxisServer.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/server/AxisServer.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- AxisServer.java	2001/10/30 16:46:39	1.42
  +++ AxisServer.java	2001/10/31 23:50:21	1.43
  @@ -65,7 +65,6 @@
   import org.apache.axis.SimpleTargetedChain;
   import org.apache.axis.client.AxisClient;
   import org.apache.axis.configuration.FileProvider;
  -import org.apache.axis.registries.HandlerRegistry;
   import org.apache.axis.utils.AxisClassLoader;
   import org.apache.log4j.Category;
   /**
  @@ -124,7 +123,7 @@
        */
       public synchronized AxisEngine getClientEngine () {
           if (clientEngine == null) {
  -            clientEngine = new AxisClient(new FileProvider("client-config.xml")); // !!!!
  +            clientEngine = new AxisClient(new FileProvider(Constants.CLIENT_CONFIG_FILE)); // !!!!
           }
           return clientEngine;
       }
  @@ -145,16 +144,10 @@
           String  hName = null ;
           Handler h     = null ;
   
  -        /* Do some prep-work.  Get the registries and put them in the */
  -        /* msgContext so they can be used by later handlers.          */
  -        /**************************************************************/
  -        HandlerRegistry hr = getHandlerRegistry();
  -        HandlerRegistry sr = getServiceRegistry();
  -
           try {
               hName = msgContext.getStrProp( MessageContext.ENGINE_HANDLER );
               if ( hName != null ) {
  -                if ( hr == null || (h = hr.find(hName)) == null ) {
  +                if ( (h = getHandler(hName)) == null ) {
                       AxisClassLoader cl = msgContext.getClassLoader();
                       try {
                           category.debug( "Trying to load class: " + hName );
  @@ -210,7 +203,6 @@
                   /* Process the Transport Specific Request Chain */
                   /**********************************************/
                   hName = msgContext.getTransportName();
  -                HandlerRegistry tr = getTransportRegistry();
                   SimpleTargetedChain transportChain = null;
   
                   if (category.isInfoEnabled())
  @@ -218,7 +210,7 @@
                                     hName +
                                     "'");
   
  -                if ( hName != null && (h = tr.find( hName )) != null ) {
  +                if ( hName != null && (h = getTransport( hName )) != null ) {
                       if (h instanceof SimpleTargetedChain) {
                           transportChain = (SimpleTargetedChain)h;
                           h = transportChain.getRequestHandler();
  @@ -230,7 +222,7 @@
                   /* Process the Global Request Chain */
                   /**********************************/
                   hName = Constants.GLOBAL_REQUEST ;
  -                if ( hName != null  && (h = hr.find( hName )) != null )
  +                if ( hName != null  && (h = getHandler( hName )) != null )
                       h.invoke(msgContext);
   
                   /**
  @@ -261,7 +253,7 @@
                   /* Process the Global Response Chain */
                   /***********************************/
                   hName = Constants.GLOBAL_RECEIVE ;
  -                if ( hName != null && (h = hr.find( hName )) != null )
  +                if ( hName != null && (h = getHandler( hName )) != null )
                       h.invoke(msgContext);
   
                   /* Process the Transport Specific Response Chain */
  @@ -296,16 +288,10 @@
           String  hName = null ;
           Handler h     = null ;
   
  -        /* Do some prep-work.  Get the registries and put them in the */
  -        /* msgContext so they can be used by later handlers.          */
  -        /**************************************************************/
  -        HandlerRegistry hr = getHandlerRegistry();
  -        HandlerRegistry sr = getServiceRegistry();
  -
           try {
               hName = msgContext.getStrProp( MessageContext.ENGINE_HANDLER );
               if ( hName != null ) {
  -                if ( hr == null || (h = hr.find(hName)) == null ) {
  +                if ( (h = getHandler(hName)) == null ) {
                       AxisClassLoader cl = msgContext.getClassLoader();
                       try {
                           category.debug( "Trying to load class: " + hName );
  @@ -358,14 +344,13 @@
                   /* Process the Transport Specific Request Chain */
                   /**********************************************/
                   hName = msgContext.getTransportName();
  -                HandlerRegistry tr = getTransportRegistry();
                   SimpleTargetedChain transportChain = null;
   
                   if (category.isInfoEnabled())
                       category.info("AxisServer.editWSDL: Transport = '" +
                                     hName +
                                     "'");
  -                if ( hName != null && (h = tr.find( hName )) != null ) {
  +                if ( hName != null && (h = getTransport( hName )) != null ) {
                       if (h instanceof SimpleTargetedChain) {
                           transportChain = (SimpleTargetedChain)h;
                           h = transportChain.getRequestHandler();
  @@ -377,7 +362,7 @@
                   /* Process the Global Request Chain */
                   /**********************************/
                   hName = Constants.GLOBAL_REQUEST ;
  -                if ( hName != null  && (h = hr.find( hName )) != null )
  +                if ( hName != null  && (h = getHandler( hName )) != null )
                       h.generateWSDL(msgContext);
   
                   /**
  @@ -410,7 +395,7 @@
                   /* Process the Global Response Chain */
                   /***********************************/
                   hName = Constants.GLOBAL_RECEIVE ;
  -                if ( hName != null && (h = hr.find( hName )) != null )
  +                if ( hName != null && (h = getHandler( hName )) != null )
                       h.generateWSDL(msgContext);
   
                   /* Process the Transport Specific Response Chain */
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/server/server-config.wsdd
  
  Index: server-config.wsdd
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <deployment name="defaultClientConfig"
              xmlns="http://xml.apache.org/axis/wsdd/"
              xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
              xmlns:handler="http://xml.apache.org/axis/wsdd/providers/handler">
  
   <handler type="java:org.apache.axis.providers.java.RPCProvider" name="RPCDispatcher"/>
   <handler type="java:org.apache.axis.handlers.http.URLMapper" name="URLMapper"/>
   <handler type="java:org.apache.axis.providers.java.MsgProvider" name="MsgDispatcher"/>
   <handler type="java:org.apache.axis.transport.local.LocalResponder" name="LocalResponder"/>
   <handler type="java:org.apache.axis.handlers.SimpleAuthenticationHandler" name="Authenticate"/>
  
   <chain name="global.request">
    <handler type="java:org.apache.axis.handlers.JWSHandler"/>
   </chain>
  
   <service name="AdminService">
    <provider type="java:org.apache.axis.providers.java.MsgProvider" >
     <java:provider className="org.apache.axis.utils.Admin"/>
    </provider>
    <parameter name="methodName" value="AdminService"/>
    <parameter name="enableRemoteAdmin" value="false"/>
    <parameter name="className" value="org.apache.axis.utils.Admin"/>
   </service>
   <service name="JWSProcessor">
    <provider type="java:org.apache.axis.handlers.JWSProcessor">
     <handler:provider type="java:org.apache.axis.handlers.JWSProcessor"/>
    </provider>
   </service>
   <service name="EchoService">
    <provider type="java:org.apache.axis.handlers.EchoHandler">
     <handler:provider type="java:org.apache.axis.handlers.EchoHandler"/>
    </provider>
   </service>
  
  </deployment>
  
  
  
  1.9       +5 -5      xml-axis/java/src/org/apache/axis/suppliers/SimpleChainSupplier.java
  
  Index: SimpleChainSupplier.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/suppliers/SimpleChainSupplier.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SimpleChainSupplier.java	2001/10/30 16:46:40	1.8
  +++ SimpleChainSupplier.java	2001/10/31 23:50:21	1.9
  @@ -59,7 +59,7 @@
   import org.apache.axis.Handler;
   import org.apache.axis.SimpleChain;
   import org.apache.axis.Supplier;
  -import org.apache.axis.registries.HandlerRegistry;
  +import org.apache.axis.AxisEngine;
   import org.apache.log4j.Category;
   
   import java.util.Hashtable;
  @@ -77,18 +77,18 @@
       String _myName;
       Hashtable _options;
       Vector _handlerNames;
  -    HandlerRegistry _registry;
  +    AxisEngine _engine;
       Chain _chain = null;
       
       public SimpleChainSupplier(String myName,
                                  Vector names,
                                  Hashtable options,
  -                               HandlerRegistry registry)
  +                               AxisEngine engine)
       {
           _myName = myName;
           _handlerNames = names;
           _options = options;
  -        _registry = registry;
  +        _engine = engine;
       }
       
       public Handler getHandler()
  @@ -103,7 +103,7 @@
               c.setName(_myName);
               try {
                   for (int i = 0; i < _handlerNames.size(); i++) {
  -                    Handler handler = _registry.find(
  +                    Handler handler = _engine.getHandler(
                                             (String)_handlerNames.elementAt(i));
                       c.addHandler(handler);
                   }
  
  
  
  1.13      +11 -8     xml-axis/java/src/org/apache/axis/suppliers/TargetedChainSupplier.java
  
  Index: TargetedChainSupplier.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/suppliers/TargetedChainSupplier.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TargetedChainSupplier.java	2001/10/30 16:46:40	1.12
  +++ TargetedChainSupplier.java	2001/10/31 23:50:21	1.13
  @@ -60,6 +60,8 @@
   import org.apache.axis.SimpleChain;
   import org.apache.axis.SimpleTargetedChain;
   import org.apache.axis.Supplier;
  +import org.apache.axis.AxisEngine;
  +import org.apache.axis.AxisFault;
   import org.apache.axis.registries.HandlerRegistry;
   import org.apache.log4j.Category;
   
  @@ -81,7 +83,7 @@
       Vector _requestNames;
       Vector _responseNames;
       String _pivotName;
  -    HandlerRegistry _registry;
  +    AxisEngine _engine;
       
       SimpleTargetedChain _chain = null;
       
  @@ -90,17 +92,18 @@
                                    Vector responseNames,
                                    String pivotName,
                                    Hashtable options,
  -                                 HandlerRegistry registry)
  +                                 AxisEngine engine)
       {
           _myName = myName;
           _requestNames = requestNames;
           _responseNames = responseNames;
           _pivotName = pivotName;
           _options = options;
  -        _registry = registry;
  +        _engine = engine;
       }
       
       private void addHandlersToChain(Vector names, Chain chain)
  +        throws AxisFault
       {
           if (names == null)
               return;
  @@ -108,7 +111,7 @@
           Enumeration e = names.elements();
           while (e.hasMoreElements()) {
               String hName = (String)e.nextElement();
  -            Handler h = _registry.find(hName);
  +            Handler h = _engine.getHandler(hName);
               chain.addHandler(h);
           }
       }
  @@ -118,7 +121,7 @@
           return new SimpleTargetedChain();
       }
       
  -    public Handler getHandler()
  +    public Handler getHandler() throws AxisFault
       {
           if (_chain == null) {
               if (category.isDebugEnabled())
  @@ -132,7 +135,7 @@
               
               if (_requestNames != null && !_requestNames.isEmpty()) {
                   if (_requestNames.size() == 1) {
  -                    h = _registry.find((String)_requestNames.elementAt(0));
  +                    h = _engine.getHandler((String)_requestNames.elementAt(0));
                       c.setRequestHandler(h);
                   } else {
                       Chain chain = new SimpleChain();
  @@ -141,12 +144,12 @@
                   }
               }
               
  -            h = _registry.find(_pivotName);
  +            h = _engine.getHandler(_pivotName);
               c.setPivotHandler(h);
   
               if (_responseNames != null && !_responseNames.isEmpty()) {
                   if (_responseNames.size() == 1) {
  -                    h = _registry.find((String)_responseNames.elementAt(0));
  +                    h = _engine.getHandler((String)_responseNames.elementAt(0));
                       c.setResponseHandler(h);
                   } else {
                       Chain chain = new SimpleChain();
  
  
  
  1.7       +3 -3      xml-axis/java/src/org/apache/axis/suppliers/TransportSupplier.java
  
  Index: TransportSupplier.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/suppliers/TransportSupplier.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TransportSupplier.java	2001/10/30 16:46:40	1.6
  +++ TransportSupplier.java	2001/10/31 23:50:21	1.7
  @@ -56,7 +56,7 @@
   package org.apache.axis.suppliers;
   
   import org.apache.axis.SimpleTargetedChain;
  -import org.apache.axis.registries.HandlerRegistry;
  +import org.apache.axis.AxisEngine;
   import org.apache.axis.server.Transport;
   
   import java.util.Hashtable;
  @@ -73,10 +73,10 @@
                                Vector responseNames,
                                String pivotName,
                                Hashtable options,
  -                             HandlerRegistry registry)
  +                             AxisEngine engine)
       {
           super(myName, requestNames, responseNames, pivotName,
  -              options, registry);
  +              options, engine);
       }
       
       public SimpleTargetedChain getNewChain()
  
  
  
  1.10      +2 -1      xml-axis/java/src/org/apache/axis/transport/http/AdminServlet.java
  
  Index: AdminServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AdminServlet.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AdminServlet.java	2001/10/30 16:46:40	1.9
  +++ AdminServlet.java	2001/10/31 23:50:21	1.10
  @@ -57,6 +57,7 @@
   
   import org.apache.axis.configuration.FileProvider;
   import org.apache.axis.server.AxisServer;
  +import org.apache.axis.Constants;
   
   import javax.servlet.ServletException;
   import javax.servlet.http.HttpServlet;
  @@ -80,7 +81,7 @@
               // (so the config files can't get snooped by a browser)
               FileProvider provider =
                       new FileProvider(getServletContext().getRealPath("/WEB-INF"),
  -                                     "server-config.xml");
  +                                     Constants.SERVER_CONFIG_FILE);
   
               getServletContext().setAttribute("AxisEngine", new AxisServer(provider));
           }
  
  
  
  1.57      +1 -3      xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java
  
  Index: AxisServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- AxisServlet.java	2001/10/30 16:46:40	1.56
  +++ AxisServlet.java	2001/10/31 23:50:21	1.57
  @@ -63,7 +63,6 @@
   import org.apache.axis.configuration.FileProvider;
   import org.apache.axis.message.SOAPEnvelope;
   import org.apache.axis.message.SOAPFaultElement;
  -import org.apache.axis.registries.HandlerRegistry;
   import org.apache.axis.security.servlet.ServletSecurityProvider;
   import org.apache.axis.server.AxisServer;
   import org.apache.axis.utils.Admin;
  @@ -128,7 +127,7 @@
               // (so the config files can't get snooped by a browser)
               FileProvider provider =
                       new FileProvider(getServletContext().getRealPath("/WEB-INF"),
  -                                     "server-config.xml");
  +                                     Constants.SERVER_CONFIG_FILE);
   
               getServletContext().setAttribute("AxisEngine", new AxisServer(provider));
           }
  @@ -142,7 +141,6 @@
   
           ServletContext context = getServletConfig().getServletContext();
           MessageContext msgContext = new MessageContext(engine);
  -        HandlerRegistry hr = engine.getHandlerRegistry();
           PrintWriter writer = res.getWriter();
   
           msgContext.setProperty(Constants.MC_HOME_DIR, context.getRealPath("/"));
  
  
  
  1.36      +2 -2      xml-axis/java/src/org/apache/axis/transport/http/SimpleAxisServer.java
  
  Index: SimpleAxisServer.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/SimpleAxisServer.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- SimpleAxisServer.java	2001/10/30 16:46:40	1.35
  +++ SimpleAxisServer.java	2001/10/31 23:50:21	1.36
  @@ -115,7 +115,7 @@
       public static int sessionIndex = 0;
   
       // Configuration provider
  -    private static FileProvider provider = new FileProvider("server-config.xml");
  +    private static FileProvider provider = new FileProvider(Constants.SERVER_CONFIG_FILE);
   
       // Another example of configuration (AdminService only) might look like this...
       //private static XMLStringProvider provider = new XMLStringProvider("<engineConfig><handlers><handler name=\"MsgDispatcher\" class=\"org.apache.axis.providers.java.MsgProvider\"/></handlers><services><service name=\"AdminService\" pivot=\"MsgDispatcher\"><option name=\"className\" value=\"org.apache.axis.utils.Admin\"/><option name=\"methodName\" value=\"AdminService\"/><option name=\"enableRemoteAdmin\" value=\"false\"/></service></services></engineConfig>");
  @@ -175,7 +175,7 @@
   
           // create an Axis server
           AxisServer engine = getAxisServer();
  -        engine.init();
  +        //engine.init();
   
           // create and initialize a message context
           MessageContext msgContext = new MessageContext(engine);
  
  
  
  1.16      +1 -2      xml-axis/java/src/org/apache/axis/transport/local/LocalSender.java
  
  Index: LocalSender.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/local/LocalSender.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- LocalSender.java	2001/10/30 16:46:41	1.15
  +++ LocalSender.java	2001/10/31 23:50:21	1.16
  @@ -83,8 +83,7 @@
        * Allocate an embedded Axis server to process requests and initialize it.
        */
       public synchronized void init() {
  -        AxisServer server = new AxisServer(new FileProvider("server-config.xml"));
  -        server.init();
  +        AxisServer server = new AxisServer(new FileProvider(Constants.SERVER_CONFIG_FILE));
           this.server=server;
       }
   
  
  
  
  1.78      +224 -199  xml-axis/java/src/org/apache/axis/utils/Admin.java
  
  Index: Admin.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/Admin.java,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- Admin.java	2001/10/30 16:46:41	1.77
  +++ Admin.java	2001/10/31 23:50:21	1.78
  @@ -62,13 +62,17 @@
   import org.apache.axis.Handler;
   import org.apache.axis.MessageContext;
   import org.apache.axis.SimpleChain;
  +import org.apache.axis.providers.java.RPCProvider;
  +import org.apache.axis.providers.java.MsgProvider;
  +import org.apache.axis.deployment.wsdd.*;
  +import org.apache.axis.deployment.wsdd.providers.WSDDJavaProvider;
  +import org.apache.axis.deployment.DeploymentException;
  +import org.apache.axis.deployment.DeploymentRegistry;
   import org.apache.axis.client.AxisClient;
   import org.apache.axis.configuration.FileProvider;
  -import org.apache.axis.encoding.BeanSerializer;
  -import org.apache.axis.encoding.DeserializerFactory;
  -import org.apache.axis.encoding.Serializer;
  -import org.apache.axis.encoding.TypeMappingRegistry;
  +import org.apache.axis.encoding.*;
   import org.apache.axis.handlers.soap.SOAPService;
  +import org.apache.axis.handlers.BasicHandler;
   import org.apache.axis.registries.HandlerRegistry;
   import org.apache.axis.registries.SupplierRegistry;
   import org.apache.axis.server.AxisServer;
  @@ -84,6 +88,7 @@
   import javax.xml.rpc.namespace.QName;
   import java.io.FileInputStream;
   import java.net.InetAddress;
  +import java.net.UnknownHostException;
   import java.util.Hashtable;
   import java.util.StringTokenizer;
   import java.util.Vector;
  @@ -136,32 +141,32 @@
        * @param root the Element containing the service configuration
        * @param service the SOAPService we're working with.
        */
  -    private static void registerTypeMappings(Element root, SOAPService service)
  +    private static void registerTypeMappings(Element root, WSDDService service)
           throws Exception
       {
  -        TypeMappingRegistry reg = service.getTypeMappingRegistry();
           NodeList list = root.getElementsByTagName("beanMappings");
           for (int i = 0; list != null && i < list.getLength(); i++) {
               Element el = (Element)list.item(i);
  -            registerTypes(el, reg, true);
  +            registerTypes(el, service, true, null);
           }
   
           list = root.getElementsByTagName("typeMappings");
           for (int i = 0; list != null && i < list.getLength(); i++) {
               Element el = (Element)list.item(i);
  -            registerTypes(el, reg, false);
  +            registerTypes(el, service, false, null);
           }
       }
   
       private static void registerTypes(Element root,
  -                                      TypeMappingRegistry map,
  -                                      boolean isBean)
  +                                      WSDDTypeMappingContainer container,
  +                                      boolean isBean,
  +                                      DeploymentRegistry registry)
           throws Exception
       {
           NodeList list = root.getChildNodes();
           for (int i = 0; (list != null) && (i < list.getLength()); i++) {
               if (!(list.item(i) instanceof Element)) continue;
  -            registerTypeMapping((Element)list.item(i), map, isBean);
  +            registerTypeMapping((Element)list.item(i), container, isBean, registry);
           }
       }
   
  @@ -189,6 +194,14 @@
           throws Exception
       {
           Element el = doc.getDocumentElement();
  +        String namespace = el.getNamespaceURI();
  +        
  +        // If this is WSDD, process it correctly.
  +        if (namespace != null && namespace.equals(WSDDConstants.WSDD_NS)) {
  +            processWSDD(engine, el);
  +            return;
  +        }
  +        
           if (!el.getTagName().equals("engineConfig"))
               throw new Exception("Wanted 'engineConfig' element, got '" +
                   el.getTagName() + "'");
  @@ -204,14 +217,8 @@
   
           nl = el.getElementsByTagName("typeMappings");
           deploy(nl, engine);
  -        /*
  -        if (nl.getLength() > 0)
  -        registerTypes((Element)nl.item(0),
  -        engine.getTypeMappingRegistry(),
  -        false);
  -        */
  -
  -        engine.saveConfiguration();
  +        
  +        //engine.saveConfiguration();
       }
   
       private static final int
  @@ -249,6 +256,9 @@
        */
       static void deploy(NodeList nl, AxisEngine engine) throws Exception
       {
  +        WSDDDocument wd = (WSDDDocument)engine.getDeploymentRegistry().getConfigDocument();
  +        WSDDDeployment dep = wd.getDeployment();
  +        
           int lenI = nl.getLength();
           for (int i = 0; i < lenI; i++) {
               Element el = (Element)nl.item(i);
  @@ -275,7 +285,7 @@
                       registerTransport(item, engine);
                       break;
                   case TYPE_TYPEMAPPING:
  -                    registerTypeMapping(item, engine.getTypeMappingRegistry(), false);
  +                    registerTypeMapping(item, dep, false, null);
                       break;
                   case TYPE_UNKNOWN:
                       // ignore it
  @@ -286,6 +296,25 @@
               }
           }
       }
  +    
  +    protected static Document processWSDD(AxisEngine engine, Element root)
  +        throws AxisFault
  +    {
  +        Document doc = null ;
  +
  +        try {
  +            WSDDDocument wsddDoc = new WSDDDocument(root);
  +            engine.getDeploymentRegistry().deploy(wsddDoc);
  +        } catch (DeploymentException e) {
  +            throw new AxisFault(e);
  +        }
  +        
  +        doc = XMLUtils.newDocument();
  +        doc.appendChild( root = doc.createElementNS("", "Admin" ) );
  +        root.appendChild( doc.createTextNode( "Done processing" ) );
  +        
  +        return doc;
  +    }
   
       /**
        * The meat of the Admin service.  Process an xML document rooted with
  @@ -298,14 +327,67 @@
       public Document process(MessageContext msgContext, Element root)
           throws AxisFault
       {
  -        Document doc = null ;
  -
  +        // Check security FIRST.
  +        
  +        /** Might do something like this once security is a little more
  +         * integrated.
  +        if (!engine.hasSafePassword() &&
  +            !action.equals("passwd"))
  +            throw new AxisFault("Server.MustSetPassword",
  +          "You must change the admin password before administering Axis!",
  +                                 null, null);
  +         */
  +
  +        /** For now, though - make sure we can only admin from our own
  +         * IP, unless the remoteAdmin option is set.
  +         */
  +        Handler serviceHandler = msgContext.getServiceHandler();
  +        if (serviceHandler != null) {
  +            String remoteAdmin = (String)serviceHandler.
  +                                        getOption("enableRemoteAdmin");
  +            if ((remoteAdmin == null) ||
  +                !remoteAdmin.equals("true")) {
  +                String remoteIP =
  +                        msgContext.getStrProp(Constants.MC_REMOTE_ADDR);
  +                if (remoteIP != null) {
  +                    if (!remoteIP.equals("127.0.0.1")) {
  +                        try {
  +                            InetAddress myAddr = InetAddress.getLocalHost();
  +                            InetAddress remoteAddr =
  +                                    InetAddress.getByName(remoteIP);
  +                            
  +                            if (!myAddr.equals(remoteAddr))
  +                                throw new AxisFault("Server.Unauthorized",
  +                                   "Remote admin access is not allowed! ",
  +                                   null, null);
  +                        } catch (UnknownHostException e) {
  +                            throw new AxisFault("Server.UnknownHost",
  +                                "Unknown host - couldn't verify admin access",
  +                                null, null);
  +                        }
  +                    }
  +                }
  +            }
  +        }
  +        
  +        String rootNS = root.getNamespaceURI();
  +        String rootName = root.getLocalName();
           AxisEngine engine = msgContext.getAxisEngine();
  -        HandlerRegistry hr = engine.getHandlerRegistry();
  -        HandlerRegistry sr = engine.getServiceRegistry();
  +        
  +        // If this is WSDD, process it correctly.
  +        if (rootNS.equals(WSDDConstants.WSDD_NS)) {
  +            return processWSDD(engine, root);
  +        }
   
  +        // Not WSDD, use old code.
  +        // 
  +        // NOTE : THIS CODE IS DEPRECATED AND WILL DISAPPEAR BY
  +        //        BETA 1.  YOU SHOULD SWITCH TO WSDD.
  +        //
  +        Document doc = null ;
  +
           try {
  -            String            action = root.getLocalName();
  +            String            action = rootName;
               AxisClassLoader   cl     = AxisClassLoader.getClassLoader();
   
               if ( !action.equals("clientdeploy") && !action.equals("deploy") &&
  @@ -318,41 +400,7 @@
                       "'list', 'passwd', or 'quit'",
                       null, null );
   
  -            /** Might do something like this once security is a little more
  -             * integrated.
  -            if (!engine.hasSafePassword() &&
  -                !action.equals("passwd"))
  -                throw new AxisFault("Server.MustSetPassword",
  -              "You must change the admin password before administering Axis!",
  -                                     null, null);
  -             */
  -
  -            /** For now, though - make sure we can only admin from our own
  -             * IP, unless the remoteAdmin option is set.
  -             */
  -            Handler serviceHandler = msgContext.getServiceHandler();
  -            if (serviceHandler != null) {
  -                String remoteAdmin = (String)serviceHandler.
  -                                            getOption("enableRemoteAdmin");
  -                if ((remoteAdmin == null) ||
  -                    !remoteAdmin.equals("true")) {
  -                    String remoteIP =
  -                            msgContext.getStrProp(Constants.MC_REMOTE_ADDR);
  -                    if (remoteIP != null) {
  -                        if (!remoteIP.equals("127.0.0.1")) {
  -                            InetAddress myAddr = InetAddress.getLocalHost();
  -                            InetAddress remoteAddr =
  -                                            InetAddress.getByName(remoteIP);
   
  -                            if (!myAddr.equals(remoteAddr))
  -                                throw new AxisFault("Server.Unauthorized",
  -                                    "Remote admin access is not allowed! ",
  -                                    null, null);
  -                        }
  -                    }
  -                }
  -            }
  -
               if (action.equals("passwd")) {
                   String newPassword = root.getFirstChild().getNodeValue();
                   engine.setAdminPassword(newPassword);
  @@ -383,6 +431,9 @@
                   // set engine to client engine
                   engine = engine.getClientEngine();
               }
  +            
  +            WSDDDocument wd = (WSDDDocument)engine.getDeploymentRegistry().getConfigDocument();
  +            WSDDDeployment dep = wd.getDeployment();
   
               NodeList list = root.getChildNodes();
               for ( int loop = 0 ; loop < list.getLength() ; loop++ ) {
  @@ -409,7 +460,7 @@
                               null, null );
                       continue ;
                   }
  -
  +                
                   if ( type.equals( "handler" ) ) {
                       registerHandler(elem, engine);
                   }
  @@ -426,17 +477,16 @@
                   // A streamlined means of deploying both a serializer and a deserializer
                   // for a bean at the same time.
                   else if ( type.equals( "beanMappings" ) ) {
  -                    TypeMappingRegistry engineTypeMap = engine.getTypeMappingRegistry();
  -                    registerTypes(elem, engineTypeMap, true);
  +                    registerTypes(elem, dep, true, engine.getDeploymentRegistry());
                   }
                   else if (type.equals("typeMappings")) {
  -                    TypeMappingRegistry engineTypeMap = engine.getTypeMappingRegistry();
  -                    registerTypes(elem, engineTypeMap, false);
  +                    registerTypes(elem, dep, false, engine.getDeploymentRegistry());
                   } else
                       throw new AxisFault( "Admin.error",
                           "Unknown type to " + action + ": " + type,
                           null, null );
               }
  +            
               engine.saveConfiguration();
   
               doc = XMLUtils.newDocument();
  @@ -463,29 +513,33 @@
       public static Document listConfig(AxisEngine engine)
           throws AxisFault
       {
  -        Document doc = XMLUtils.newDocument();
  -
  -        Element tmpEl = doc.createElementNS("", "engineConfig");
  -        doc.appendChild(tmpEl);
  -
  -        Element el = doc.createElementNS("", "handlers");
  -        list(el, engine.getHandlerRegistry());
  -        tmpEl.appendChild(el);
  -
  -        el = doc.createElementNS("", "services");
  -        list(el, engine.getServiceRegistry());
  -        tmpEl.appendChild(el);
  -
  -        el = doc.createElementNS("", "transports");
  -        list(el, engine.getTransportRegistry());
  -        tmpEl.appendChild(el);
  -
  -        category.debug( "Outputting registry");
  -        el = doc.createElementNS("", "typeMappings");
  -        engine.getTypeMappingRegistry().dumpToElement(el);
  -        tmpEl.appendChild(el);
  -
  -        return( doc );
  +        return engine.
  +                getDeploymentRegistry().
  +                getConfigDocument().
  +                getDOMDocument();
  +//        Document doc = XMLUtils.newDocument();
  +//
  +//        Element tmpEl = doc.createElementNS("", "engineConfig");
  +//        doc.appendChild(tmpEl);
  +//
  +//        Element el = doc.createElementNS("", "handlers");
  +//        list(el, engine.getHandlerRegistry());
  +//        tmpEl.appendChild(el);
  +//
  +//        el = doc.createElementNS("", "services");
  +//        list(el, engine.getServiceRegistry());
  +//        tmpEl.appendChild(el);
  +//
  +//        el = doc.createElementNS("", "transports");
  +//        list(el, engine.getTransportRegistry());
  +//        tmpEl.appendChild(el);
  +//
  +//        category.debug( "Outputting registry");
  +//        el = doc.createElementNS("", "typeMappings");
  +//        engine.getTypeMappingRegistry().dumpToElement(el);
  +//        tmpEl.appendChild(el);
  +//
  +//        return( doc );
       }
   
       /**
  @@ -536,7 +590,6 @@
       {
           Handler tmpH = null;
           String hName;
  -        SupplierRegistry hr = (SupplierRegistry)engine.getHandlerRegistry();
   
           String   name    = elem.getAttribute( "name" );
           String   flow    = elem.getAttribute( "flow" );
  @@ -555,54 +608,24 @@
               category.info( "Deploying chain: " + name );
               Vector names = new Vector();
   
  -            StringTokenizer st = new StringTokenizer( flow, " \t\n\r\f," );
  -            while ( st.hasMoreElements() ) {
  -                names.addElement(st.nextToken());
  -            }
               getOptions( elem, options );
  -
  -            SimpleChainSupplier supp = new SimpleChainSupplier(name,
  -                                                               names,
  -                                                               options,
  -                                                               hr);
  -
  -            hr.add(name, supp);
  -        }
  -        else {
  -            category.info( "Deploying chain: " + name );
  +            
  +            WSDDDocument wsddDoc = (WSDDDocument)engine.
  +                    getDeploymentRegistry().getConfigDocument();
  +            
  +            WSDDChain chain = wsddDoc.getDeployment().createChain();
  +            chain.setName(name);
  +            chain.setOptionsHashtable(options);
   
  -            if ((request == null) &&
  -                (response == null) &&
  -                (pivot == null))
  -                throw new AxisFault("No request/response/pivot for chain '" + name + "'!");
  -
  -            StringTokenizer      st = null ;
  -            Vector reqNames = new Vector();
  -            Vector respNames = new Vector();
  -
  -            if (request != null) {
  -                st = new StringTokenizer( request, " \t\n\r\f," );
  -                while ( st.hasMoreElements() ) {
  -                    reqNames.addElement(st.nextToken());
  -                }
  -            }
  -
  -            if (response != null) {
  -                st = new StringTokenizer( response, " \t\n\r\f," );
  -                while ( st.hasMoreElements() ) {
  -                    respNames.addElement(st.nextToken());
  -                }
  +            StringTokenizer st = new StringTokenizer( flow, " \t\n\r\f," );
  +            while ( st.hasMoreElements() ) {
  +                String handlerName = st.nextToken();
  +                WSDDHandler handler = chain.createHandler();
  +                //handler.setName(handlerName);
  +                handler.setType(handlerName);
               }
  -
  -            getOptions( elem, options );
   
  -            TargetedChainSupplier supp = new TargetedChainSupplier(name,
  -                                                                   reqNames,
  -                                                                   respNames,
  -                                                                   pivot,
  -                                                                   options,
  -                                                                   hr);
  -            hr.add(name,supp);
  +            engine.getDeploymentRegistry().deployHandler(chain);
           }
       }
   
  @@ -615,9 +638,6 @@
       public static void registerService(Element elem, AxisEngine engine)
           throws AxisFault
       {
  -        HandlerRegistry hr = engine.getHandlerRegistry();
  -        HandlerRegistry sr = engine.getServiceRegistry();
  -
           String   name    = elem.getAttribute( "name" );
           String   request   = elem.getAttribute( "request" );
           String   pivot   = elem.getAttribute( "pivot" );
  @@ -632,69 +652,65 @@
           String            hName = null ;
           Handler            tmpH = null ;
           StringTokenizer      st = null ;
  -        SOAPService     service = null ;
  -        Chain                c  = null ;
   
           if ( pivot == null && request == null && response == null )
               throw new AxisFault( "Admin.error",
                   "Services must use targeted chains",
                   null, null );
  -
  -        service = (SOAPService) sr.find( name );
  -
  -        if ( service == null ) service = new SOAPService();
  -        else              service.clear();
   
  +        WSDDDocument wd = (WSDDDocument)engine.getDeploymentRegistry().getConfigDocument();
  +        WSDDService serv = wd.getDeployment().createService();
  +        
  +        serv.setName(name);
  +        
           if ( request != null && !"".equals(request) ) {
               st = new StringTokenizer( request, " \t\n\r\f," );
  -            c  = null ;
  +            WSDDRequestFlow req = serv.createRequestFlow();
  +            WSDDChain chain = req.createChain();
               while ( st.hasMoreElements() ) {
  -                if ( c == null )
  -                    service.setRequestHandler( c = new SimpleChain() );
                   hName = st.nextToken();
  -                tmpH = hr.find( hName );
  -                if ( tmpH == null )
  -                    throw new AxisFault( "Admin.error",
  -                        "Unknown handler: " + hName,
  -                        null, null );
  -                c.addHandler( tmpH );
  +                WSDDHandler h = chain.createHandler();
  +                h.setType(hName);
               }
           }
   
  -        if ( pivot != null && !"".equals(pivot) ) {
  -            tmpH = hr.find(pivot);
  -            if (tmpH == null)
  -                throw new AxisFault("Deploying service " + name +
  -                    ": couldn't find pivot Handler '" + pivot + "'");
  +        Hashtable opts = new Hashtable();
  +        getOptions( elem, opts );
  +        serv.setOptionsHashtable(opts);
  +        
  +        Handler pivotHandler = engine.getHandler(pivot);
  +        if (pivotHandler == null)
  +            throw new AxisFault("No pivot handler '" + pivot + "' found!");
  +        Class pivotClass = pivotHandler.getClass();
  +        if ((pivotClass != RPCProvider.class) &&
  +            (pivotClass != MsgProvider.class)) {
  +            throw new AxisFault("Only RPCDispatcher or MsgDispatcher are allowed as service pivots! (you specified '" + pivot + "')");
  +        }
   
  -            service.setPivotHandler( tmpH );
  +        if ( pivot != null && !"".equals(pivot) ) {
  +            WSDDProvider provider = serv.createProvider(WSDDJavaProvider.class);
  +            provider.setAttribute("type", pivot);
  +            provider.setProviderAttribute("className", (String)opts.get("className"));
           }
   
           if ( response != null && !"".equals(response) ) {
               st = new StringTokenizer( response, " \t\n\r\f," );
  -            c  = null ;
  +            WSDDResponseFlow resp = serv.createResponseFlow();
  +            WSDDChain chain = resp.createChain();
               while ( st.hasMoreElements() ) {
  -                if ( c == null )
  -                    service.setResponseHandler( c = new SimpleChain() );
                   hName = st.nextToken();
  -                tmpH = hr.find( hName );
  -                if ( tmpH == null )
  -                    throw new AxisFault( "Admin.error",
  -                        "Unknown handler: " + hName,
  -                        null, null );
  -                c.addHandler( tmpH );
  +                WSDDHandler h = chain.createHandler();
  +                h.setType(hName);
               }
           }
   
  -        getOptions( elem, service );
  -
           try {
  -            registerTypeMappings(elem, service);
  +            registerTypeMappings(elem, serv);
           } catch (Exception e) {
               throw new AxisFault(e);
           }
   
  -        engine.deployService( name, service );
  +        engine.getDeploymentRegistry().deployService(serv);
       }
   
       /**
  @@ -706,8 +722,6 @@
       public static void registerHandler(Element elem, AxisEngine engine)
           throws AxisFault
       {
  -        HandlerRegistry hr = engine.getHandlerRegistry();
  -
           try {
               AxisClassLoader   cl     = AxisClassLoader.getClassLoader();
               String   name    = elem.getAttribute( "name" );
  @@ -719,7 +733,7 @@
               if ( cls != null && cls.equals("") ) cls = null ;
               category.info( "Deploying handler: " + name );
   
  -            h = hr.find( name );
  +            h = engine.getHandler( name );
               if ( h == null ) h = (Handler) cl.loadClass(cls).newInstance();
               getOptions( elem, h );
               engine.deployHandler( name, h );
  @@ -757,30 +771,35 @@
           Vector reqNames = new Vector();
           Vector respNames = new Vector();
   
  +        WSDDDocument wd = (WSDDDocument)engine.getDeploymentRegistry().getConfigDocument();
  +        WSDDTransport transport = wd.getDeployment().createTransport();
  +        
  +        transport.setName(name);
  +
           if (request != null) {
  +            WSDDRequestFlow req = transport.createRequestFlow();
  +            WSDDChain chain = req.createChain();
               st = new StringTokenizer( request, " \t\n\r\f," );
               while ( st.hasMoreElements() ) {
  -                reqNames.addElement(st.nextToken());
  +                WSDDHandler h = chain.createHandler();
  +                h.setType(st.nextToken());
               }
           }
   
           if (response != null) {
  +            WSDDResponseFlow resp = transport.createResponseFlow();
  +            WSDDChain chain = resp.createChain();
               st = new StringTokenizer( response, " \t\n\r\f," );
               while ( st.hasMoreElements() ) {
  -                respNames.addElement(st.nextToken());
  +                WSDDHandler h = chain.createHandler();
  +                h.setType(st.nextToken());
               }
           }
   
           getOptions( elem, options );
  +        transport.setOptionsHashtable(options);
   
  -        HandlerRegistry hr = engine.getHandlerRegistry();
  -        TargetedChainSupplier supp = new TransportSupplier(name,
  -                                                           reqNames,
  -                                                           respNames,
  -                                                           sender,
  -                                                           options,
  -                                                           hr);
  -        engine.deployTransport(name, supp);
  +        engine.getDeploymentRegistry().deployTransport(transport);
       }
   
       /**
  @@ -790,15 +809,16 @@
        * @param map the TypeMappingRegistry which gets this mapping.
        */
       private static void registerTypeMapping(Element elem,
  -                                            TypeMappingRegistry map,
  -                                            boolean isBean)
  +                                            WSDDTypeMappingContainer container,
  +                                            boolean isBean,
  +                                            DeploymentRegistry registry)
           throws Exception
       {
  -        Serializer ser;
  -        DeserializerFactory dserFactory;
  -
  +        WSDDTypeMapping mapping = container.createTypeMapping();
  +        
           // Retrieve classname attribute
           String classname = elem.getAttribute("classname");
  +        
           if ((classname == null) || classname.equals(""))
               throw new AxisFault("Server.Admin.error",
                   "No classname attribute in type mapping",
  @@ -816,6 +836,8 @@
               throw new AxisFault( "Admin.error", e.toString(), null, null);
           }
   
  +        mapping.setLanguageSpecificType(cls);
  +        
           if (isBean) {
               // Resolve qname based on prefix and localpart
   
  @@ -826,8 +848,9 @@
               category.debug( "Registering mapping for " + qn + " -> " + classname);
   
               // register both serializers and deserializers for this bean
  -            ser = new BeanSerializer(cls);
  -            dserFactory = BeanSerializer.getFactory();
  +            mapping.setQName(qn);
  +            mapping.setSerializer(BeanSerializer.class);
  +            mapping.setDeserializer(BeanSerializer.getFactory().getClass());
           } else {
               String typeName = elem.getAttribute("type");
               int idx = typeName.indexOf(':');
  @@ -836,10 +859,12 @@
   
               qn = new QName(XMLUtils.getNamespace(prefix, elem), localPart);
   
  +            mapping.setQName(qn);
               classname = elem.getAttribute("serializer");
               category.debug( "Serializer class is " + classname);
               try {
  -                ser = (Serializer)cl.loadClass(classname).newInstance();
  +                cls = cl.loadClass(classname);
  +                mapping.setSerializer(cls);
               } catch (Exception e) {
                   throw new AxisFault( "Admin.error",
                       "Couldn't load serializer class " + e.toString(),
  @@ -848,19 +873,19 @@
               classname = elem.getAttribute("deserializerFactory");
               category.debug( "DeserializerFactory class is " + classname);
               try {
  -                dserFactory = (DeserializerFactory)cl.loadClass(classname).
  -                                                                            newInstance();
  +                cls = cl.loadClass(classname);
  +                mapping.setDeserializer(cls);
               } catch (Exception e) {
                   throw new AxisFault( "Admin.error",
                       "Couldn't load deserializerFactory " +
                       e.toString(),
                       null, null);
               }
  -
           }
  -
  -        map.addSerializer(cls, qn, ser);
  -        map.addDeserializerFactory(qn, cls, dserFactory);
  +        
  +        if (registry != null) {
  +            WSDDDocument.deployMappingToRegistry(mapping, registry);
  +        }
       }
   
       public static void main(String args[]) throws Exception {
  @@ -900,9 +925,9 @@
   
           AxisEngine engine;
           if ( args[0].equals("client") )
  -            engine = new AxisClient(new FileProvider("client-config.xml"));
  +            engine = new AxisClient(new FileProvider(Constants.CLIENT_CONFIG_FILE));
           else
  -            engine = new AxisServer(new FileProvider("server-config.xml"));
  +            engine = new AxisServer(new FileProvider(Constants.SERVER_CONFIG_FILE));
           engine.setShouldSaveConfig(true);
           engine.init();
           MessageContext msgContext = new MessageContext(engine);
  
  
  
  1.24      +9 -10     xml-axis/java/test/RPCDispatch/TestRPC.java
  
  Index: TestRPC.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/RPCDispatch/TestRPC.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- TestRPC.java	2001/10/18 13:28:37	1.23
  +++ TestRPC.java	2001/10/31 23:50:22	1.24
  @@ -10,7 +10,6 @@
   import org.apache.axis.message.RPCElement;
   import org.apache.axis.message.RPCParam;
   import org.apache.axis.message.SOAPEnvelope;
  -import org.apache.axis.registries.HandlerRegistry;
   import org.apache.axis.server.AxisServer;
   
   import java.util.Vector;
  @@ -36,8 +35,6 @@
           "</soap:Envelope>\n";
   
       private AxisServer engine = new AxisServer();
  -    private HandlerRegistry hr;
  -    private HandlerRegistry sr;
       private Handler RPCDispatcher;
   
       private String SOAPAction = "urn:reverse";
  @@ -45,9 +42,11 @@
       public TestRPC(String name) {
           super(name);
           engine.init();
  -        hr = (HandlerRegistry) engine.getHandlerRegistry();
  -        sr = (HandlerRegistry) engine.getServiceRegistry();
  -        RPCDispatcher = hr.find("RPCDispatcher");
  +        try {
  +            RPCDispatcher = engine.getHandler("RPCDispatcher");
  +        } catch (AxisFault fault) {
  +            // ???
  +        }
           // Debug.setDebugLevel(5);
       }
   
  @@ -108,7 +107,7 @@
           SOAPService reverse = new SOAPService(RPCDispatcher);
           reverse.addOption("className", "test.RPCDispatch.Service");
           reverse.addOption("methodName", "reverseString");
  -        sr.add(SOAPAction, reverse);
  +        engine.deployService(SOAPAction, reverse);
   
           // invoke the service and verify the result
           assertEquals("Did not reverse the string correctly.", "cba", rpc("reverseString", new Object[] {"abc"}));
  @@ -122,7 +121,7 @@
           SOAPService reverse = new SOAPService(RPCDispatcher);
           reverse.addOption("className", "test.RPCDispatch.Service");
           reverse.addOption("methodName", "reverseData");
  -        sr.add(SOAPAction, reverse);
  +        engine.deployService(SOAPAction, reverse);
   
           // invoke the service and verify the result
           Data input    = new Data(5, "abc", 3);
  @@ -138,7 +137,7 @@
           SOAPService tgtSvc = new SOAPService(RPCDispatcher);
           tgtSvc.addOption("className", "test.RPCDispatch.Service");
           tgtSvc.addOption("methodName", "targetService");
  -        sr.add(SOAPAction, tgtSvc);
  +        engine.deployService(SOAPAction, tgtSvc);
   
           // invoke the service and verify the result
           assertEquals("SOAP Action did not equal the targetService.", SOAPAction, rpc("targetService", new Object[] {}));
  @@ -152,7 +151,7 @@
           SOAPService echoInt = new SOAPService(RPCDispatcher);
           echoInt.addOption("className", "test.RPCDispatch.Service");
           echoInt.addOption("methodName", "echoInt");
  -        sr.add(SOAPAction, echoInt);
  +        engine.deployService(SOAPAction, echoInt);
   
           // invoke the service and verify the result
           assertNull("The result was not null as expected.", rpc("echoInt", new Object[] {null}));
  
  
  
  1.16      +3 -7      xml-axis/java/test/RPCDispatch/TestSerializedRPC.java
  
  Index: TestSerializedRPC.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/RPCDispatch/TestSerializedRPC.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- TestSerializedRPC.java	2001/10/26 18:19:01	1.15
  +++ TestSerializedRPC.java	2001/10/31 23:50:22	1.16
  @@ -39,25 +39,20 @@
           "</soap:Envelope>\n";
   
       private AxisServer engine = new AxisServer();
  -    private HandlerRegistry hr;
  -    private HandlerRegistry sr;
       private Handler RPCDispatcher;
   
       private String SOAPAction = "urn:reverse";
   
  -    public TestSerializedRPC(String name) {
  +    public TestSerializedRPC(String name) throws Exception {
           super(name);
           engine.init();
  -        hr = (HandlerRegistry) engine.getHandlerRegistry();
  -        sr = (HandlerRegistry) engine.getServiceRegistry();
  -        RPCDispatcher = hr.find("RPCDispatcher");
  +        RPCDispatcher = engine.getHandler("RPCDispatcher");
           
           // Register the reverseString service
           SOAPService reverse = new SOAPService(RPCDispatcher);
           reverse.addOption("className", "test.RPCDispatch.Service");
           reverse.addOption("methodName", "*");
           engine.deployService(SOAPAction, reverse);
  -        
       }
   
       /**
  @@ -99,6 +94,7 @@
   
           // Extract the response Envelope
           Message message = msgContext.getResponseMessage();
  +        assertNotNull("Response message was null!", message);
           SOAPEnvelope envelope = (SOAPEnvelope)message.getAsSOAPEnvelope();
           assertNotNull("SOAP envelope was null", envelope);
   
  
  
  
  1.10      +1 -3      xml-axis/java/test/encoding/TestArrayListConversions.java
  
  Index: TestArrayListConversions.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/encoding/TestArrayListConversions.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestArrayListConversions.java	2001/10/26 18:19:01	1.9
  +++ TestArrayListConversions.java	2001/10/31 23:50:22	1.10
  @@ -5,7 +5,6 @@
   import org.apache.axis.client.Call;
   import org.apache.axis.client.Service;
   import org.apache.axis.handlers.soap.SOAPService;
  -import org.apache.axis.registries.HandlerRegistry;
   import org.apache.axis.server.AxisServer;
   import org.apache.axis.transport.local.LocalTransport;
   
  @@ -54,8 +53,7 @@
       try {
         Service ss = new Service();
         AxisServer server = new AxisServer();
  -      HandlerRegistry hr = (HandlerRegistry) server.getHandlerRegistry();
  -      Handler disp = hr.find("RPCDispatcher");    
  +      Handler disp = server.getHandler("RPCDispatcher");    
         SOAPService service = new SOAPService(disp);
         service.addOption("className", "test.encoding.TestArrayListConversions");
         service.addOption("methodName", "*");
  
  
  
  1.6       +2 -5      xml-axis/java/test/encoding/TestBody.java
  
  Index: TestBody.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/encoding/TestBody.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestBody.java	2001/10/18 13:28:38	1.5
  +++ TestBody.java	2001/10/31 23:50:22	1.6
  @@ -8,7 +8,6 @@
   import org.apache.axis.handlers.soap.SOAPService;
   import org.apache.axis.message.RPCElement;
   import org.apache.axis.message.SOAPEnvelope;
  -import org.apache.axis.registries.HandlerRegistry;
   import org.apache.axis.server.AxisServer;
   
   /** 
  @@ -40,13 +39,11 @@
          // setup
          AxisEngine engine = new AxisServer();
          engine.init();
  -       HandlerRegistry hr = engine.getHandlerRegistry();
  -       HandlerRegistry sr = engine.getServiceRegistry();
          
          // register the service with the engine
  -       Handler RPCDispatcher = hr.find("RPCDispatcher");
  +       Handler RPCDispatcher = engine.getHandler("RPCDispatcher");
          SOAPService target = new SOAPService(RPCDispatcher);
  -       sr.add(namespace, target);
  +       engine.deployService(namespace, target);
   
          // create a message in context
          MessageContext msgContext = new MessageContext(engine);
  
  
  
  1.13      +1 -1      xml-axis/java/test/functional/FunctionalTests.java
  
  Index: FunctionalTests.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/FunctionalTests.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- FunctionalTests.java	2001/10/24 14:41:33	1.12
  +++ FunctionalTests.java	2001/10/31 23:50:22	1.13
  @@ -41,7 +41,7 @@
           suite.addTestSuite(TestMiscSample.class);
   
           // Proxy service test.
  -        suite.addTestSuite(TestProxySample.class);
  +        //suite.addTestSuite(TestProxySample.class);
   
           return suite;
       }
  
  
  
  1.14      +1 -1      xml-axis/java/test/functional/TestStockSample.java
  
  Index: TestStockSample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestStockSample.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- TestStockSample.java	2001/10/30 16:46:42	1.13
  +++ TestStockSample.java	2001/10/31 23:50:22	1.14
  @@ -89,7 +89,7 @@
       }
       
       public void doTestDeploy () throws Exception {
  -        String[] args = { "samples/stock/deploy.xml" };
  +        String[] args = { "samples/stock/deploy.wsdd" };
           AdminClient.main(args);
       }
       
  
  
  
  1.12      +0 -10     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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TestTCPTransportSample.java	2001/10/30 16:46:42	1.11
  +++ TestTCPTransportSample.java	2001/10/31 23:50:22	1.12
  @@ -61,7 +61,6 @@
   import org.apache.axis.client.Call;
   import org.apache.axis.client.Service;
   import org.apache.axis.encoding.XMLType;
  -import org.apache.axis.utils.Admin;
   import org.apache.log4j.Category;
   import samples.transport.tcp.AdminClient;
   import samples.transport.tcp.GetQuote;
  @@ -78,11 +77,6 @@
           super(name);
       }
   
  -    public void doTransportDeploy() throws Exception {
  -        String[] args = { "client", "samples/transport/tcp/deploy.xml" };
  -        Admin.main(args);
  -    }
  -
       public void doTestDeploy () throws Exception {
           String[] args = { "-ltcp://localhost:8088", "samples/transport/deploy.xml" };
           AdminClient.main(args);
  @@ -131,10 +125,6 @@
       public void testTCPTransportSample () throws Exception {
           try {
               category.info("Testing TCP transport.");
  -
  -            category.info("Deploying TCP client transport...");
  -            doTransportDeploy();
  -            category.info("OK!");
   
               category.info("Testing deployment...");
               doTestDeploy();
  
  
  
  1.17      +3 -3      xml-axis/java/test/functional/TestTransportSample.java
  
  Index: TestTransportSample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestTransportSample.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- TestTransportSample.java	2001/10/30 16:46:42	1.16
  +++ TestTransportSample.java	2001/10/31 23:50:22	1.17
  @@ -57,7 +57,7 @@
   
   import junit.framework.TestCase;
   import org.apache.axis.AxisFault;
  -import org.apache.axis.utils.Admin;
  +import org.apache.axis.client.AdminClient;
   import org.apache.log4j.Category;
   import samples.transport.FileTest;
   
  @@ -72,8 +72,8 @@
       }
       
       public void doTestDeploy () throws Exception {
  -        String[] args = { "server", "samples/transport/deploy.xml" };
  -        Admin.main(args);
  +        String[] args = { "-llocal:", "samples/transport/deploy.xml" };
  +        AdminClient.main(args);
       }
       
       /* NOT RECOMMENDED -- this calls out to xmltoday.com which is flaky.
  
  
  
  1.6       +1 -7      xml-axis/java/test/outparams/TestOutParams.java
  
  Index: TestOutParams.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/outparams/TestOutParams.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestOutParams.java	2001/10/26 18:19:01	1.5
  +++ TestOutParams.java	2001/10/31 23:50:22	1.6
  @@ -10,7 +10,6 @@
   import org.apache.axis.handlers.soap.SOAPService;
   import org.apache.axis.message.RPCParam;
   import org.apache.axis.message.SOAPEnvelope;
  -import org.apache.axis.registries.HandlerRegistry;
   import org.apache.axis.server.AxisServer;
   import org.apache.axis.transport.local.LocalTransport;
   
  @@ -41,14 +40,9 @@
       private Call client = new Call();
       private AxisServer server = new AxisServer();
   
  -    private HandlerRegistry hr;
  -    private HandlerRegistry sr;
  -
       public TestOutParams(String name) {
           super(name);
           server.init();
  -        hr = (HandlerRegistry) server.getHandlerRegistry();
  -        sr = (HandlerRegistry) server.getServiceRegistry();
       }
   
       /**
  @@ -61,7 +55,7 @@
           // ??? Do we need to register the handler?
   
           SOAPService service = new SOAPService(h);
  -        sr.add(serviceURN, service);
  +        server.deployService(serviceURN, service);
   
           // Make sure the local transport uses the server we just configured
           client.setTransport(new LocalTransport(server));
  
  
  

Mime
View raw message