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/src/org/apache/axis/utils XMLUtils.java
Date Thu, 11 Oct 2001 15:49:29 GMT
gdaniels    01/10/11 08:49:29

  Modified:    java/src/org/apache/axis/deployment DeployableItem.java
                        DeploymentDocument.java DeploymentException.java
                        DeploymentRegistry.java
                        SimpleDeploymentManager.java readme
               java/src/org/apache/axis/deployment/v2dd
                        DeploymentDescriptor.java V2DDConstants.java
                        V2DDDeployableItem.java V2DDElement.java
                        V2DDException.java V2DDFaultListener.java
                        V2DDMap.java V2DDMappings.java V2DDOption.java
                        V2DDProvider.java V2DDService.java
               java/src/org/apache/axis/deployment/v2dd/providers
                        V2DDComProvider.java V2DDJavaProvider.java
                        V2DDScriptProvider.java
               java/src/org/apache/axis/deployment/wsdd WSDDChain.java
                        WSDDConstants.java WSDDDeployableItem.java
                        WSDDDeployment.java WSDDDocument.java
                        WSDDElement.java WSDDException.java
                        WSDDFaultFlow.java WSDDFlow.java
                        WSDDGlobalConfiguration.java WSDDHandler.java
                        WSDDOperation.java WSDDParameter.java
                        WSDDProvider.java WSDDRequestFlow.java
                        WSDDResponseFlow.java WSDDService.java
                        WSDDTransport.java WSDDTypeMapping.java
               java/src/org/apache/axis/deployment/wsdd/providers
                        WSDDBsfProvider.java WSDDComProvider.java
                        WSDDJavaProvider.java
               java/src/org/apache/axis/deployment/wsml ServiceMapping.java
               java/src/org/apache/axis/utils XMLUtils.java
  Added:       java/src/org/apache/axis/deployment/wsdd
                        SimpleWsddDeploymentManager.java
                        WSDDDocumentation.java
  Log:
  Update WSDD code to allow programmatic mutation of WSDD structures.
  This will allow tools, etc. to build WSDD docs.
  
  This commit only updates the WSDD code itself.  Integration with the
  Axis registries is the next step in conversion.
  
  NOTE: There are a lot of "blank" comments in here as a result of
  running this code through a formatter (JIndent).  These will be fleshed out
  later.
  
  Submitted by : Carl Woolf (cwoolf@macromedia.com)
  
  Revision  Changes    Path
  1.4       +22 -7     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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DeployableItem.java	2001/10/03 15:30:03	1.3
  +++ DeployableItem.java	2001/10/11 15:49:27	1.4
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,14 +54,29 @@
    */
   package org.apache.axis.deployment;
   
  -import org.apache.axis.Handler;
   import org.apache.axis.utils.QName;
  +import org.apache.axis.Handler;
  +
   
   /**
    * Interface representing an item that is deployable into the
    * Axis Deployment Registry
    */
  -public interface DeployableItem { 
  +public interface DeployableItem
  +{
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
       public QName getQName();
  -    public Handler newInstance(DeploymentRegistry registry) throws Exception;
  +
  +    /**
  +     *
  +     * @param registry XXX
  +     * @return XXX
  +     * @throws Exception XXX
  +     */
  +    public Handler newInstance(DeploymentRegistry registry)
  +        throws Exception;
   }
  
  
  
  1.3       +11 -8     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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeploymentDocument.java	2001/08/29 14:17:15	1.2
  +++ DeploymentDocument.java	2001/10/11 15:49:27	1.3
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -57,11 +57,14 @@
   /**
    * Represents a deployment descriptor document of some sort
    */
  -public abstract class DeploymentDocument { 
  -    
  +public interface DeploymentDocument
  +{
  +
       /**
        * Deploy the contents of this document to the given registry
  +     * @param registry XXX
  +     * @throws DeploymentException XXX
        */
  -    public abstract void deploy(DeploymentRegistry registry) throws DeploymentException;
  -    
  +    void deploy(DeploymentRegistry registry)
  +        throws DeploymentException;
   }
  
  
  
  1.3       +23 -10    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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeploymentException.java	2001/08/29 14:17:15	1.2
  +++ DeploymentException.java	2001/10/11 15:49:27	1.3
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,14 +54,27 @@
    */
   package org.apache.axis.deployment;
   
  -public class DeploymentException extends Exception { 
  -    
  -    public DeploymentException() {
  +/**
  + *
  + */
  +public class DeploymentException
  +    extends Exception
  +{
  +
  +    /**
  +     *
  +     */
  +    public DeploymentException()
  +    {
           super();
       }
  -    
  -    public DeploymentException(String message) {
  +
  +    /**
  +     *
  +     * @param message (String) XXX
  +     */
  +    public DeploymentException(String message)
  +    {
           super(message);
       }
  -    
   }
  
  
  
  1.5       +169 -86   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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DeploymentRegistry.java	2001/10/03 15:30:03	1.4
  +++ DeploymentRegistry.java	2001/10/11 15:49:27	1.5
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,138 +54,221 @@
    */
   package org.apache.axis.deployment;
   
  -import org.apache.axis.Handler;
  -import org.apache.axis.deployment.wsdd.WSDDGlobalConfiguration;
  -import org.apache.axis.encoding.TypeMappingRegistry;
  -import org.apache.axis.utils.QName;
  -
  -import java.io.FileInputStream;
  -import java.io.FileOutputStream;
   import java.io.IOException;
  +import java.io.OutputStream;
   import java.io.InputStream;
  -import java.io.ObjectInputStream;
   import java.io.ObjectOutputStream;
  -import java.io.OutputStream;
  +import java.io.FileOutputStream;
  +import java.io.ObjectInputStream;
  +import java.io.FileInputStream;
   import java.io.Serializable;
   
  +import org.apache.axis.Handler;
  +import org.apache.axis.Chain;
  +import org.apache.axis.TargetedChain;
  +import org.apache.axis.encoding.TypeMappingRegistry;
  +import org.apache.axis.deployment.wsdd.WSDDGlobalConfiguration;
  +import org.apache.axis.deployment.wsdd.WSDDDeployableItem;
  +import org.apache.axis.utils.QName;
  +
  +
   /**
  - * The DeploymentRegistry abstract class takes the place of the 
  - * org.apache.axis.registry.HandlerRegistry and extends the 
  - * functionality to cover all Axis deployable items. 
  - * 
  + * The DeploymentRegistry abstract class takes the place of the
  + * org.apache.axis.registry.HandlerRegistry and extends the
  + * functionality to cover all Axis deployable items.
  + *
    * @author James Snell
    */
  -public abstract class DeploymentRegistry implements Serializable { 
  -    
  -    /** 
  -     * retrieve the global configuration for the axis engine 
  -     */
  -    public abstract WSDDGlobalConfiguration getGlobalConfiguration() throws DeploymentException;
  -        
  -    /** 
  +public abstract class DeploymentRegistry
  +    implements Serializable
  +{
  +
  +    /**
  +     * retrieve the global configuration for the axis engine
  +     * @return XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public abstract WSDDGlobalConfiguration getGlobalConfiguration()
  +        throws DeploymentException;
  +
  +    /**
        * retrieve an instance of the named handler
  +     * @param name XXX
  +     * @return XXX
  +     * @throws DeploymentException XXX
        */
  -    public abstract Handler getDeployedItem(String name) throws DeploymentException;
  -    
  -    /** 
  -     * retrieve an instance of the named handler 
  -     */
  -    public abstract Handler getDeployedItem(QName qname) throws DeploymentException;
  -    
  -    /** 
  -     * retrieve an instance of the named mapping registry 
  +    public abstract Handler getDeployedItem(String name)
  +        throws DeploymentException;
  +
  +    /**
  +     * retrieve an instance of the named handler
  +     * @param qname XXX
  +     * @return XXX
  +     * @throws DeploymentException XXX
        */
  -    public abstract TypeMappingRegistry getTypeMappingRegistry(String encodingStyle) throws DeploymentException;
  +    public abstract Handler getDeployedItem(QName qname)
  +        throws DeploymentException;
  +
  +    /**
  +     * retrieve an instance of the named mapping registry
  +     * @param encodingStyle XXX
  +     * @return XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public abstract TypeMappingRegistry getTypeMappingRegistry(
  +        String encodingStyle)
  +        throws DeploymentException;
   
  -    /** 
  +    /**
        * add the given type mapping
  +     * @param encodingStyle XXX
  +     * @param tmr XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public abstract void addTypeMappingRegistry(String encodingStyle,
  +                                                TypeMappingRegistry tmr)
  +        throws DeploymentException;
  +
  +    /**
  +     * remove the given type mapping
  +     * @param encodingStyle XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public abstract void removeTypeMappingRegistry(String encodingStyle)
  +        throws DeploymentException;
  +
  +    /**
  +     * Deploy an Axis WSDD Document
  +     * @param deployment XXX
  +     * @throws DeploymentException XXX
        */
  -    public abstract void addTypeMappingRegistry(String encodingStyle, TypeMappingRegistry tmr) throws DeploymentException;
  -    
  -    /** 
  -     * remove the given type mapping 
  -     */
  -    public abstract void removeTypeMappingRegistry(String encodingStyle) throws DeploymentException;
  -    
  -    /** 
  -     * Deploy an Axis WSDD Document 
  -     */
  -    public abstract void deploy(DeploymentDocument deployment) throws DeploymentException;
  -    
  -    /** 
  -     * deploy the given item 
  -     */
  -    public abstract void deployItem(DeployableItem item) throws DeploymentException;
  -    
  -    /** 
  -     * remove the given item 
  -     */
  -    public abstract void removeDeployedItem(String name) throws DeploymentException;
  -    
  -    /** 
  -     * remove the given item 
  -     */
  -    public abstract void removeDeployedItem(QName qname) throws DeploymentException;
  -    
  -    /** 
  -     * set the global configuration for the axis engine 
  +    public abstract void deploy(DeploymentDocument deployment)
  +        throws DeploymentException;
  +
  +    /**
  +     * deploy the given item
  +     * @param item XXX
  +     * @throws DeploymentException XXX
        */
  -    public abstract void setGlobalConfiguration(WSDDGlobalConfiguration global);
  -    
  +    public abstract void deployItem(DeployableItem item)
  +        throws DeploymentException;
  +
       /**
  +     * remove the given item
  +     * @param name XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public abstract void removeDeployedItem(String name)
  +        throws DeploymentException;
  +
  +    /**
  +     * remove the given item
  +     * @param qname XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public abstract void removeDeployedItem(QName qname)
  +        throws DeploymentException;
  +
  +    /**
  +     * set the global configuration for the axis engine
  +     * @param global XXX
  +     */
  +    public abstract void setGlobalConfiguration(
  +        WSDDGlobalConfiguration global);
  +
  +    /**
        * Save the registry to the given filepath
  +     * @param filename XXX
  +     * @throws IOException XXX
        */
  -    public void save(String filename) throws IOException {
  +    public void save(String filename)
  +        throws IOException
  +    {
           this.save(filename, this);
       }
  -    
  +
       /**
        * Save the registry to the given outputstream
  +     * @param out XXX
  +     * @throws IOException XXX
        */
  -    public void save(OutputStream out) throws IOException {
  +    public void save(OutputStream out)
  +        throws IOException
  +    {
           this.save(out, this);
       }
  -    
  +
       /**
        * Save the given registry to the given filepath
  -     */
  -    public static void save(String filename, DeploymentRegistry registry) throws IOException {
  +     * @param filename XXX
  +     * @param registry XXX
  +     * @throws IOException XXX
  +     */
  +    public static void save(String filename, DeploymentRegistry registry)
  +        throws IOException
  +    {
  +
           FileOutputStream fos = new FileOutputStream(filename);
  +
           save(fos, registry);
       }
  -    
  +
       /**
        * save the given registry to the given output stream
  -     */
  -    public static void save(OutputStream out, DeploymentRegistry registry) throws IOException {
  +     * @param out XXX
  +     * @param registry XXX
  +     * @throws IOException XXX
  +     */
  +    public static void save(OutputStream out, DeploymentRegistry registry)
  +        throws IOException
  +    {
  +
           ObjectOutputStream oos = new ObjectOutputStream(out);
  +
           oos.writeObject(registry);
           oos.close();
           out.close();
       }
  -    
  +
       /**
        * load a registry from the given filepath
  -     */
  -    public static DeploymentRegistry load(String filename) throws IOException {
  +     * @param filename XXX
  +     * @return XXX
  +     * @throws IOException XXX
  +     */
  +    public static DeploymentRegistry load(String filename)
  +        throws IOException
  +    {
  +
           FileInputStream fis = new FileInputStream(filename);
  +
           return load(fis);
       }
  -    
  +
       /**
        * load a registry from the given inputstream
  -     */
  -    public static DeploymentRegistry load(InputStream in) throws IOException {
  +     * @param in XXX
  +     * @return XXX
  +     * @throws IOException XXX
  +     */
  +    public static DeploymentRegistry load(InputStream in)
  +        throws IOException
  +    {
  +
           ObjectInputStream ois = new ObjectInputStream(in);
  +
           try {
  -            DeploymentRegistry registry = (DeploymentRegistry)ois.readObject();
  +            DeploymentRegistry registry =
  +                (DeploymentRegistry) ois.readObject();
  +
               return registry;
  -        } catch (java.lang.ClassNotFoundException cnfe) {
  +        }
  +        catch (java.lang.ClassNotFoundException cnfe) {
               throw new IOException(cnfe.toString());
  -        } finally {
  +        }
  +        finally {
               ois.close();
               in.close();
           }
       }
  -    
   }
  
  
  
  1.7       +106 -44   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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SimpleDeploymentManager.java	2001/10/03 15:30:03	1.6
  +++ SimpleDeploymentManager.java	2001/10/11 15:49:27	1.7
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,113 +54,175 @@
    */
   package org.apache.axis.deployment;
   
  -import org.apache.axis.Constants;
  +import java.util.Hashtable;
  +
  +import org.apache.axis.deployment.wsdd.*;
   import org.apache.axis.Handler;
  -import org.apache.axis.deployment.wsdd.WSDDGlobalConfiguration;
  -import org.apache.axis.encoding.SOAPTypeMappingRegistry;
  -import org.apache.axis.encoding.TypeMappingRegistry;
  +import org.apache.axis.Constants;
   import org.apache.axis.utils.QName;
  +import org.apache.axis.encoding.TypeMappingRegistry;
  +import org.apache.axis.encoding.SOAPTypeMappingRegistry;
   
  -import java.util.Hashtable;
   
   /**
    * This is a simple implementation of the DeploymentRegistry class
  - * 
  + *
    * @author James Snell
    */
  -public class SimpleDeploymentManager extends DeploymentRegistry { 
  -   
  +public class SimpleDeploymentManager
  +    extends DeploymentRegistry
  +{
  +
  +    /** XXX */
       WSDDGlobalConfiguration globalConfig;
  +
  +    /** XXX */
       Hashtable items;
  +
  +    /** XXX */
       Hashtable mappings;
  -    
  -    public SimpleDeploymentManager() {
  -        items = new Hashtable();
  +
  +    /**
  +     *
  +     */
  +    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
        */
  -    public void deploy(DeploymentDocument deployment) throws DeploymentException {
  +    public void deploy(DeploymentDocument deployment)
  +        throws DeploymentException
  +    {
           deployment.deploy(this);
       }
  -    
  +
       /**
        * return the global configuration
  +     * @return XXX
  +     * @throws DeploymentException XXX
        */
  -    public WSDDGlobalConfiguration getGlobalConfiguration() throws DeploymentException {
  +    public WSDDGlobalConfiguration getGlobalConfiguration()
  +        throws DeploymentException
  +    {
           return globalConfig;
       }
  -    
  +
       /**
        * Set the global configuration
  +     * @param global XXX
        */
  -    public void setGlobalConfiguration(WSDDGlobalConfiguration global) {
  +    public void setGlobalConfiguration(WSDDGlobalConfiguration global)
  +    {
           globalConfig = global;
       }
  -    
  +
       /**
        * Deploy the given WSDD Deployable Item
  +     * @param item XXX
  +     * @throws DeploymentException XXX
        */
  -    public void deployItem(DeployableItem item) throws DeploymentException {
  -      System.out.println("Deploying '" +item.getQName().toString()+"', "+item);
  +    public void deployItem(DeployableItem item)
  +        throws DeploymentException
  +    {
           items.put(item.getQName().toString(), item);
       }
   
       /**
        * Return an instance of the deployed item
  -     */
  -    public Handler getDeployedItem(QName qname) throws DeploymentException {
  +     * @param qname XXX
  +     * @return XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public Handler getDeployedItem(QName qname)
  +        throws DeploymentException
  +    {
           return getDeployedItem(qname.toString());
       }
  -    
  +
       /**
        * Return an instance of the deployed item
  -     */
  -    public Handler getDeployedItem(String name) throws DeploymentException {
  +     * @param name XXX
  +     * @return XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public Handler getDeployedItem(String name)
  +        throws DeploymentException
  +    {
  +
           try {
  -            DeployableItem item = (DeployableItem)items.get(name);
  +            DeployableItem item = (DeployableItem) items.get(name);
  +
               return item.newInstance(this);
  -        } catch (Exception e) {
  +        }
  +        catch (Exception e) {
               throw new DeploymentException(e.getMessage());
           }
       }
  -    
  -    /** 
  +
  +    /**
        * remove the given item
  +     * @param name XXX
  +     * @throws DeploymentException XXX
        */
  -    public void removeDeployedItem(String name) throws DeploymentException {
  +    public void removeDeployedItem(String name)
  +        throws DeploymentException
  +    {
           items.remove(name);
       }
  -    
  +
       /**
        * remove the given item
  +     * @param qname XXX
  +     * @throws DeploymentException XXX
        */
  -    public void removeDeployedItem(QName qname) throws DeploymentException {
  +    public void removeDeployedItem(QName qname)
  +        throws DeploymentException
  +    {
           removeDeployedItem(qname.toString());
       }
  -    
  +
       /**
        * return the named mapping registry
  -     */
  -    public TypeMappingRegistry getTypeMappingRegistry(String encodingStyle) throws DeploymentException {
  -        TypeMappingRegistry tmr = (TypeMappingRegistry)mappings.get(encodingStyle);
  +     * @param encodingStyle XXX
  +     * @return XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public TypeMappingRegistry getTypeMappingRegistry(String encodingStyle)
  +        throws DeploymentException
  +    {
  +
  +        TypeMappingRegistry tmr =
  +            (TypeMappingRegistry) mappings.get(encodingStyle);
  +
           return tmr;
       }
  -    
  +
       /**
        * adds a new mapping registry
  +     * @param encodingStyle XXX
  +     * @param tmr XXX
        */
  -    public void addTypeMappingRegistry(String encodingStyle, TypeMappingRegistry tmr) {
  +    public void addTypeMappingRegistry(String encodingStyle,
  +                                       TypeMappingRegistry tmr)
  +    {
           mappings.put(encodingStyle, tmr);
       }
  -    
  +
       /**
        * remove the named mapping registry
  +     * @param encodingStyle XXX
        */
  -    public void removeTypeMappingRegistry(String encodingStyle) {
  +    public void removeTypeMappingRegistry(String encodingStyle)
  +    {
           mappings.remove(encodingStyle);
       }
   }
  
  
  
  1.2       +1 -1      xml-axis/java/src/org/apache/axis/deployment/readme
  
  Index: readme
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/readme,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- readme	2001/05/05 09:03:31	1.1
  +++ readme	2001/10/11 15:49:27	1.2
  @@ -35,4 +35,4 @@
      based services to Axis from Microsoft SOAP Toolkit Beta 2
      without forcing the developers to convert their WSML files
      to WSDD.  (WSML is the Microsoft SOAP Toolkit equivalent
  -   to a deployment descriptor).
  \ No newline at end of file
  +   to a deployment descriptor).
  
  
  
  1.5       +5 -5      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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DeploymentDescriptor.java	2001/10/03 15:30:03	1.4
  +++ DeploymentDescriptor.java	2001/10/11 15:49:28	1.5
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -54,11 +54,11 @@
    */
   package org.apache.axis.deployment.v2dd;
   
  -import org.apache.axis.deployment.DeploymentDocument;
  -import org.apache.axis.deployment.DeploymentException;
  -import org.apache.axis.deployment.DeploymentRegistry;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
  +import org.apache.axis.deployment.DeploymentDocument;
  +import org.apache.axis.deployment.DeploymentRegistry;
  +import org.apache.axis.deployment.DeploymentException;
   
   /**
    * Apache SOAP v2.x Deployment Descriptor Support classes
  @@ -74,7 +74,7 @@
    * deployment files.  
    * 
    */
  -public class DeploymentDescriptor extends DeploymentDocument { 
  +public class DeploymentDescriptor implements DeploymentDocument { 
   
       protected Document d;
       protected V2DDService service;
  
  
  
  1.3       +1 -1      xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDConstants.java
  
  Index: V2DDConstants.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDConstants.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- V2DDConstants.java	2001/08/29 14:17:15	1.2
  +++ V2DDConstants.java	2001/10/11 15:49:28	1.3
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.6       +5 -9      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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- V2DDDeployableItem.java	2001/10/03 15:30:03	1.5
  +++ V2DDDeployableItem.java	2001/10/11 15:49:28	1.6
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -54,19 +54,15 @@
    */
   package org.apache.axis.deployment.v2dd;
   
  +import java.io.Serializable;
   import org.apache.axis.Handler;
   import org.apache.axis.SimpleTargetedChain;
  +import org.apache.axis.providers.*;
  +import org.apache.axis.providers.java.*;
  +import org.apache.axis.deployment.v2dd.providers.*;
   import org.apache.axis.deployment.DeployableItem;
   import org.apache.axis.deployment.DeploymentRegistry;
  -import org.apache.axis.deployment.v2dd.providers.V2DDComProvider;
  -import org.apache.axis.deployment.v2dd.providers.V2DDScriptProvider;
  -import org.apache.axis.providers.BSFProvider;
  -import org.apache.axis.providers.BasicProvider;
  -import org.apache.axis.providers.ComProvider;
  -import org.apache.axis.providers.java.RPCProvider;
   import org.apache.axis.utils.QName;
  -
  -import java.io.Serializable;
   
   /**
    * This is the class that actually bridges the gap between
  
  
  
  1.4       +2 -3      xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDElement.java
  
  Index: V2DDElement.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDElement.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- V2DDElement.java	2001/10/03 15:30:03	1.3
  +++ V2DDElement.java	2001/10/11 15:49:28	1.4
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -54,10 +54,9 @@
    */
   package org.apache.axis.deployment.v2dd;
   
  -import org.w3c.dom.Element;
  -
   import java.io.Serializable;
   import java.util.Hashtable;
  +import org.w3c.dom.Element;
   
   public class V2DDElement implements Serializable { 
       
  
  
  
  1.3       +2 -2      xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDException.java
  
  Index: V2DDException.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- V2DDException.java	2001/08/29 14:17:15	1.2
  +++ V2DDException.java	2001/10/11 15:49:28	1.3
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -56,7 +56,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.3       +1 -1      xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDFaultListener.java
  
  Index: V2DDFaultListener.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDFaultListener.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- V2DDFaultListener.java	2001/08/29 14:17:15	1.2
  +++ V2DDFaultListener.java	2001/10/11 15:49:28	1.3
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.4       +2 -2      xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDMap.java
  
  Index: V2DDMap.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDMap.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- V2DDMap.java	2001/10/03 15:30:03	1.3
  +++ V2DDMap.java	2001/10/11 15:49:28	1.4
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -54,8 +54,8 @@
    */
   package org.apache.axis.deployment.v2dd;
   
  -import org.apache.axis.utils.QName;
   import org.w3c.dom.Element;
  +import org.apache.axis.utils.QName;
   
   public class V2DDMap extends V2DDElement { 
   
  
  
  
  1.3       +1 -1      xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDMappings.java
  
  Index: V2DDMappings.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDMappings.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- V2DDMappings.java	2001/08/29 14:17:15	1.2
  +++ V2DDMappings.java	2001/10/11 15:49:28	1.3
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.3       +1 -1      xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDOption.java
  
  Index: V2DDOption.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDOption.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- V2DDOption.java	2001/08/29 14:17:15	1.2
  +++ V2DDOption.java	2001/10/11 15:49:28	1.3
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.6       +6 -9      xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDProvider.java
  
  Index: V2DDProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDProvider.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- V2DDProvider.java	2001/10/03 15:30:03	1.5
  +++ V2DDProvider.java	2001/10/11 15:49:28	1.6
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -54,16 +54,13 @@
    */
   package org.apache.axis.deployment.v2dd;
   
  -import org.apache.axis.deployment.v2dd.providers.V2DDComProvider;
  -import org.apache.axis.deployment.v2dd.providers.V2DDJavaProvider;
  -import org.apache.axis.deployment.v2dd.providers.V2DDScriptProvider;
  -import org.apache.axis.providers.BasicProvider;
  -import org.apache.axis.utils.LockableHashtable;
  +import java.util.StringTokenizer;
  +import java.util.Hashtable;
   import org.w3c.dom.Element;
   import org.w3c.dom.NodeList;
  -
  -import java.util.Hashtable;
  -import java.util.StringTokenizer;
  +import org.apache.axis.providers.BasicProvider;
  +import org.apache.axis.utils.LockableHashtable;
  +import org.apache.axis.deployment.v2dd.providers.*;
   
   public class V2DDProvider extends V2DDElement {
   
  
  
  
  1.4       +1 -1      xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDService.java
  
  Index: V2DDService.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/v2dd/V2DDService.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- V2DDService.java	2001/08/29 14:17:15	1.3
  +++ V2DDService.java	2001/10/11 15:49:28	1.4
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.6       +52 -10    xml-axis/java/src/org/apache/axis/deployment/v2dd/providers/V2DDComProvider.java
  
  Index: V2DDComProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/v2dd/providers/V2DDComProvider.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- V2DDComProvider.java	2001/10/03 15:30:03	1.5
  +++ V2DDComProvider.java	2001/10/11 15:49:28	1.6
  @@ -1,8 +1,23 @@
  +/*Copyright (c) 2001, Macromedia Inc. All Rights Reserved
  + *
  + *DO NOT DISTRIBUTE THIS SOFTWARE IN ANY WAY WITHOUT THE EXPRESS WRITTEN
  + *PERMISSION OF MACROMEDIA
  + */
  +/*Copyright (c) 2001, Macromedia Inc. All Rights Reserved
  + *
  + *DO NOT DISTRIBUTE THIS SOFTWARE IN ANY WAY WITHOUT THE EXPRESS WRITTEN
  + *PERMISSION OF MACROMEDIA
  + */
  +/*Copyright (c) 2001, Macromedia Inc. All Rights Reserved
  + *
  + *DO NOT DISTRIBUTE THIS SOFTWARE IN ANY WAY WITHOUT THE EXPRESS WRITTEN
  + *PERMISSION OF MACROMEDIA
  + */
   /*
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -54,29 +69,56 @@
    */
   package org.apache.axis.deployment.v2dd.providers;
   
  -import org.apache.axis.deployment.v2dd.V2DDOption;
  -import org.apache.axis.deployment.v2dd.V2DDProvider;
   import org.apache.axis.providers.BasicProvider;
  +import org.apache.axis.deployment.v2dd.V2DDProvider;
  +import org.apache.axis.deployment.v2dd.V2DDOption;
  +import org.apache.axis.deployment.v2dd.V2DDConstants;
   import org.apache.axis.providers.ComProvider;
  +
   import org.w3c.dom.Element;
  +import org.w3c.dom.NodeList;
   
  -public class V2DDComProvider extends V2DDProvider {
   
  -    public V2DDComProvider(Element e) {
  +/**
  + *
  + *@author Carl Woolf (woolf@macromedia.com)
  + */
  +public class V2DDComProvider
  +    extends V2DDProvider
  +{
  +
  +    /**
  +     *
  +     * @param e (Element) ??????????????????
  +     */
  +    public V2DDComProvider(Element e)
  +    {
           super(e);
       }
  -    
  -    public void newInstance(BasicProvider provider) {
  +
  +    /**
  +     *
  +     * @param provider ??????????????????
  +     */
  +    public void newInstance(BasicProvider provider)
  +    {
  +
           V2DDOption[] options = getOptions();
  +
           for (int n = 0; n < options.length; n++) {
               if (options[n].getKey().equals("progid")) {
  -                provider.addOption(ComProvider.OPTION_PROGID, options[n].getValue());
  +                provider.addOption(ComProvider.OPTION_PROGID,
  +                                   options[n].getValue());
               }
  +
               if (options[n].getKey().equals("threadingModel")) {
  -                provider.addOption(ComProvider.OPTION_THREADING_MODEL, options[n].getValue());
  +                provider.addOption(ComProvider.OPTION_THREADING_MODEL,
  +                                   options[n].getValue());
               }
  +
               if (options[n].getKey().equals("clsid")) {
  -                provider.addOption(ComProvider.OPTION_CLSID, options[n].getValue());
  +                provider.addOption(ComProvider.OPTION_CLSID,
  +                                   options[n].getValue());
               }
           }
       }
  
  
  
  1.6       +48 -11    xml-axis/java/src/org/apache/axis/deployment/v2dd/providers/V2DDJavaProvider.java
  
  Index: V2DDJavaProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/v2dd/providers/V2DDJavaProvider.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- V2DDJavaProvider.java	2001/10/03 15:30:03	1.5
  +++ V2DDJavaProvider.java	2001/10/11 15:49:28	1.6
  @@ -1,8 +1,23 @@
  +/*Copyright (c) 2001, Macromedia Inc. All Rights Reserved
  + *
  + *DO NOT DISTRIBUTE THIS SOFTWARE IN ANY WAY WITHOUT THE EXPRESS WRITTEN
  + *PERMISSION OF MACROMEDIA
  + */
  +/*Copyright (c) 2001, Macromedia Inc. All Rights Reserved
  + *
  + *DO NOT DISTRIBUTE THIS SOFTWARE IN ANY WAY WITHOUT THE EXPRESS WRITTEN
  + *PERMISSION OF MACROMEDIA
  + */
  +/*Copyright (c) 2001, Macromedia Inc. All Rights Reserved
  + *
  + *DO NOT DISTRIBUTE THIS SOFTWARE IN ANY WAY WITHOUT THE EXPRESS WRITTEN
  + *PERMISSION OF MACROMEDIA
  + */
   /*
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -54,25 +69,47 @@
    */
   package org.apache.axis.deployment.v2dd.providers;
   
  -import org.apache.axis.deployment.v2dd.V2DDConstants;
  -import org.apache.axis.deployment.v2dd.V2DDProvider;
   import org.apache.axis.providers.BasicProvider;
  +import org.apache.axis.deployment.v2dd.V2DDProvider;
  +import org.apache.axis.deployment.v2dd.V2DDConstants;
   import org.apache.axis.providers.java.JavaProvider;
  +
   import org.w3c.dom.Element;
   import org.w3c.dom.NodeList;
   
  -public class V2DDJavaProvider extends V2DDProvider {
  +
  +/**
  + *
  + *@author Carl Woolf (woolf@macromedia.com)
  + */
  +public class V2DDJavaProvider
  +    extends V2DDProvider
  +{
   
  -    public V2DDJavaProvider(Element e) {
  +    /**
  +     *
  +     * @param e (Element) ??????????????????
  +     */
  +    public V2DDJavaProvider(Element e)
  +    {
           super(e);
       }
  - 
  -    public void newInstance(BasicProvider provider) {
  -        NodeList nl = getElement().getElementsByTagNameNS(V2DDConstants.V2DD_NS, "java");
  -        Element java = (Element)nl.item(0);
  -        provider.addOption(JavaProvider.OPTION_CLASSNAME, java.getAttribute("class"));
  +
  +    /**
  +     *
  +     * @param provider ??????????????????
  +     */
  +    public void newInstance(BasicProvider provider)
  +    {
  +
  +        NodeList nl   =
  +            getElement().getElementsByTagNameNS(V2DDConstants.V2DD_NS,
  +                                                "java");
  +        Element  java = (Element) nl.item(0);
  +
  +        provider.addOption(JavaProvider.OPTION_CLASSNAME,
  +                           java.getAttribute("class"));
           provider.addOption(JavaProvider.OPTION_IS_STATIC,
                              new Boolean(java.getAttribute("isStatic")));
       }
  -    
   }
  
  
  
  1.6       +50 -12    xml-axis/java/src/org/apache/axis/deployment/v2dd/providers/V2DDScriptProvider.java
  
  Index: V2DDScriptProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/v2dd/providers/V2DDScriptProvider.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- V2DDScriptProvider.java	2001/10/03 15:30:03	1.5
  +++ V2DDScriptProvider.java	2001/10/11 15:49:28	1.6
  @@ -1,8 +1,23 @@
  +/*Copyright (c) 2001, Macromedia Inc. All Rights Reserved
  + *
  + *DO NOT DISTRIBUTE THIS SOFTWARE IN ANY WAY WITHOUT THE EXPRESS WRITTEN
  + *PERMISSION OF MACROMEDIA
  + */
  +/*Copyright (c) 2001, Macromedia Inc. All Rights Reserved
  + *
  + *DO NOT DISTRIBUTE THIS SOFTWARE IN ANY WAY WITHOUT THE EXPRESS WRITTEN
  + *PERMISSION OF MACROMEDIA
  + */
  +/*Copyright (c) 2001, Macromedia Inc. All Rights Reserved
  + *
  + *DO NOT DISTRIBUTE THIS SOFTWARE IN ANY WAY WITHOUT THE EXPRESS WRITTEN
  + *PERMISSION OF MACROMEDIA
  + */
   /*
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -54,25 +69,48 @@
    */
   package org.apache.axis.deployment.v2dd.providers;
   
  -import org.apache.axis.deployment.v2dd.V2DDConstants;
  +import org.apache.axis.providers.BasicProvider;
   import org.apache.axis.deployment.v2dd.V2DDProvider;
  +import org.apache.axis.deployment.v2dd.V2DDConstants;
   import org.apache.axis.providers.BSFProvider;
  -import org.apache.axis.providers.BasicProvider;
   import org.apache.axis.utils.XMLUtils;
  +
   import org.w3c.dom.Element;
   import org.w3c.dom.NodeList;
   
  -public class V2DDScriptProvider extends V2DDProvider {
  +
  +/**
  + *
  + *@author Carl Woolf (woolf@macromedia.com)
  + */
  +public class V2DDScriptProvider
  +    extends V2DDProvider
  +{
   
  -    public V2DDScriptProvider(Element e) {
  +    /**
  +     *
  +     * @param e (Element) ??????????????????
  +     */
  +    public V2DDScriptProvider(Element e)
  +    {
           super(e);
       }
  -  
  -    public void newInstance(BasicProvider provider) {
  -        NodeList nl = getElement().getElementsByTagNameNS(V2DDConstants.V2DD_NS, "script");
  -        Element script = (Element)nl.item(0);
  -        provider.addOption(BSFProvider.OPTION_LANGUAGE, script.getAttribute("language"));
  -        provider.addOption(BSFProvider.OPTION_SCRIPT, XMLUtils.getInnerXMLString(script));
  +
  +    /**
  +     *
  +     * @param provider ??????????????????
  +     */
  +    public void newInstance(BasicProvider provider)
  +    {
  +
  +        NodeList nl     =
  +            getElement().getElementsByTagNameNS(V2DDConstants.V2DD_NS,
  +                                                "script");
  +        Element  script = (Element) nl.item(0);
  +
  +        provider.addOption(BSFProvider.OPTION_LANGUAGE,
  +                           script.getAttribute("language"));
  +        provider.addOption(BSFProvider.OPTION_SCRIPT,
  +                           XMLUtils.getInnerXMLString(script));
       }
  -    
   }
  
  
  
  1.6       +106 -28   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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WSDDChain.java	2001/10/03 15:30:03	1.5
  +++ WSDDChain.java	2001/10/11 15:49:28	1.6
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,60 +54,138 @@
    */
   package org.apache.axis.deployment.wsdd;
   
  +import org.w3c.dom.Element;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
  +import org.w3c.dom.NodeList;
  +
   import org.apache.axis.Chain;
   import org.apache.axis.Handler;
  -import org.apache.axis.deployment.DeployableItem;
   import org.apache.axis.deployment.DeploymentRegistry;
  -import org.w3c.dom.Element;
  +import org.apache.axis.deployment.DeployableItem;
  +
   
   /**
    * WSDD chain element
  - * 
  - * @author James Snell
  + *
    */
  -public class WSDDChain extends WSDDHandler implements DeployableItem { 
  -    
  -    public WSDDChain(Element e) throws WSDDException { super(e, "chain"); }
  -    
  -    
  -    public WSDDHandler[] getHandlers() {
  +public class WSDDChain
  +    extends WSDDHandler
  +{
  +
  +    /**
  +     *
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDChain(Element e)
  +        throws WSDDException
  +    {
  +        super(e, "chain");
  +    }
  +
  +    /**
  +     *
  +     * @param d (Document) XXX
  +     * @param n (Node) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDChain(Document d, Node n)
  +        throws WSDDException
  +    {
  +        super(d, n, "chain");
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDHandler[] getHandlers()
  +    {
  +
           WSDDElement[] w = createArray("handler", WSDDHandler.class);
           WSDDHandler[] h = new WSDDHandler[w.length];
  -        System.arraycopy(w,0,h,0,w.length);
  +
  +        System.arraycopy(w, 0, h, 0, w.length);
  +
           return h;
       }
  -    
  -    
  -    public WSDDHandler getHandler(String name) {
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDHandler getHandler(String name)
  +    {
           WSDDHandler[] h = getHandlers();
  +
           for (int n = 0; n < h.length; n++) {
  -            if (h[n].getName().equals(name))
  +            if (h[n].getName().equals(name)) {
                   return h[n];
  +            }
           }
  +
           return null;
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDHandler createHandler()
  +    {
  +        return (WSDDHandler) createChild(WSDDHandler.class);
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeHandler(WSDDHandler victim)
  +    {
  +        removeChild(victim);
       }
  -    
  -    
  -    public String getType() {
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String getType()
  +    {
  +
           String type = super.getType();
  -        if (type.equals(""))
  +
  +        if (type.equals("")) {
               type = "java:org.apache.axis.SimpleChain";
  +        }
  +
           return type;
       }
  -    
  +
       /**
  -     * Creates a new instance of this Chain 
  +     * Creates a new instance of this Chain
  +     * @param registry XXX
  +     * @return XXX
  +     * @throws Exception XXX
        */
  -    public Handler newInstance(DeploymentRegistry registry) throws Exception {
  +    public Handler newInstance(DeploymentRegistry registry)
  +        throws Exception
  +    {
  +
           try {
  -            Handler h = super.newInstance(registry);
  -            Chain c = (Chain)h;
  +            Handler       h        = super.newInstance(registry);
  +            Chain         c        = (Chain) h;
               WSDDHandler[] handlers = getHandlers();
  +
               for (int n = 0; n < handlers.length; n++) {
                   c.addHandler(handlers[n].newInstance(registry));
               }
  +
               return c;
  -        } catch (Exception e) {
  +        }
  +        catch (Exception e) {
               return null;
           }
       }
  
  
  
  1.4       +23 -10    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WSDDConstants.java	2001/08/29 14:17:15	1.3
  +++ WSDDConstants.java	2001/10/11 15:49:28	1.4
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,11 +54,24 @@
    */
   package org.apache.axis.deployment.wsdd;
   
  -public class WSDDConstants { 
  -    
  -    public final static String WSDD_NS   = "http://xml.apache.org/axis/wsdd/";
  -    public final static String WSDD_JAVA = "http://xml.apache.org/axis/wsdd/providers/java";
  -    public final static String WSDD_COM  = "http://xml.apache.org/axis/wsdd/providers/com";
  -    public final static String WSDD_BSF  = "http://xml.apache.org/axis/wsdd/providers/bsf";
  +/**
  + *
  + */
  +public class WSDDConstants
  +{
  +
  +    /** XXX */
  +    public final static String WSDD_NS = "http://xml.apache.org/axis/wsdd/";
  +
  +    /** XXX */
  +    public final static String WSDD_JAVA =
  +        "http://xml.apache.org/axis/wsdd/providers/java";
  +
  +    /** XXX */
  +    public final static String WSDD_COM =
  +        "http://xml.apache.org/axis/wsdd/providers/com";
   
  +    /** XXX */
  +    public final static String WSDD_BSF =
  +        "http://xml.apache.org/axis/wsdd/providers/bsf";
   }
  
  
  
  1.6       +190 -34   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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WSDDDeployableItem.java	2001/10/03 15:30:03	1.5
  +++ WSDDDeployableItem.java	2001/10/11 15:49:28	1.6
  @@ -54,116 +54,272 @@
    */
   package org.apache.axis.deployment.wsdd;
   
  +import java.util.Enumeration;
  +
  +import org.w3c.dom.Element;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
  +
   import org.apache.axis.Handler;
  -import org.apache.axis.deployment.DeploymentRegistry;
   import org.apache.axis.utils.LockableHashtable;
  +import org.apache.axis.deployment.DeploymentRegistry;
  +import org.apache.axis.deployment.DeployableItem;
   import org.apache.axis.utils.QName;
  -import org.w3c.dom.Element;
  +
   
   /**
    * WSDD DeployableItem complexType
    *
  - * @author James Snell
    */
  -public abstract class WSDDDeployableItem extends WSDDElement {
  -
  +public abstract class WSDDDeployableItem
  +    extends WSDDElement
  +    implements DeployableItem
  +{
  +    /** XXX */
       LockableHashtable parms;
  +
  +    /** XXX */
       QName qname;
   
  -    public WSDDDeployableItem(Element e, String n) throws WSDDException {
  -        super(e,n);
  +    /**
  +     *
  +     * @param e (Element) XXX
  +     * @param n (String) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDDeployableItem(Element e, String n)
  +        throws WSDDException
  +    {
  +        super(e, n);
  +    }
  +
  +    /**
  +     *
  +     * @param d (Document) XXX
  +     * @param n (Node) XXX
  +     * @param s (String) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDDeployableItem(Document d, Node n, String s)
  +        throws WSDDException
  +    {
  +        super(d, n, s);
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String getName()
  +    {
  +        return getAttribute("name");
       }
   
  -    public String getName() {
  -        return getElement().getAttribute("name");
  +    /**
  +     *
  +     * @param name XXX
  +     */
  +    public void setName(String name)
  +    {
  +        setAttribute("name", name);
       }
   
  -    public QName getQName() {
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public QName getQName()
  +    {
           if (qname == null) {
  -            String nsURI = element.getOwnerDocument().getDocumentElement().getAttributeNS(org.apache.axis.Constants.URI_2000_SCHEMA_XSI, "targetNamespace");
  +            String nsURI =
  +                getElement().getOwnerDocument().getDocumentElement()
  +                    .getAttributeNS(org.apache.axis.Constants
  +                        .URI_2000_SCHEMA_XSI, "targetNamespace");
  +
               if (nsURI.equals("")) {
                   qname = new QName(null, getName());
  -            } else {
  +            }
  +            else {
                   qname = new QName(nsURI, getName());
               }
           }
  +
           return qname;
       }
   
  -    protected String getType() {
  -        return getElement().getAttribute("type");
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String getType()
  +    {
  +        return getAttribute("type");
       }
   
  +    /**
  +     *
  +     * @param type XXX
  +     */
  +    public void setType(String type) throws WSDDException
  +    {
  +        setAttribute("type", type);
  +    }
   
       /**
        * Returns the config parameters as a hashtable (lockable)
  +     * @return XXX
        */
  -    public LockableHashtable getParametersTable() {
  +    public LockableHashtable getParametersTable()
  +    {
           if (parms == null) {
               parms = new LockableHashtable();
  +
               WSDDParameter[] ps = getParameters();
  +
               for (int n = 0; n < ps.length; n++) {
  -                WSDDParameter p = (WSDDParameter)ps[n];
  -                //parms.put(p.getName(), p.getValue(), p.getLocked());
  +                WSDDParameter p = (WSDDParameter) ps[n];
  +
  +                // parms.put(p.getName(), p.getValue(), p.getLocked());
                   parms.put(p.getName(), "", p.getLocked());
               }
           }
  +
           return parms;
       }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDParameter[] getParameters()
  +    {
   
  -    public WSDDParameter[] getParameters() {
  -        WSDDElement[] e = createArray("parameter", WSDDParameter.class);
  +        WSDDElement[]   e = createArray("parameter", WSDDParameter.class);
           WSDDParameter[] p = new WSDDParameter[e.length];
  -        System.arraycopy(e,0,p,0,e.length);
  +
  +        System.arraycopy(e, 0, p, 0, e.length);
  +
  +        return p;
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDParameter createParameter(String name)
  +    {
  +        WSDDParameter p = (WSDDParameter) createChild(WSDDParameter.class);
  +
  +        p.setName(name);
  +
           return p;
       }
   
  -    public WSDDParameter getParameter(String name) {
  +    /**
  +     *
  +     * @param name XXX
  +     */
  +    public void removeParameter(String name)
  +    {
  +        WSDDParameter p = getParameter(name);
  +
  +        removeChild(p);
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDParameter getParameter(String name)
  +    {
           WSDDParameter[] e = getParameters();
  +
           for (int n = 0; n < e.length; n++) {
  -            if (e[n].getName().equals(name))
  +            if (e[n].getName().equals(name)) {
                   return e[n];
  +            }
           }
  +
           return null;
       }
   
  -    abstract Handler newInstance(DeploymentRegistry registry) throws Exception;
  +    /**
  +     *
  +     * @param registry XXX
  +     * @return XXX
  +     * @throws Exception XXX
  +     */
  +    abstract public Handler newInstance(DeploymentRegistry registry)
  +        throws Exception;
   
       /**
        * Creates a new instance of this deployable.  if the
        * java class is not found, the registry is queried to
        * find a suitable item
  +     * @param registry XXX
  +     * @return XXX
  +     * @throws Exception XXX
        */
  -    Handler makeNewInstance(DeploymentRegistry registry) throws Exception {
  +    Handler makeNewInstance(DeploymentRegistry registry)
  +        throws Exception
  +    {
           try {
  -            Class c = getTypeClass(getType());
  -            Handler h = (Handler)createInstance(c);
  +            Class   c = getTypeClass(getType());
  +            Handler h = (Handler) createInstance(c);
  +
               h.setOptions(getParametersTable());
  +
               return h;
  -        } catch (ClassNotFoundException e) {
  -            String type = getType();
  -            Handler h = registry.getDeployedItem(type);
  +        }
  +        catch (ClassNotFoundException e) {
  +            String  type = getType();
  +            Handler h    = registry.getDeployedItem(type);
  +
               if (h != null) {
                   WSDDParameter[] parms = getParameters();
  +
                   for (int n = 0; n < parms.length; n++) {
                       WSDDParameter parm = parms[n];
  +
                       h.addOption(parm.getName(), parm.getValue());
                   }
  +
                   return h;
               }
  +
               throw e;
  -        } catch (Exception e) {
  -              throw e;
           }
  +        catch (Exception e) {
  +            throw e;
  +        }
       }
   
  -    Object createInstance(Class _class) throws Exception {
  +    /**
  +     *
  +     * @param _class XXX
  +     * @return XXX
  +     * @throws Exception XXX
  +     */
  +    Object createInstance(Class _class)
  +        throws Exception
  +    {
           return _class.newInstance();
       }
   
  -    Class getTypeClass(String type) throws ClassNotFoundException {
  +    /**
  +     *
  +     * @param type XXX
  +     * @return XXX
  +     * @throws ClassNotFoundException XXX
  +     */
  +    Class getTypeClass(String type)
  +        throws ClassNotFoundException
  +    {
  +
           type = type.substring(type.indexOf(":") + 1);
  +
           return Class.forName(type);
       }
  -
   }
  
  
  
  1.4       +345 -58   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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WSDDDeployment.java	2001/08/29 14:17:15	1.3
  +++ WSDDDeployment.java	2001/10/11 15:49:28	1.4
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -55,110 +55,397 @@
   package org.apache.axis.deployment.wsdd;
   
   import org.w3c.dom.Element;
  +import org.w3c.dom.Node;
  +import org.w3c.dom.Document;
   
  +
   /**
    * WSDD deployment element
  - * 
  + *
    * @author James Snell
    */
  -public class WSDDDeployment extends WSDDElement { 
  -    
  -    public WSDDDeployment(Element e) throws WSDDException { super(e, "deployment"); }
  -    
  -    public String getName() {
  -        return getElement().getAttribute("name");
  -    }
  -    
  -    public String getTargetNamespace() {
  -        return getElement().getAttribute("targetNamespace");
  -    }
  -    
  -    public WSDDGlobalConfiguration getGlobalConfiguration() {
  -        WSDDElement[] e = createArray("globalConfiguration", WSDDGlobalConfiguration.class);
  -        WSDDGlobalConfiguration[] g = new WSDDGlobalConfiguration[e.length];
  -        System.arraycopy(e,0,g,0,e.length);
  -        if (g.length == 1) return g[0];
  -        return null;
  -    }
  -    
  -    public WSDDTypeMapping[] getTypeMappings() {
  -        WSDDElement[] e = createArray("typeMapping", WSDDTypeMapping.class);
  +public class WSDDDeployment
  +    extends WSDDElement
  +{
  +
  +    /**
  +     * Create an element in WSDD that wraps an extant DOM element
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDDeployment(Element e)
  +        throws WSDDException
  +    {
  +        super(e, "deployment");
  +    }
  +
  +    /**
  +     * Create a new element in DOM and wrap it in WSDD
  +     *     This ctor is different from those of similar classes in part
  +     *       because Deployment is the entry-node into the DOM Document
  +     * @param doc (Document) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDDeployment(Document doc)
  +        throws WSDDException
  +    {
  +        super(doc, doc, "deployment");
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String getName()
  +    {
  +        return getAttribute("name");
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     */
  +    public void setName(String name)
  +    {
  +        setAttribute("name", name);
  +    }
  +
  +    /**
  +     *
  +	 * Convenience method to return just the first one.
  +	 *
  +     * @return XXX
  +     */
  +    public WSDDGlobalConfiguration getGlobalConfiguration()
  +    {
  +
  +        WSDDElement[] e = createArray("globalConfiguration",
  +                                      WSDDGlobalConfiguration.class);
  +
  +        if (e.length == 0) {
  +            return null;
  +        }
  +
  +        return (WSDDGlobalConfiguration) e[0];
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDGlobalConfiguration[] getGlobalConfigurations()
  +    {
  +
  +        WSDDElement[]     e = createArray("globalConfiguration",
  +                                          WSDDGlobalConfiguration.class);
  +        WSDDGlobalConfiguration[] t = new WSDDGlobalConfiguration[e.length];
  +
  +        System.arraycopy(e, 0, t, 0, e.length);
  +
  +        return t;
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDGlobalConfiguration getGlobalConfiguration(String name)
  +    {
  +
  +        WSDDGlobalConfiguration[] t = getGlobalConfigurations();
  +
  +        for (int n = 0; n < t.length; n++) {
  +            if (t[n].getName().equals(name)) {
  +                return t[n];
  +            }
  +        }
  +
  +        return null;
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return the newly created / tree-ified item,
  +     *          so that the caller might mutate it
  +     */
  +    public WSDDGlobalConfiguration createGlobalConfiguration()
  +    {
  +        return (WSDDGlobalConfiguration) createChild(WSDDGlobalConfiguration.class);
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeGlobalConfiguration(WSDDGlobalConfiguration victim)
  +    {
  +        removeChild(victim);
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDTypeMapping[] getTypeMappings()
  +    {
  +
  +        WSDDElement[]     e = createArray("typeMapping",
  +                                          WSDDTypeMapping.class);
           WSDDTypeMapping[] t = new WSDDTypeMapping[e.length];
  -        System.arraycopy(e,0,t,0,e.length);
  +
  +        System.arraycopy(e, 0, t, 0, e.length);
  +
           return t;
       }
  -    
  -    public WSDDTypeMapping getTypeMapping(String name) {
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDTypeMapping getTypeMapping(String name)
  +    {
  +
           WSDDTypeMapping[] t = getTypeMappings();
  +
           for (int n = 0; n < t.length; n++) {
  -            if (t[n].getName().equals(name))
  +            if (t[n].getName().equals(name)) {
                   return t[n];
  +            }
           }
  +
           return null;
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDTypeMapping createTypeMapping()
  +    {
  +        return (WSDDTypeMapping) createChild(WSDDTypeMapping.class);
       }
  -    
  -    public WSDDChain[] getChains() {
  +
  +    /**
  +     *
  +     */
  +    public void removeTypeMapping(WSDDTypeMapping victim)
  +    {
  +        removeChild(victim);
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDChain[] getChains()
  +    {
  +
           WSDDElement[] e = createArray("chain", WSDDChain.class);
  -        WSDDChain[] c = new WSDDChain[e.length];
  -        System.arraycopy(e,0,c,0,e.length);
  +        WSDDChain[]   c = new WSDDChain[e.length];
  +
  +        System.arraycopy(e, 0, c, 0, e.length);
  +
           return c;
       }
  -    
  -    public WSDDChain getChain(String name) {
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDChain getChain(String name)
  +    {
  +
           WSDDChain[] c = getChains();
  +
           for (int n = 0; n < c.length; n++) {
  -            if (c[n].getName().equals(name))
  +            if (c[n].getName().equals(name)) {
                   return c[n];
  +            }
           }
  +
           return null;
       }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDChain createChain()
  +    {
  +        return (WSDDChain) createChild(WSDDChain.class);
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeChain(WSDDChain victim)
  +    {
  +        removeChild(victim);
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDHandler[] getHandlers()
  +    {
   
  -    public WSDDHandler[] getHandlers() {
           WSDDElement[] e = createArray("handler", WSDDHandler.class);
           WSDDHandler[] h = new WSDDHandler[e.length];
  -        System.arraycopy(e,0,h,0,e.length);
  +
  +        System.arraycopy(e, 0, h, 0, e.length);
  +
           return h;
       }
  -    
  -    public WSDDHandler getHandler(String name) {
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDHandler getHandler(String name)
  +    {
  +
           WSDDHandler[] h = getHandlers();
  +
           for (int n = 0; n < h.length; n++) {
  -            if (h[n].getName().equals(name))
  +            if (h[n].getName().equals(name)) {
                   return h[n];
  -        } 
  +            }
  +        }
  +
           return null;
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDHandler createHandler()
  +    {
  +        return (WSDDHandler) createChild(WSDDHandler.class);
       }
  -    
  -    public WSDDTransport[] getTransports() {
  -        WSDDElement[] e = createArray("transport", WSDDTransport.class);
  +
  +    /**
  +     *
  +     */
  +    public void removeHandler(WSDDHandler victim)
  +    {
  +        removeChild(victim);
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDTransport[] getTransports()
  +    {
  +
  +        WSDDElement[]   e = createArray("transport", WSDDTransport.class);
           WSDDTransport[] t = new WSDDTransport[e.length];
  -        System.arraycopy(e,0,t,0,e.length);
  +
  +        System.arraycopy(e, 0, t, 0, e.length);
  +
           return t;
       }
  -    
  -    public WSDDTransport getTransport(String name) {
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDTransport getTransport(String name)
  +    {
  +
           WSDDTransport[] t = getTransports();
  +
           for (int n = 0; n < t.length; n++) {
  -            if (t[n].getName().equals(name))
  +            if (t[n].getName().equals(name)) {
                   return t[n];
  -        } 
  +            }
  +        }
  +
           return null;
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDTransport createTransport()
  +    {
  +        return (WSDDTransport) createChild(WSDDTransport.class);
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeTransport(WSDDTransport victim)
  +    {
  +        removeChild(victim);
       }
  -    
  -    public WSDDService[] getServices() {
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDService[] getServices()
  +    {
  +
           WSDDElement[] e = createArray("service", WSDDService.class);
           WSDDService[] s = new WSDDService[e.length];
  -        System.arraycopy(e,0,s,0,e.length);
  +
  +        System.arraycopy(e, 0, s, 0, e.length);
  +
           return s;
       }
  -    
  -    public WSDDService getService(String name) {
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDService getService(String name)
  +    {
  +
           WSDDService[] s = getServices();
  +
           for (int n = 0; n < s.length; n++) {
  -            if (s[n].getName().equals(name))
  +            if (s[n].getName().equals(name)) {
                   return s[n];
  +            }
           }
  +
           return null;
  +    }
  +    /**
  +     *
  +     * @param name XXX
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDService createService()
  +    {
  +        return (WSDDService) createChild(WSDDService.class);
       }
  -    
  +
  +    /**
  +     *
  +     */
  +    public void removeService(WSDDService victim)
  +    {
  +        removeChild(victim);
  +    }
  +
   }
  
  
  
  1.6       +159 -52   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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WSDDDocument.java	2001/10/03 15:30:03	1.5
  +++ WSDDDocument.java	2001/10/11 15:49:28	1.6
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,95 +54,202 @@
    */
   package org.apache.axis.deployment.wsdd;
   
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Element;
  +
   import org.apache.axis.deployment.DeploymentDocument;
  -import org.apache.axis.deployment.DeploymentException;
   import org.apache.axis.deployment.DeploymentRegistry;
  -import org.apache.axis.encoding.DeserializerFactory;
  -import org.apache.axis.encoding.Serializer;
  +import org.apache.axis.deployment.DeploymentException;
   import org.apache.axis.encoding.TypeMappingRegistry;
  -import org.w3c.dom.Document;
  -import org.w3c.dom.Element;
  +import org.apache.axis.encoding.Serializer;
  +import org.apache.axis.encoding.DeserializerFactory;
  +import org.apache.axis.utils.*;
   
   /**
    * represents a WSDD Document (this is the top level object in this object model)
    */
  -public class WSDDDocument extends DeploymentDocument { 
  -   
  -    protected Document d;
  -    protected WSDDDeployment dep;
  -    
  -    public WSDDDocument() {}
  -    
  -    public WSDDDocument(Document doc) {
  +public class WSDDDocument
  +    implements DeploymentDocument
  +{
  +
  +    /** XXX */
  +    private Document d;
  +
  +    /** XXX */
  +    private WSDDDeployment dep;
  +
  +    /**
  +     *
  +     */
  +    public WSDDDocument()
  +    {
  +    }
  +
  +    /**
  +     *
  +     * @param doc (Document) XXX
  +     */
  +    public WSDDDocument(Document doc)
  +    {
           d = doc;
       }
  -    
  -    public WSDDDocument(Element e) {
  +
  +    /**
  +     *
  +     * @param e (Element) XXX
  +     */
  +    public WSDDDocument(Element e)
  +    {
           d = e.getOwnerDocument();
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDDeployment getDeployment()
  +    {
  +        getDocument();
  +
  +        if (null == dep) {
  +            try {
  +                Element deploymentElement = d.getDocumentElement();
  +
  +                if (null == deploymentElement) {
  +                    // create both the DOM and WSDD deployment 'child'
  +                    dep = new WSDDDeployment(d);
  +                }
  +                else {
  +                    // create the WSDD 'child' from the given DOM deployment
  +                    dep = new WSDDDeployment(deploymentElement);
  +                }
  +            }
  +            catch (Exception e) {
  +                e.printStackTrace();
  +
  +                // log the stack trace?
  +                //
  +                // leave dep as null
  +            }
  +        }
  +
  +        return dep;
       }
  -    
  -    public Document getDocument() {
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public Document getDocument()
  +    {
  +        if (null == d) {
  +            d = XMLUtils.newDocument();
  +        }
  +
           return d;
       }
  -    
  -    public WSDDDeployment getDeployment() throws WSDDException {
  -        if (dep == null) {
  -            dep = new WSDDDeployment(d.getDocumentElement());
  +
  +    /**
  +     *
  +     * @param document XXX
  +     */
  +    public void setDocument(Document document)
  +    {
  +        d = document;
  +
  +        dep = null;
  +    }
  +
  +    /**
  +     * Remove both the DOM and WSDD deployment
  +     */
  +    public void removeDeployment()
  +    {
  +        if (null == dep) {
  +            return;
           }
  -        return dep;
  +
  +        Element e = dep.getElement();
  +
  +        e.getParentNode().removeChild(e);
  +
  +        dep = null;
       }
  -    
  -    public void deploy(DeploymentRegistry registry) throws DeploymentException {
  +
  +    /**
  +     *
  +     * @param registry XXX
  +     * @throws DeploymentException XXX
  +     */
  +    public void deploy(DeploymentRegistry registry)
  +        throws DeploymentException
  +    {
  +        getDeployment();
  +
           WSDDGlobalConfiguration global = dep.getGlobalConfiguration();
  +
           if (global != null) {
               registry.setGlobalConfiguration(global);
           }
  -        
  -        WSDDHandler[] handlers = dep.getHandlers();
  -        WSDDChain[] chains = dep.getChains();
  -        WSDDTransport[] transports = dep.getTransports();
  -        WSDDService[] services = dep.getServices();
  -        WSDDTypeMapping[] mappings = dep.getTypeMappings();
  -        
  +
  +        WSDDHandler[]     handlers   = dep.getHandlers();
  +        WSDDChain[]       chains     = dep.getChains();
  +        WSDDTransport[]   transports = dep.getTransports();
  +        WSDDService[]     services   = dep.getServices();
  +        WSDDTypeMapping[] mappings   = dep.getTypeMappings();
  +
           for (int n = 0; n < handlers.length; n++) {
               registry.deployItem(handlers[n]);
           }
  +
           for (int n = 0; n < chains.length; n++) {
               registry.deployItem(chains[n]);
           }
  +
           for (int n = 0; n < transports.length; n++) {
               registry.deployItem(transports[n]);
           }
  +
           for (int n = 0; n < services.length; n++) {
               registry.deployItem(services[n]);
           }
  -        
  +
           for (int n = 0; n < mappings.length; n++) {
  -            WSDDTypeMapping mapping = mappings[n];
  -            TypeMappingRegistry tmr = registry.getTypeMappingRegistry(mapping.getEncodingStyle());
  +            WSDDTypeMapping     mapping = mappings[n];
  +            TypeMappingRegistry tmr     =
  +                registry.getTypeMappingRegistry(mapping.getEncodingStyle());
  +
               if (tmr == null) {
                   tmr = new TypeMappingRegistry();
  -                registry.addTypeMappingRegistry(mapping.getEncodingStyle(), tmr);
  +
  +                registry.addTypeMappingRegistry(mapping.getEncodingStyle(),
  +                                                tmr);
               }
   
  -            Serializer ser = null;
  +            Serializer          ser   = null;
               DeserializerFactory deser = null;
  -            
  +
               try {
  -                ser = (Serializer)mapping.getSerializer().newInstance();
  -                deser = (DeserializerFactory)mapping.getDeserializer().newInstance();
  -            } catch (Exception e) {}
  -            
  +                ser   = (Serializer) mapping.getSerializer().newInstance();
  +                deser =
  +                    (DeserializerFactory) mapping.getDeserializer()
  +                        .newInstance();
  +            }
  +            catch (Exception e) {
  +            }
  +
               try {
  -                if (ser != null)
  +                if (ser != null) {
                       tmr.addSerializer(mapping.getLanguageSpecificType(),
  -                                    mapping.getQName(), ser);
  -            
  -                if (deser != null)
  -                    tmr.addDeserializerFactory(mapping.getQName(),
  -                                               mapping.getLanguageSpecificType(),
  -                                               deser);
  -            } catch (Exception e) {
  +                                      mapping.getQName(), ser);
  +                }
  +
  +                if (deser != null) {
  +                    tmr.addDeserializerFactory(mapping.getQName(), mapping
  +                        .getLanguageSpecificType(), deser);
  +                }
  +            }
  +            catch (Exception e) {
                   throw new DeploymentException(e.getMessage());
               }
           }
  
  
  
  1.4       +403 -47   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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WSDDElement.java	2001/08/29 14:17:15	1.3
  +++ WSDDElement.java	2001/10/11 15:49:28	1.4
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,88 +54,444 @@
    */
   package org.apache.axis.deployment.wsdd;
   
  +import org.apache.axis.utils.XMLUtils;
  +
   import java.io.Serializable;
  -import java.util.Hashtable; 
  +import java.io.*; // for temporary resident 'serializeXmlString'
  +
  +
  +import java.util.Hashtable;
   import java.util.Vector;
  +
   import org.w3c.dom.Element;
   import org.w3c.dom.NodeList;
  +import org.w3c.dom.Node;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.NamedNodeMap;
  +import org.w3c.dom.Attr;
  +
   
   /**
    * abstract class extended by all WSDD Element classes
    */
  -public abstract class WSDDElement implements Serializable {
  -    
  -    protected Element element;
  -    protected Hashtable children; 
  - 
  -    public WSDDElement(Element e, String name) throws WSDDException {
  -        if (!e.getNamespaceURI().equals(WSDDConstants.WSDD_NS) ||
  -            !e.getLocalName().equals(name))
  -            throw new WSDDException("Invalid WSDD Element");
  +public abstract class WSDDElement
  +    implements Serializable
  +{
  +
  +    /** XXX */
  +    private Element element;
  +
  +    /** XXX */
  +    private Hashtable children;
  +
  +    /**
  +     * Create a new element in DOM and wrap it in WSDD
  +     * @param doc (Document) XXX
  +     * @param parent (Node) XXX
  +     * @param name (String) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDElement(Document doc, Node parent, String name)
  +        throws WSDDException
  +    {
  +
  +        element = doc.createElementNS(WSDDConstants.WSDD_NS, name);
  +
  +        validateCandidateElement(element, name);
  +        parent.appendChild(element);
  +    }
  +
  +    /**
  +     * Create an element in WSDD that wraps an extant DOM element
  +     * @param e (Element) XXX
  +     * @param name (String) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDElement(Element e, String name)
  +        throws WSDDException
  +    {
  +
  +        validateCandidateElement(e, name);
  +
           element = e;
       }
  -    
  -    public Element getElement() {
  +
  +    /**
  +     *
  +     * @param e XXX
  +     * @param name XXX
  +     * @throws WSDDException XXX
  +     */
  +    private static void validateCandidateElement(Element e, String name)
  +        throws WSDDException
  +    {
  +
  +        if ((null == e) || (null == e.getNamespaceURI())
  +                || (null == e.getLocalName())
  +                ||!e.getNamespaceURI().equals(WSDDConstants.WSDD_NS)
  +                ||!e.getLocalName().equals(name)) {
  +            throw new WSDDException("Invalid WSDD Element");
  +        }
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public Element getElement()
  +    {
           return element;
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String elementToString()
  +    {
  +        return org.apache.axis.utils.XMLUtils.ElementToString(element);
  +    }
  +
  +    /**
  +     *
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDDocumentation createDocumentation()
  +    {
  +        removeDocumentation();
  +
  +        WSDDElement c = createChild(WSDDDocumentation.class);
  +
  +        return (WSDDDocumentation) c;
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeDocumentation()
  +    {
  +        removeChild(getDocumentation());
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDDocumentation getDocumentation()
  +    {
  +
  +        WSDDElement[] e = createArray("documentation",
  +                                      WSDDDocumentation.class);
  +
  +        if (e.length == 0) {
  +            return null;
  +        }
  +
  +        return (WSDDDocumentation) e[0];
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public String getAttribute(String name)
  +    {
  +        return element.getAttribute(name);
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @param value XXX
  +     */
  +    public void setAttribute(String name, String value)
  +    {
  +
  +        try {
  +            element.setAttribute(name, value);
  +        }
  +        catch (Exception e) {
  +
  +            // fail stoically
  +        }
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     */
  +    public void removeAttribute(String name)
  +    {
  +
  +        try {
  +            element.removeAttribute(name);
  +        }
  +        catch (Exception e) {
  +
  +            // fail stoically
  +        }
       }
  -    
  -    void addChild(Element e, WSDDElement w) {
  -        if (children == null) children = new Hashtable();
  -        children.put(e, w);
  -    }
  -    
  -    WSDDElement getChild(Element e) {
  -        if (children == null) return null;
  -        return (WSDDElement)children.get(e);
  -    }
  -    
  -    boolean hasChild(Element e) {
  -        if (children == null) return false;
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public String getAttributeNS(String nameSpaceUri, String localName)
  +    {
  +        return element.getAttributeNS(nameSpaceUri, localName);
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @param value XXX
  +     */
  +    public void setAttributeNS(String nameSpaceUri,
  +								String prefix,
  +								String localName,
  +								String value)
  +    {
  +		String usePrefix;
  +		String oldPrefix;
  +		String oldNsUri;
  +
  +		// generate a prefix if it is absent
  +		if (null == prefix || prefix.equals(""))
  +		{
  +			usePrefix = XMLUtils.getNewPrefix(element.getOwnerDocument(),
  +								nameSpaceUri);
  +		}
  +		else
  +		{
  +			oldPrefix = XMLUtils.getPrefix(nameSpaceUri, element);
  +
  +			// always use 'xmlns' as it is a special-case
  +			if (prefix.equals("xmlns"))
  +			{
  +				usePrefix = prefix;
  +			}
  +			// if no pre-existing one for this nsUri, then use the supplied prefix
  +			//   unless that prefix maps to some (other) nsUri
  +			else if (null == oldPrefix && null == XMLUtils.getNamespace(prefix, element))
  +			{
  +				usePrefix = prefix;
  +			}
  +			// duh. use the supplied prefix if this nsUri already had this one
  +			else if (null != oldPrefix && oldPrefix.equals(prefix))
  +			{
  +				usePrefix = prefix;
  +			}
  +			else
  +			{
  +				usePrefix = XMLUtils.getNewPrefix(element.getOwnerDocument(),
  +							nameSpaceUri);
  +			}
  +		}
  +
  +        try
  +		{
  +			/*********
  +			System.out.println("About to saNS with " +
  +					nameSpaceUri + " " +
  +					usePrefix + ":" + localName + " "+
  +					value);
  +					*********/
  +            element.setAttributeNS(nameSpaceUri, usePrefix + ":" + localName,
  +								value);
  +        }
  +        catch (Exception e)
  +		{
  +			// What to do here?
  +            e.printStackTrace();
  +        }
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     */
  +    public void removeAttributeNS(String nameSpace, String localName)
  +    {
  +
  +        try {
  +            element.removeAttributeNS(nameSpace, localName);
  +        }
  +        catch (Exception e) {
  +
  +            // fail stoically
  +        }
  +    }
  +
  +    /**
  +     * Remove element from DOM and its wrapper from WSDD
  +     * @param w XXX
  +     */
  +    public void removeChild(WSDDElement w)
  +    {
  +
  +        if (null == w) {
  +            return;
  +        }
  +
  +        Element e = w.getElement();
  +
  +        if ((null == e) || (null == children)) {
  +            return;
  +        }
  +
  +        children.remove(e);
  +        e.getParentNode().removeChild(e);
  +    }
  +
  +    /**
  +     *
  +     * @param ww XXX
  +     */
  +    public void removeChildren(WSDDElement[] ww)
  +    {
  +
  +        for (int i = 0; i < ww.length; i++) {
  +            removeChild(ww[i]);
  +        }
  +    }
  +
  +    /**
  +     * Insert element at this node in the DOM and in WSDD
  +     * @param type XXX
  +     * @return XXX
  +     */
  +    public WSDDElement createChild(Class type)
  +    {
  +
  +        try {
  +            Class[]     cc = { Document.class, Node.class };
  +            Object[]    oo = { element.getOwnerDocument(), element };
  +            WSDDElement w  =
  +                (WSDDElement) type.getConstructor(cc).newInstance(oo);
  +
  +            addChild(w);
  +
  +            return w;
  +        }
  +        catch (Exception e) {
  +			e.printStackTrace();
  +            return null;
  +        }
  +    }
  +
  +    /**
  +     * Insert extant WSDD element at this node of the WSDD
  +     * @param w XXX
  +     */
  +    protected void addChild(WSDDElement w)
  +    {
  +
  +        if (children == null) {
  +            children = new Hashtable();
  +        }
  +
  +        children.put(w.getElement(), w);
  +    }
  +
  +    /**
  +     *
  +     * @param e XXX
  +     * @return XXX
  +     */
  +    protected WSDDElement getChild(Element e)
  +    {
  +
  +        if (children == null) {
  +            return null;
  +        }
  +
  +        return (WSDDElement) children.get(e);
  +    }
  +
  +    /**
  +     *
  +     * @param e XXX
  +     * @return XXX
  +     */
  +    protected boolean hasChild(Element e)
  +    {
  +
  +        if (children == null) {
  +            return false;
  +        }
  +
           return children.containsKey(e);
       }
  -    
  +
       /**
        * Used to create an array of child elements of a particular type
  +     * @param name XXX
  +     * @param type XXX
  +     * @return XXX
        */
  -    WSDDElement[] createArray(String name, Class type) {
  -        String[] names = {name};
  -        Class[] types = {type};
  -        return createArray(names,types);
  +    WSDDElement[] createArray(String name, Class type)
  +    {
  +
  +        String[] names = { name };
  +        Class[]  types = { type };
  +
  +        return createArray(names, types);
       }
   
       /**
        * Used to create an array of child elements of a particular type
  +     *     NB: Result-array could possibly become stale, eg if its elements
  +     *          are removed from DOM or WSDD trees
  +     * @param names XXX
  +     * @param types XXX
  +     * @return XXX
        */
  -    WSDDElement[] createArray(String[] names, Class[] types) {
  +    WSDDElement[] createArray(String[] names, Class[] types)
  +    {
  +
           try {
               NodeList nl = element.getChildNodes();
  -            Vector v = new Vector();
  +            Vector   v  = new Vector();
  +
               for (int n = 0; n < nl.getLength(); n++) {
                   if (nl.item(n).getNodeType() == Element.ELEMENT_NODE) {
  -                    Element e = (Element)nl.item(n);
  +                    Element e = (Element) nl.item(n);
  +
                       if (e.getNamespaceURI().equals(WSDDConstants.WSDD_NS)) {
                           for (int i = 0; i < names.length; i++) {
                               if (e.getLocalName().equals(names[i])) {
                                   if (hasChild(e)) {
                                       v.addElement(getChild(e));
  -                                } else {
  -                                    Class[] c = {Element.class};
  -                                    Object[] o = {e};
  +                                }
  +                                else {
  +                                    Class[]     c = { Element.class };
  +                                    Object[]    o = { e };
                                       WSDDElement w = null;
  -                                    w = (WSDDElement)types[i].getConstructor(c).newInstance(o);
  -                                    addChild(e,w);
  +
  +                                    w = (WSDDElement) types[i]
  +                                        .getConstructor(c).newInstance(o);
  +
  +                                    addChild(w);
                                       v.addElement(w);
  -                                }   
  +                                }
                               }
                           }
  -                    }                    
  +                    }
                   }
               }
  -            Object[] obj = v.toArray();
  +
  +            Object[]      obj = v.toArray();
               WSDDElement[] ret = new WSDDElement[obj.length];
  -            System.arraycopy(obj,0,ret,0,obj.length);
  +
  +            System.arraycopy(obj, 0, ret, 0, obj.length);
  +
               return ret;
  -        } catch (Exception e) { return null; }
  +        }
  +        catch (Exception e) {
  +            return null;
  +        }
       }
  -    
   }
  
  
  
  1.4       +35 -8     xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDException.java
  
  Index: WSDDException.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDException.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WSDDException.java	2001/08/29 14:17:15	1.3
  +++ WSDDException.java	2001/10/11 15:49:28	1.4
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -56,10 +56,37 @@
   
   import org.apache.axis.deployment.DeploymentException;
   
  -public class WSDDException extends DeploymentException {  
  -    public WSDDException() { super(); }
  -    public WSDDException(String msg) { super(msg); }
  -    public WSDDException(Exception e) {
  +
  +/**
  + *
  + */
  +public class WSDDException
  +    extends DeploymentException
  +{
  +
  +    /**
  +     *
  +     */
  +    public WSDDException()
  +    {
  +        super();
  +    }
  +
  +    /**
  +     *
  +     * @param msg (String) XXX
  +     */
  +    public WSDDException(String msg)
  +    {
  +        super(msg);
  +    }
  +
  +    /**
  +     *
  +     * @param e (Exception) XXX
  +     */
  +    public WSDDException(Exception e)
  +    {
           super(e.getMessage());
       }
   }
  
  
  
  1.3       +34 -7     xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDFaultFlow.java
  
  Index: WSDDFaultFlow.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDFaultFlow.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WSDDFaultFlow.java	2001/08/29 14:17:15	1.2
  +++ WSDDFaultFlow.java	2001/10/11 15:49:28	1.3
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -55,9 +55,36 @@
   package org.apache.axis.deployment.wsdd;
   
   import org.w3c.dom.Element;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
   
  -public class WSDDFaultFlow extends WSDDFlow { 
  -    
  -    public WSDDFaultFlow(Element e) throws WSDDException { super(e, "faultFlow"); }
  -    
  +
  +/**
  + *
  + */
  +public class WSDDFaultFlow
  +    extends WSDDFlow
  +{
  +    /**
  +     *
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDFaultFlow(Element e)
  +        throws WSDDException
  +    {
  +        super(e, "faultFlow");
  +    }
  +
  +    /**
  +     *
  +     * @param d (Document) XXX
  +     * @param n (Node) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDFaultFlow(Document d, Node n)
  +        throws WSDDException
  +    {
  +        super(d, n, "faultFlow");
  +    }
   }
  
  
  
  1.6       +128 -29   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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WSDDFlow.java	2001/10/03 15:30:03	1.5
  +++ WSDDFlow.java	2001/10/11 15:49:28	1.6
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,55 +54,154 @@
    */
   package org.apache.axis.deployment.wsdd;
   
  -import org.apache.axis.Chain;
  +import org.w3c.dom.Element;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
  +
   import org.apache.axis.Handler;
  +import org.apache.axis.Chain;
   import org.apache.axis.deployment.DeploymentRegistry;
  -import org.w3c.dom.Element;
   
  +
   /**
    * WSDD Flow complexType
  - * 
  - * @author James Snell
  + *
    */
  -public abstract class WSDDFlow extends WSDDDeployableItem { 
  -    
  -    public WSDDFlow(Element e, String n) throws WSDDException {super(e,n);}
  -    
  -    public WSDDHandler[] getHandlers() {
  -        String[] names = {"handler", "chain"};
  -        Class[] types = {WSDDHandler.class, WSDDChain.class};
  -        WSDDElement[] e = createArray(names, types);
  -        WSDDHandler[] h = new WSDDHandler[e.length];
  -        System.arraycopy(e,0,h,0,e.length);
  +public abstract class WSDDFlow
  +    extends WSDDDeployableItem
  +{
  +
  +    /**
  +     *
  +     * @param e (Element) XXX
  +     * @param n (String) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDFlow(Element e, String n)
  +        throws WSDDException
  +    {
  +        super(e, n);
  +    }
  +
  +    /**
  +     *
  +     * @param d (Document) XXX
  +     * @param n (Node) XXX
  +     * @param subClass (String) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDFlow(Document d, Node n, String subClass)
  +        throws WSDDException
  +    {
  +        super(d, n, subClass);
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDHandler[] getHandlers()
  +    {
  +
  +        String[]      names = { "handler", "chain" };
  +        Class[]       types = { WSDDHandler.class, WSDDChain.class };
  +        WSDDElement[] e     = createArray(names, types);
  +        WSDDHandler[] h     = new WSDDHandler[e.length];
  +
  +        System.arraycopy(e, 0, h, 0, e.length);
  +
           return h;
       }
  -    
  -    public WSDDHandler getHandler(String name) {
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDHandler getHandler(String name)
  +    {
  +
           WSDDHandler[] h = getHandlers();
  +
           for (int n = 0; n < h.length; n++) {
  -            if (h[n].getName().equals(name))
  +            if (h[n].getName().equals(name)) {
                   return h[n];
  -        } 
  +            }
  +        }
  +
           return null;
  +    }
  +
  +    /**
  +     * A Chain is a Handler, so most of the Handler methods below
  +	 *  suffice. But this one gets the ball (of Chain) rolling...
  +	 *
  +     * @param name XXX
  +     * @return the newly created / tree-ified item,
  +     *          so that the caller might mutate it
  +     */
  +    public WSDDChain createChain()
  +    {
  +        return (WSDDChain) createChild(WSDDChain.class);
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return the newly created / tree-ified item,
  +     *          so that the caller might mutate it
  +     */
  +    public WSDDHandler createHandler()
  +    {
  +        return (WSDDHandler) createChild(WSDDHandler.class);
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeHandler(WSDDHandler victim)
  +    {
  +        removeChild(victim);
       }
  -    
  -    public String getType() {
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String getType()
  +    {
  +
           String type = super.getType();
  -        if (type.equals(""))
  +
  +        if (type.equals("")) {
               type = "java:org.apache.axis.SimpleChain";
  +        }
  +
           return type;
       }
  -   
  -    public Handler newInstance(DeploymentRegistry registry) throws Exception {
  +
  +    /**
  +     *
  +     * @param registry XXX
  +     * @return XXX
  +     * @throws Exception XXX
  +     */
  +    public Handler newInstance(DeploymentRegistry registry)
  +        throws Exception
  +    {
  +
           try {
  -            Handler h = super.makeNewInstance(registry);
  -            Chain c = (Chain)h;
  +            Handler       h        = super.makeNewInstance(registry);
  +            Chain         c        = (Chain) h;
               WSDDHandler[] handlers = getHandlers();
  +
               for (int n = 0; n < handlers.length; n++) {
                   c.addHandler(handlers[n].newInstance(registry));
               }
  +
               return c;
  -        } catch (Exception e) {
  +        }
  +        catch (Exception e) {
               return null;
           }
       }
  
  
  
  1.4       +275 -49   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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WSDDGlobalConfiguration.java	2001/08/29 14:17:15	1.3
  +++ WSDDGlobalConfiguration.java	2001/10/11 15:49:28	1.4
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,99 +54,325 @@
    */
   package org.apache.axis.deployment.wsdd;
   
  -import org.w3c.dom.Element; 
  +import org.w3c.dom.Element;
   import org.w3c.dom.NodeList;
  +import org.w3c.dom.Document;
   import org.w3c.dom.Node;
  +
   import org.apache.axis.Handler;
   import org.apache.axis.deployment.DeploymentRegistry;
   
  +
   /**
    * Represents the global configuration of the Axis engine.
  - * 
  + *
    * @author James Snell
    */
  -public class WSDDGlobalConfiguration extends WSDDDeployableItem { 
  -    
  -    public WSDDGlobalConfiguration(Element e) throws WSDDException {super(e, "globalConfiguration");}
  +public class WSDDGlobalConfiguration
  +    extends WSDDDeployableItem
  +{
  +
  +    /**
  +     *
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDGlobalConfiguration(Element e)
  +        throws WSDDException
  +    {
  +        super(e, "globalConfiguration");
  +    }
   
  -    public WSDDTransport[] getTransports() {
  -        WSDDElement[] e = createArray("transport", WSDDTransport.class);
  +    /**
  +     *
  +     * @param d (Document) XXX
  +     * @param n (Node) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDGlobalConfiguration(Document d, Node n)
  +        throws WSDDException
  +    {
  +        super(d, n, "globalConfiguration");
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDTransport[] getTransports()
  +    {
  +
  +        WSDDElement[]   e = createArray("transport", WSDDTransport.class);
           WSDDTransport[] t = new WSDDTransport[e.length];
  -        System.arraycopy(e,0,t,0,e.length);
  +
  +        System.arraycopy(e, 0, t, 0, e.length);
  +
           return t;
       }
  -    
  -    public WSDDTransport getTransport(String name) {
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDTransport getTransport(String name)
  +    {
  +
           WSDDTransport[] t = getTransports();
  +
           for (int n = 0; n < t.length; n++) {
  -            if (t[n].getName().equals(name))
  +            if (t[n].getName().equals(name)) {
                   return t[n];
  -        } 
  +            }
  +        }
  +
           return null;
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDTransport createTransport()
  +    {
  +        return (WSDDTransport) createChild(WSDDTransport.class);
       }
  -    
  -    public WSDDRequestFlow getRequestFlow() {
  +
  +    /**
  +     *
  +     */
  +    public void removeTransport(WSDDTransport victim)
  +    {
  +        removeChild(victim);
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDRequestFlow getRequestFlow()
  +    {
  +
           WSDDElement[] e = createArray("requestFlow", WSDDRequestFlow.class);
  +
           if (e.length != 0) {
  -            return (WSDDRequestFlow)e[0];
  +            return (WSDDRequestFlow) e[0];
           }
  +
           return null;
  +    }
  +
  +    /**
  +     *
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDRequestFlow createRequestFlow()
  +    {
  +        removeRequestFlow();
  +
  +        return (WSDDRequestFlow) createChild(WSDDRequestFlow.class);
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeRequestFlow()
  +    {
  +        removeChild(getRequestFlow());
       }
  -    
  -    public WSDDProvider getProvider() throws Exception {
  -        NodeList nl = element.getElementsByTagNameNS(WSDDConstants.WSDD_NS, "provider");
  -        Element e = (Element)nl.item(0);
  -        Node ex = null;
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDProvider getProvider()
  +    {
  +
  +        NodeList nl =
  +            getElement().getElementsByTagNameNS(WSDDConstants.WSDD_NS,
  +                                                "provider");
  +        Element  e  = (Element) nl.item(0);
  +        Node     ex = null;
  +
           ex = e.getFirstChild();
  +
           while (ex != null) {
  -            if (ex.getNodeType() == Element.ELEMENT_NODE)
  -                if (ex.getLocalName().equals("provider")) break;
  +            if (ex.getNodeType() == Element.ELEMENT_NODE) {
  +                if (ex.getLocalName().equals("provider")) {
  +                    break;
  +                }
  +            }
  +
               ex = ex.getNextSibling();
           }
  +
           if (ex == null) {
               return null;
  -        } else {
  +        }
  +        else {
               if (hasChild(e)) {
  -                return (WSDDProvider)getChild(e);
  -            } else {
  -                String exuri = ex.getNamespaceURI();
  -                Class c = WSDDProvider.getProviderClass(exuri);
  -                Class[] cs = {Element.class};
  -                Object[] p = {e};
  -                WSDDElement w = (WSDDElement)c.getConstructor(cs).newInstance(p);
  -                addChild(e,w);
  -                return (WSDDProvider)w;
  +                return (WSDDProvider) getChild(e);
               }
  +            else {
  +				try
  +				{
  +	                String      exuri = ex.getNamespaceURI();
  +	                Class       c     = WSDDProvider.getProviderClass(exuri);
  +	                Class[]     cs    = { Element.class };
  +	                Object[]    p     = { e };
  +	                WSDDElement w     =
  +	                    (WSDDElement) c.getConstructor(cs).newInstance(p);
  +
  +	                addChild(w);
  +
  +	                return (WSDDProvider) w;
  +				}
  +				catch (Exception exception)
  +				{
  +					return null;
  +				}
  +            }
           }
  +    }
  +
  +    /**
  +     *
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDProvider createProvider(Class providerSubclass)
  +    {
  +        removeProvider();
  +
  +        return (WSDDProvider) createChild(providerSubclass);
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeProvider()
  +    {
  +        removeChild(getProvider());
       }
  -    
  -    public WSDDResponseFlow getResponseFlow() {
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDResponseFlow getResponseFlow()
  +    {
  +
           WSDDElement[] e = createArray("responseFlow", WSDDResponseFlow.class);
  +
           if (e.length != 0) {
  -            return (WSDDResponseFlow)e[0];
  +            return (WSDDResponseFlow) e[0];
           }
  +
           return null;
  +    }
  +
  +    /**
  +     *
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDResponseFlow createResponseFlow()
  +    {
  +        removeResponseFlow();
  +
  +        return (WSDDResponseFlow) createChild(WSDDResponseFlow.class);
       }
  -    
  -    public WSDDFaultFlow[] getFaultFlows() {
  -        WSDDElement[] e = createArray("faultFlow", WSDDFaultFlow.class);
  +
  +    /**
  +     *
  +     */
  +    public void removeResponseFlow()
  +    {
  +        removeChild(getResponseFlow());
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDFaultFlow[] getFaultFlows()
  +    {
  +
  +        WSDDElement[]   e = createArray("faultFlow", WSDDFaultFlow.class);
           WSDDFaultFlow[] t = new WSDDFaultFlow[e.length];
  -        System.arraycopy(e,0,t,0,e.length);
  +
  +        System.arraycopy(e, 0, t, 0, e.length);
  +
           return t;
       }
  -    
  -    public WSDDFaultFlow getFaultFlow(String name) {
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDFaultFlow getFaultFlow(String name)
  +    {
  +
           WSDDFaultFlow[] t = getFaultFlows();
  +
           for (int n = 0; n < t.length; n++) {
  -            if (t[n].getName().equals(name))
  +            if (t[n].getName().equals(name)) {
                   return t[n];
  -        } 
  +            }
  +        }
  +
  +        return null;
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDFaultFlow createFaultFlow()
  +    {
  +        return (WSDDFaultFlow) createChild(WSDDFaultFlow.class);
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeFaultFlow(WSDDFaultFlow victim)
  +    {
  +        removeChild(victim);
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String getType()
  +    {
           return null;
  -    }    
  +    }
  +
  +    /**
  +     *
  +     * @param type XXX
  +     */
  +    public void setType(String type) throws WSDDException
  +    {
  +        throw new WSDDException("GlobalConfiguration disallows setting of Type");
  +    }
   
  -    Handler newInstance(DeploymentRegistry registry) {
  +    /**
  +     *
  +     * @param registry XXX
  +     * @return XXX
  +     */
  +    public Handler newInstance(DeploymentRegistry registry)
  +    {
           return null;
       }
  -    
   }
   
  
  
  
  1.4       +70 -14    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WSDDHandler.java	2001/08/29 14:17:15	1.3
  +++ WSDDHandler.java	2001/10/11 15:49:28	1.4
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,22 +54,78 @@
    */
   package org.apache.axis.deployment.wsdd;
   
  -import org.w3c.dom.Element; 
  +import org.w3c.dom.Element;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
  +
   import org.apache.axis.Handler;
   import org.apache.axis.deployment.DeploymentRegistry;
   import org.apache.axis.deployment.DeployableItem;
  +
  +
  +/**
  + *
  + */
  +public class WSDDHandler
  +    extends WSDDDeployableItem
  +{
  +    /**
  +     *
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDHandler(Element e)
  +        throws WSDDException
  +    {
  +        super(e, "handler");
  +    }
   
  -public class WSDDHandler extends WSDDDeployableItem implements DeployableItem { 
  -    
  -    public WSDDHandler(Element e) throws WSDDException { super(e, "handler"); }
  -    public WSDDHandler(Element e, String n) throws WSDDException { super(e,n);}
  -    
  -    public String getType() {
  -        return super.getType();
  +    /**
  +     *
  +     * @param d (Document) XXX
  +     * @param n (Node) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDHandler(Document d, Node n)
  +        throws WSDDException
  +    {
  +        super(d, n, "handler");
       }
  -    
  -    public Handler newInstance(DeploymentRegistry registry) throws Exception {
  +
  +    /**
  +     *
  +     * @param d (Document) XXX
  +     * @param n (Node) XXX
  +     * @param subClass (String) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDHandler(Document d, Node n, String subClass)
  +        throws WSDDException
  +    {
  +        super(d, n, subClass);
  +    }
  +
  +    /**
  +     *
  +     * @param e (Element) XXX
  +     * @param n (String) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDHandler(Element e, String n)
  +        throws WSDDException
  +    {
  +        super(e, n);
  +    }
  +
  +    /**
  +     *
  +     * @param registry XXX
  +     * @return XXX
  +     * @throws Exception XXX
  +     */
  +    public Handler newInstance(DeploymentRegistry registry)
  +        throws Exception
  +    {
           return makeNewInstance(registry);
       }
  -    
   }
  
  
  
  1.4       +73 -16    xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDOperation.java
  
  Index: WSDDOperation.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDOperation.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WSDDOperation.java	2001/08/29 14:17:16	1.3
  +++ WSDDOperation.java	2001/10/11 15:49:28	1.4
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,19 +54,76 @@
    */
   package org.apache.axis.deployment.wsdd;
   
  -import org.w3c.dom.Element; 
  +import org.w3c.dom.Element;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
  +
   import org.apache.axis.utils.QName;
  +
  +
  +/**
  + *
  + */
  +public class WSDDOperation
  +    extends WSDDElement
  +{
  +
  +    /**
  +     *
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDOperation(Element e)
  +        throws WSDDException
  +    {
  +        super(e, "operation");
  +    }
  +
  +    /**
  +     *
  +     * @param d (Document) XXX
  +     * @param n (Node) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDOperation(Document d, Node n)
  +        throws WSDDException
  +    {
  +        super(d, n, "operation");
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String getName()
  +    {
  +        return getAttribute("name");
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     */
  +    public void setName(String name)
  +    {
  +        setAttribute("name", name);
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public QName getQName()
  +    {
  +        return new QName(getAttribute("qName"), getElement());
  +    }
   
  -public class WSDDOperation extends WSDDElement { 
  -    
  -    public WSDDOperation(Element e) throws WSDDException { super(e, "operation"); }
  -    
  -    public String getName() {
  -        return getElement().getAttribute("name");
  -    }
  -    
  -    public QName getQName() {
  -        return new QName(getElement().getAttribute("qName"), getElement());
  +    /**
  +     *
  +     * @param name XXX
  +     */
  +    public void setQName(QName name)
  +    {
  +        setAttribute("qName", name.toString());
       }
  -    
   }
  
  
  
  1.5       +97 -23    xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDParameter.java
  
  Index: WSDDParameter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDParameter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WSDDParameter.java	2001/10/03 15:30:03	1.4
  +++ WSDDParameter.java	2001/10/11 15:49:28	1.5
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,26 +54,100 @@
    */
   package org.apache.axis.deployment.wsdd;
   
  -import org.apache.axis.utils.XMLUtils;
   import org.w3c.dom.Element;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
  +
  +import org.apache.axis.utils.XMLUtils;
  +
  +
  +/**
  + *
  + */
  +public class WSDDParameter
  +    extends WSDDElement
  +{
  +
  +    /**
  +     *
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDParameter(Element e)
  +        throws WSDDException
  +    {
  +        super(e, "parameter");
  +    }
  +
  +    /**
  +     *
  +     * @param d (Document) XXX
  +     * @param n (Node) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDParameter(Document d, Node n)
  +        throws WSDDException
  +    {
  +        super(d, n, "parameter");
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String getName()
  +    {
  +        return getAttribute("name");
  +    }
  +
  +    /**
  +     *
  +     * @param newName XXX
  +     */
  +    public void setName(String newName)
  +    {
  +        setAttribute("name", newName);
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String getValue()
  +    {
  +        return getAttribute("value");
  +    }
  +
  +    /**
  +     *
  +     * @param newValue XXX
  +     */
  +    public void setValue(String newValue)
  +    {
  +        setAttribute("value", newValue);
  +    }
  +	
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public boolean getLocked()
  +    {
  +
  +        String locked = getAttribute("locked");
  +
  +        return ((locked != null) && locked.equals("true"));
  +    }
  +
  +    /**
  +     *
  +     * @param locked XXX
  +     */
  +    public void setLocked(boolean locked)
  +    {
   
  -public class WSDDParameter extends WSDDElement { 
  -    
  -    public WSDDParameter(Element e) throws WSDDException { super(e, "parameter"); }
  -    
  -    public String getName() {
  -        return getElement().getAttribute("name");
  -    }
  -    
  -    public boolean getLocked() {
  -        return getElement().getAttribute("locked").equals("true");
  -    }
  -    
  -    public String getValue() {
  -        Element e = getElement();
  -        String value;
  -        if (!(value = e.getAttribute("value")).equals("")) return value;
  -        return XMLUtils.getInnerXMLString(e);
  +        setAttribute("locked", (locked
  +                                ? "true"
  +                                : "false"));
       }
  -    
   }
  
  
  
  1.3       +171 -33   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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WSDDProvider.java	2001/08/29 14:17:16	1.2
  +++ WSDDProvider.java	2001/10/11 15:49:28	1.3
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,70 +54,208 @@
    */
   package org.apache.axis.deployment.wsdd;
   
  -import org.w3c.dom.Element; 
  +import org.w3c.dom.Element;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
  +
   import org.apache.axis.Handler;
   import org.apache.axis.utils.QName;
   import org.apache.axis.deployment.wsdd.providers.*;
  +
   import java.util.Hashtable;
  +
   import org.apache.axis.deployment.DeploymentRegistry;
   
  +
   /**
    * WSDD provider element
  - * 
  + *
    * Represents the liason to the application being exposed
  - * as a Web Service.  
  - * 
  - * Specific provider extension classes must be registered 
  + * as a Web Service.
  + *
  + * Specific provider extension classes must be registered
    * by namespace URI.
  - * 
  + *
    * @author James Snell
    */
  -public abstract class WSDDProvider extends WSDDDeployableItem { 
  -    
  +public abstract class WSDDProvider
  +    extends WSDDDeployableItem
  +{
  +
   // ** STATIC PROVIDER REGISTRY ** //
  +
  +    /** XXX */
       private static Hashtable providers = new Hashtable();
  +
       static {
           providers.put(WSDDConstants.WSDD_JAVA, WSDDJavaProvider.class);
           providers.put(WSDDConstants.WSDD_COM, WSDDComProvider.class);
           providers.put(WSDDConstants.WSDD_BSF, WSDDBsfProvider.class);
       }
  -    public static void registerProvider(String uri, Class _class) {
  +
  +    /**
  +     *
  +     * @param uri XXX
  +     * @param _class XXX
  +     */
  +    public static void registerProvider(String uri, Class _class)
  +    {
           providers.put(uri, _class);
       }
  -    public static Class getProviderClass(String uri) {
  -        return (Class)providers.get(uri);
  +
  +    /**
  +     *
  +     * @param uri XXX
  +     * @return XXX
  +     */
  +    public static Class getProviderClass(String uri)
  +    {
  +        return (Class) providers.get(uri);
       }
  -    public static boolean hasProviderClass(String uri) {
  +
  +    /**
  +     *
  +     * @param uri XXX
  +     * @return XXX
  +     */
  +    public static boolean hasProviderClass(String uri)
  +    {
           return providers.containsKey(uri);
       }
  +
   ////////////////////////////////////
  -    
  -    public WSDDProvider(Element e) throws WSDDException { super(e, "provider"); }
  -    
  -    public WSDDOperation[] getOperations() {
  -        WSDDElement[] e = createArray("operation", WSDDOperation.class);
  +
  +    /**
  +     * Wrap an extant DOM element in WSDD
  +	 *
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDProvider(Element e)
  +        throws WSDDException
  +    {
  +        super(e, "provider");
  +    }
  +
  +    /**
  +     *
  +     * Create a new DOM element and wrap in WSDD
  +     *
  +     * @param d (Document) XXX
  +     * @param n (Node) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDProvider(Document d, Node n)
  +        throws WSDDException
  +    {
  +        super(d, n, "provider");
  +    }
  +
  +    abstract protected Element getProviderElement()
  +    	throws WSDDException;
  +
  +	/**
  +	 *
  +	 * @param name XXX
  +	 * @return XXX
  +	 */
  +	public String getProviderAttribute(String name)
  +		throws WSDDException
  +	{
  +		Element element = getProviderElement();
  +
  +	    return element.getAttribute(name);
  +	}
  +
  +	/**
  +	 *
  +	 * @param name XXX
  +	 * @param value XXX
  +	 */
  +	public void setProviderAttribute(String name, String value)
  +		throws WSDDException
  +	{
  +		Element element = getProviderElement();
  +
  +	    try {
  +	        element.setAttribute(name, value);
  +	    }
  +	    catch (Exception e) {
  +
  +	        throw new WSDDException(e);
  +	    }
  +	}
  +
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDOperation[] getOperations()
  +    {
  +        WSDDElement[]   e = createArray("operation", WSDDOperation.class);
           WSDDOperation[] t = new WSDDOperation[e.length];
  -        System.arraycopy(e,0,t,0,e.length);
  +
  +        System.arraycopy(e, 0, t, 0, e.length);
  +
           return t;
       }
  -    
  -    public WSDDOperation getOperation(String name) {
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDOperation getOperation(String name)
  +    {
           WSDDOperation[] t = getOperations();
  +
           for (int n = 0; n < t.length; n++) {
  -            if (t[n].getName().equals(name))
  +            if (t[n].getName().equals(name)) {
                   return t[n];
  -        } 
  +            }
  +        }
  +
           return null;
       }
  -    
  -    public String getType() {
  -        return super.getType();
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDOperation createOperation()
  +    {
  +        return (WSDDOperation) createChild(WSDDOperation.class);
       }
  -    
  -    public Handler newInstance(DeploymentRegistry registry) throws Exception {
  +
  +    /**
  +     *
  +     */
  +    public void removeOperation(WSDDOperation victim)
  +    {
  +        removeChild(victim);
  +    }
  +
  +    /**
  +     *
  +     * @param registry XXX
  +     * @return XXX
  +     * @throws Exception XXX
  +     */
  +    public Handler newInstance(DeploymentRegistry registry)
  +        throws Exception
  +    {
           return newProviderInstance(registry);
       }
  -    
  -    public abstract Handler newProviderInstance(DeploymentRegistry registry) throws Exception;
  -    
  +
  +    /**
  +     *
  +     * @param registry XXX
  +     * @return XXX
  +     * @throws Exception XXX
  +     */
  +    public abstract Handler newProviderInstance(DeploymentRegistry registry)
  +        throws Exception;
   }
  
  
  
  1.3       +37 -8     xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDRequestFlow.java
  
  Index: WSDDRequestFlow.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDRequestFlow.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WSDDRequestFlow.java	2001/08/29 14:17:16	1.2
  +++ WSDDRequestFlow.java	2001/10/11 15:49:28	1.3
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -55,9 +55,38 @@
   package org.apache.axis.deployment.wsdd;
   
   import org.w3c.dom.Element;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
   
  -public class WSDDRequestFlow extends WSDDFlow { 
  -    
  -    public WSDDRequestFlow(Element e) throws WSDDException { super(e, "requestFlow"); }
  -    
  +
  +/**
  + *
  + */
  +public class WSDDRequestFlow
  +    extends WSDDFlow
  +{
  +
  +    /**
  +     *
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDRequestFlow(Element e)
  +        throws WSDDException
  +    {
  +        super(e, "requestFlow");
  +    }
  +	
  +    /**
  +     *
  +     * @param d (Document) XXX
  +     * @param n (Node) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDRequestFlow(Document d, Node n)
  +        throws WSDDException
  +    {
  +        super(d, n, "requestFlow");
  +    }
  +
   }
  
  
  
  1.3       +36 -7     xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDResponseFlow.java
  
  Index: WSDDResponseFlow.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDResponseFlow.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WSDDResponseFlow.java	2001/08/29 14:17:16	1.2
  +++ WSDDResponseFlow.java	2001/10/11 15:49:28	1.3
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -55,9 +55,38 @@
   package org.apache.axis.deployment.wsdd;
   
   import org.w3c.dom.Element;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
   
  -public class WSDDResponseFlow extends WSDDFlow { 
  -    
  -    public WSDDResponseFlow(Element e) throws WSDDException { super(e, "responseFlow"); }
  -    
  +
  +/**
  + *
  + */
  +public class WSDDResponseFlow
  +    extends WSDDFlow
  +{
  +
  +    /**
  +     *
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDResponseFlow(Element e)
  +        throws WSDDException
  +    {
  +        super(e, "responseFlow");
  +    }
  +
  +    /**
  +     *
  +     * @param d (Document) XXX
  +     * @param n (Node) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDResponseFlow(Document d, Node n)
  +        throws WSDDException
  +    {
  +        super(d, n, "responseFlow");
  +    }
  +
   }
  
  
  
  1.8       +312 -67   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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WSDDService.java	2001/10/03 15:30:03	1.7
  +++ WSDDService.java	2001/10/11 15:49:28	1.8
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,128 +54,373 @@
    */
   package org.apache.axis.deployment.wsdd;
   
  +import java.net.URL;
  +
  +import org.w3c.dom.Element;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
  +import org.w3c.dom.NodeList;
  +
   import org.apache.axis.Handler;
  +import org.apache.axis.Chain;
   import org.apache.axis.TargetedChain;
  -import org.apache.axis.deployment.DeployableItem;
   import org.apache.axis.deployment.DeploymentRegistry;
  +import org.apache.axis.deployment.DeployableItem;
   import org.apache.axis.description.ServiceDescription;
  -import org.w3c.dom.Element;
  -import org.w3c.dom.Node;
  -import org.w3c.dom.NodeList;
  +
  +
  +/**
  + *
  + */
  +public class WSDDService
  +    extends WSDDDeployableItem
  +{
  +    /**
  +     *
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDService(Element e)
  +        throws WSDDException
  +    {
  +        super(e, "service");
  +    }
   
  -public class WSDDService extends WSDDDeployableItem implements DeployableItem { 
  -    
  -    public WSDDService(Element e) throws WSDDException { super(e, "service"); }
  -   
  -    public String getType() {
  +    /**
  +     *
  +     * @param d (Document) XXX
  +     * @param n (Node) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDService(Document d, Node n)
  +        throws WSDDException
  +    {
  +        super(d, n, "service");
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String getType()
  +    {
           String type = super.getType();
  -        if (type.equals(""))
  +
  +        if (type.equals("")) {
               type = "java:org.apache.axis.SimpleTargetedChain";
  +        }
  +
           return type;
       }
  -    
  -    public String getServiceDescriptionURL() {
  -        return getElement().getAttribute("description");
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String getServiceDescriptionURL()
  +    {
  +        return getAttribute("description");
  +    }
  +
  +    /**
  +     *
  +     * @param sdUrl XXX
  +     */
  +    public void setServiceDescriptionURL(String sdUrl)
  +    {
  +        setAttribute("description", sdUrl);
       }
  -    
  +
       /**
  -     * Eventually need to fill this in with the code to 
  +     * Eventually need to fill this in with the code to
        * actually return the Service Description object
  +     * @return XXX
        */
  -    public ServiceDescription getServiceDescription() {
  +    public ServiceDescription getServiceDescription()
  +    {
  +		// Nothing here yet
           return null;
       }
  -    
  -    public WSDDTypeMapping[] getTypeMappings() {
  -        WSDDElement[] e = createArray("typeMapping", WSDDTypeMapping.class);
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDTypeMapping[] getTypeMappings()
  +    {
  +        WSDDElement[]     e = createArray("typeMapping",
  +                                          WSDDTypeMapping.class);
           WSDDTypeMapping[] t = new WSDDTypeMapping[e.length];
  -        System.arraycopy(e,0,t,0,e.length);
  +
  +        System.arraycopy(e, 0, t, 0, e.length);
  +
           return t;
       }
  -    
  -    public WSDDTypeMapping getTypeMapping(String name) {
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDTypeMapping getTypeMapping(String name)
  +    {
           WSDDTypeMapping[] t = getTypeMappings();
  +
           for (int n = 0; n < t.length; n++) {
  -            if (t[n].getName().equals(name))
  +            if (t[n].getName().equals(name)) {
                   return t[n];
  +            }
           }
  +
           return null;
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDTypeMapping createTypeMapping()
  +    {
  +        return (WSDDTypeMapping) createChild(WSDDTypeMapping.class);
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeTypeMapping(WSDDTypeMapping victim)
  +    {
  +        removeChild(victim);
       }
  -    
  -    public WSDDRequestFlow getRequestFlow() {
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDRequestFlow getRequestFlow()
  +    {
           WSDDElement[] e = createArray("requestFlow", WSDDRequestFlow.class);
  +
           if (e.length != 0) {
  -            return (WSDDRequestFlow)e[0];
  +            return (WSDDRequestFlow) e[0];
           }
  +
           return null;
       }
  -    
  -    public WSDDProvider getProvider() throws Exception {
  -        NodeList nl = element.getElementsByTagNameNS(WSDDConstants.WSDD_NS, "provider");
  -        Element e = (Element)nl.item(0);
  -        Node ex = null;
  +
  +    /**
  +     *
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDRequestFlow createRequestFlow()
  +    {
  +        removeRequestFlow();
  +
  +        return (WSDDRequestFlow) createChild(WSDDRequestFlow.class);
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeRequestFlow()
  +    {
  +        removeChild(getRequestFlow());
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDProvider getProvider()
  +    {
  +        NodeList nl =
  +            getElement().getElementsByTagNameNS(WSDDConstants.WSDD_NS,
  +                                                "provider");
  +        Element  e  = (Element) nl.item(0);
  +
  +		if (null == e) return null;
  +
  +        Node     ex = null;
  +
           ex = e.getFirstChild();
  +
           while (ex != null) {
  -            if (ex.getNodeType() == Element.ELEMENT_NODE)
  -                if (ex.getLocalName().equals("provider")) break;
  +            if (ex.getNodeType() == Element.ELEMENT_NODE) {
  +                if (ex.getLocalName().equals("provider")) {
  +                    break;
  +                }
  +            }
  +
               ex = ex.getNextSibling();
           }
  +
           if (ex == null) {
               return null;
  -        } else {
  +        }
  +        else {
               if (hasChild(e)) {
  -                return (WSDDProvider)getChild(e);
  -            } else {
  -                String exuri = ex.getNamespaceURI();
  -                Class c = WSDDProvider.getProviderClass(exuri);
  -                Class[] cs = {Element.class};
  -                Object[] p = {e};
  -                WSDDElement w = (WSDDElement)c.getConstructor(cs).newInstance(p);
  -                addChild(e,w);
  -                return (WSDDProvider)w;
  +                return (WSDDProvider) getChild(e);
  +            }
  +            else {
  +				try
  +				{
  +	                String      exuri = ex.getNamespaceURI();
  +	                Class       c     = WSDDProvider.getProviderClass(exuri);
  +	                Class[]     cs    = { Element.class };
  +	                Object[]    p     = { e };
  +	                WSDDElement w     =
  +	                    (WSDDElement) c.getConstructor(cs).newInstance(p);
  +
  +	                addChild(w);
  +
  +	                return (WSDDProvider) w;
  +				}
  +				catch (Exception exception)
  +				{
  +					return null;
  +				}
               }
           }
  +    }
  +
  +    /**
  +     *
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDProvider createProvider(Class providerSubclass)
  +    {
  +        removeProvider();
  +
  +        return (WSDDProvider) createChild(providerSubclass);
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeProvider()
  +    {
  +        removeChild(getProvider());
       }
  -    
  -    public WSDDResponseFlow getResponseFlow() {
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDResponseFlow getResponseFlow()
  +    {
           WSDDElement[] e = createArray("responseFlow", WSDDResponseFlow.class);
  +
           if (e.length != 0) {
  -            return (WSDDResponseFlow)e[0];
  +            return (WSDDResponseFlow) e[0];
           }
  +
           return null;
  +    }
  +
  +    /**
  +     *
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDResponseFlow createResponseFlow()
  +    {
  +        removeResponseFlow();
  +
  +        return (WSDDResponseFlow) createChild(WSDDResponseFlow.class);
       }
  -    
  -    public WSDDFaultFlow[] getFaultFlows() {
  -        WSDDElement[] e = createArray("faultFlow", WSDDFaultFlow.class);
  +
  +    /**
  +     *
  +     */
  +    public void removeResponseFlow()
  +    {
  +        removeChild(getResponseFlow());
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDFaultFlow[] getFaultFlows()
  +    {
  +        WSDDElement[]   e = createArray("faultFlow", WSDDFaultFlow.class);
           WSDDFaultFlow[] t = new WSDDFaultFlow[e.length];
  -        System.arraycopy(e,0,t,0,e.length);
  +
  +        System.arraycopy(e, 0, t, 0, e.length);
  +
           return t;
       }
  -    
  -    public WSDDFaultFlow getFaultFlow(String name) {
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDFaultFlow getFaultFlow(String name)
  +    {
           WSDDFaultFlow[] t = getFaultFlows();
  +
           for (int n = 0; n < t.length; n++) {
  -            if (t[n].getName().equals(name))
  +            if (t[n].getName().equals(name)) {
                   return t[n];
  -        } 
  +            }
  +        }
  +
           return null;
       }
  -   
  -    public Handler newInstance(DeploymentRegistry registry) throws Exception {
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDFaultFlow createFaultFlow()
  +    {
  +        return (WSDDFaultFlow) createChild(WSDDFaultFlow.class);
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeFaultFlow(WSDDFaultFlow victim)
  +    {
  +        removeChild(victim);
  +    }
  +
  +    /**
  +     *
  +     * @param registry XXX
  +     * @return XXX
  +     * @throws Exception XXX
  +     */
  +    public Handler newInstance(DeploymentRegistry registry)
  +        throws Exception
  +    {
  +
           try {
  -            Handler h = super.makeNewInstance(registry);
  -            TargetedChain c = (TargetedChain)h;
  -            WSDDFlow request = getRequestFlow();
  -            WSDDFlow response = getResponseFlow();
  -            if (request != null)
  +            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)
  +
  +            if (response != null) {
                   c.setResponseHandler(response.newInstance(registry));
  +            }
  +
               return c;
  -        } catch (Exception e) {
  +        }
  +        catch (Exception e) {
               return null;
           }
       }
  -    
   }
  
  
  
  1.6       +203 -33   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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WSDDTransport.java	2001/08/29 14:17:16	1.5
  +++ WSDDTransport.java	2001/10/11 15:49:28	1.6
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,66 +54,236 @@
    */
   package org.apache.axis.deployment.wsdd;
   
  -import org.w3c.dom.Element; 
  +import org.w3c.dom.Element;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
  +
   import org.apache.axis.Handler;
   import org.apache.axis.Chain;
   import org.apache.axis.TargetedChain;
   import org.apache.axis.deployment.DeploymentRegistry;
   import org.apache.axis.deployment.DeployableItem;
  +
  +
  +/**
  + *
  + */
  +public class WSDDTransport
  +    extends WSDDDeployableItem
  +{
  +
  +    /**
  +     *
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDTransport(Element e)
  +        throws WSDDException
  +    {
  +        super(e, "transport");
  +    }
   
  -public class WSDDTransport extends WSDDDeployableItem implements DeployableItem { 
  -    
  -    public WSDDTransport(Element e) throws WSDDException { super(e, "transport"); }
  -    
  -    public WSDDRequestFlow getRequestFlow() {
  +    /**
  +     *
  +     * @param d (Document) XXX
  +     * @param n (Node) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDTransport(Document d, Node n)
  +        throws WSDDException
  +    {
  +        super(d, n, "transport");
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDRequestFlow getRequestFlow()
  +    {
           WSDDElement[] e = createArray("requestFlow", WSDDRequestFlow.class);
  +
           if (e.length != 0) {
  -            return (WSDDRequestFlow)e[0];
  -        } 
  +            return (WSDDRequestFlow) e[0];
  +        }
  +
           return null;
  +    }
  +
  +    /**
  +     *
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDRequestFlow createRequestFlow()
  +    {
  +        removeRequestFlow();
  +
  +        return (WSDDRequestFlow) createChild(WSDDRequestFlow.class);
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeRequestFlow()
  +    {
  +        removeChild(getRequestFlow());
       }
  -    
  -    public WSDDResponseFlow getResponseFlow() {
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDResponseFlow getResponseFlow()
  +    {
  +
           WSDDElement[] e = createArray("responseFlow", WSDDResponseFlow.class);
  +
           if (e.length != 0) {
  -            return (WSDDResponseFlow)e[0];
  -        } 
  +            return (WSDDResponseFlow) e[0];
  +        }
  +
           return null;
       }
  -    
  -    public WSDDFaultFlow[] getFaultFlows() {
  -        WSDDElement[] e = createArray("faultFlow", WSDDFaultFlow.class);
  +
  +    /**
  +     *
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDResponseFlow createResponseFlow()
  +    {
  +        removeResponseFlow();
  +
  +        return (WSDDResponseFlow) createChild(WSDDResponseFlow.class);
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeResponseFlow()
  +    {
  +        removeChild(getResponseFlow());
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public WSDDFaultFlow[] getFaultFlows()
  +    {
  +
  +        WSDDElement[]   e = createArray("faultFlow", WSDDFaultFlow.class);
           WSDDFaultFlow[] t = new WSDDFaultFlow[e.length];
  -        System.arraycopy(e,0,t,0,e.length);
  +
  +        System.arraycopy(e, 0, t, 0, e.length);
  +
           return t;
       }
  -    
  -    public WSDDFaultFlow getFaultFlow(String name) {
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return XXX
  +     */
  +    public WSDDFaultFlow getFaultFlow(String name)
  +    {
  +
           WSDDFaultFlow[] t = getFaultFlows();
  +
           for (int n = 0; n < t.length; n++) {
  -            if (t[n].getName().equals(name))
  +            if (t[n].getName().equals(name)) {
                   return t[n];
  -        } 
  +            }
  +        }
  +
  +        return null;
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     * @return the newly created / tree-ified item,
  +	 *          so that the caller might mutate it
  +     */
  +    public WSDDFaultFlow createFaultFlow()
  +    {
  +        return (WSDDFaultFlow) createChild(WSDDFaultFlow.class);
  +    }
  +
  +    /**
  +     *
  +     */
  +    public void removeFaultFlow(WSDDFaultFlow victim)
  +    {
  +        removeChild(victim);
  +    }
  +
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String getType()
  +    {
           return null;
  +    }
  +
  +    /**
  +     *
  +     * @param type XXX
  +     */
  +    public void setType(String type) throws WSDDException
  +    {
  +        throw new WSDDException("Transport disallows setting of Type");
       }
  -   
  -    public String getType() {
  +
  +    /*********************************************************
  +     * Oops, the schema disallows the use Type attribute in Transport
  +    public String getType()
  +    {
  +
           String type = super.getType();
  -        if (type.equals(""))
  -            type = "java:org.apache.axis.SimpleTargedChain";
  +
  +        if (type.equals("")) {
  +            type = "java:org.apache.axis.SimpleTargetedChain";
  +        }
  +
           return type;
       }
  -    
  -    public Handler newInstance(DeploymentRegistry registry) throws Exception {
  +     **************************************************************
  +     */
  +
  +    /**
  +     *
  +     * @param registry XXX
  +     * @return XXX
  +     * @throws Exception XXX
  +     */
  +    public Handler newInstance(DeploymentRegistry registry)
  +        throws Exception
  +    {
           return newInstance(null, registry);
       }
  -    
  -    public Handler newInstance(Handler pivot, DeploymentRegistry registry) throws Exception {
  -        Handler h = super.makeNewInstance(registry);
  -        TargetedChain c = (TargetedChain)h;
  +
  +    /**
  +     *
  +     * @param pivot XXX
  +     * @param registry XXX
  +     * @return XXX
  +     * @throws Exception XXX
  +     */
  +    public Handler newInstance(Handler pivot, DeploymentRegistry registry)
  +        throws Exception
  +    {
  +
  +        Handler       h = super.makeNewInstance(registry);
  +        TargetedChain c = (TargetedChain) h;
  +
           c.setRequestHandler(getRequestFlow().newInstance(registry));
           c.setPivotHandler(pivot);
           c.setResponseHandler(getResponseFlow().newInstance(registry));
  +
           return c;
       }
   }
  
  
  
  1.5       +174 -34   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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WSDDTypeMapping.java	2001/10/03 15:30:03	1.4
  +++ WSDDTypeMapping.java	2001/10/11 15:49:28	1.5
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -54,43 +54,183 @@
    */
   package org.apache.axis.deployment.wsdd;
   
  -import org.apache.axis.utils.QName;
   import org.w3c.dom.Element;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
  +
  +import org.apache.axis.utils.QName;
  +
  +
  +/**
  + *
  + */
  +public class WSDDTypeMapping
  +    extends WSDDElement
  +{
  +
  +    /**
  +     *
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDTypeMapping(Element e)
  +        throws WSDDException
  +    {
  +        super(e, "typeMapping");
  +    }
  +
  +    /**
  +     *
  +     * @param d (Document) XXX
  +     * @param n (Node) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDTypeMapping(Document d, Node n)
  +        throws WSDDException
  +    {
  +        super(d, n, "typeMapping");
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String getName()
  +    {
  +        return getAttribute("name");
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     */
  +    public void setName(String name)
  +    {
  +        setAttribute("name", name);
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String getRef()
  +    {
  +        return getAttribute("ref");
  +    }
  +
  +    /**
  +     *
  +     * @param ref XXX
  +     */
  +    public void setRef(String ref)
  +    {
  +        setAttribute("ref", ref);
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public String getEncodingStyle()
  +    {
  +        return getAttribute("encodingStyle");
  +    }
   
  -public class WSDDTypeMapping extends WSDDElement { 
  -    
  -    public WSDDTypeMapping(Element e) throws WSDDException {super(e, "typeMapping");}
  -    
  -    public String getName() {
  -        return getElement().getAttribute("name");
  -    }
  -    
  -    public String getRef() {
  -        return getElement().getAttribute("ref");
  -    }
  -    
  -    public String getEncodingStyle() {
  -        return getElement().getAttribute("encodingStyle");
  -    }
  -    
  -    public QName getQName() {
  -        return new QName(getElement().getAttribute("qName"), getElement());
  -    }
  -        
  -    public Class getLanguageSpecificType() throws ClassNotFoundException {
  -        String type = getElement().getAttribute("languageSpecificType");
  +    /**
  +     *
  +     * @param es XXX
  +     */
  +    public void setEncodingStyle(String es)
  +    {
  +        setAttribute("encodingStyle", es);
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     */
  +    public QName getQName()
  +    {
  +        return new QName(getAttribute("qName"), getElement());
  +    }
  +
  +    /**
  +     *
  +     * @param name XXX
  +     */
  +    public void setQName(QName name)
  +    {
  +        setAttribute("qName", name.toString());
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     * @throws ClassNotFoundException XXX
  +     */
  +    public Class getLanguageSpecificType()
  +        throws ClassNotFoundException
  +    {
  +
  +        String type = getAttribute("languageSpecificType");
  +
           return Class.forName(type);
       }
  -    
  -    public Class getSerializer() throws ClassNotFoundException {
  -        String type = getElement().getAttribute("serializer");
  +
  +    /**
  +     *
  +     * @param lsType XXX
  +     */
  +    public void setLanguageSpecificType(Class lsType)
  +    {
  +        setAttribute("languageSpecificType", lsType.getName());
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     * @throws ClassNotFoundException XXX
  +     */
  +    public Class getSerializer()
  +        throws ClassNotFoundException
  +    {
  +
  +        String type = getAttribute("serializer");
  +
           return Class.forName(type);
       }
  -    
  -    public Class getDeserializer() throws ClassNotFoundException {
  -        String type = getElement().getAttribute("deserializer");
  +
  +    /**
  +     *
  +     * @param ser XXX
  +     */
  +    public void setSerializer(Class ser)
  +    {
  +        setAttribute("serializer", ser.getName());
  +    }
  +
  +    /**
  +     *
  +     * @return XXX
  +     * @throws ClassNotFoundException XXX
  +     */
  +    public Class getDeserializer()
  +        throws ClassNotFoundException
  +    {
  +
  +        String type = getAttribute("deserializer");
  +
           return Class.forName(type);
  -    }    
  +    }
  +
  +    /**
  +     *
  +     * @param deser XXX
  +     */
  +    public void setDeserializer(Class deser)
  +    {
  +        setAttribute("deserializer", deser.getName());
  +    }
   }
   
   
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/deployment/wsdd/SimpleWsddDeploymentManager.java
  
  Index: SimpleWsddDeploymentManager.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 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;
  
  import java.util.Hashtable;
  
  import org.apache.axis.deployment.wsdd.*;
  import org.apache.axis.Handler;
  import org.apache.axis.Constants;
  import org.apache.axis.utils.QName;
  import org.apache.axis.encoding.TypeMappingRegistry;
  import org.apache.axis.encoding.SOAPTypeMappingRegistry;
  
  
  /**
   *
   */
  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
      {
          return getDeployedWsddItem(qname.toString());
      }
  
      /**
       * Return the RAW deployed item
       * @param name XXX
       * @return XXX
       * @throws DeploymentException XXX
       */
      public WSDDDeployableItem getDeployedWsddItem(String name)
          throws DeploymentException
      {
  
          try {
              WSDDDeployableItem item = (WSDDDeployableItem) items.get(name);
  
              return item;
          }
          catch (Exception e) {
              throw new DeploymentException(e.getMessage());
          }
      }
  }
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDDocumentation.java
  
  Index: WSDDDocumentation.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 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;
  
  import org.w3c.dom.Element;
  import org.w3c.dom.Document;
  import org.w3c.dom.Node;
  
  import org.apache.axis.utils.XMLUtils;
  
  
  /**
   *
   */
  public class WSDDDocumentation
      extends WSDDElement
  {
  
      /**
       *
       * @param e (Element) XXX
       * @throws WSDDException XXX
       */
      public WSDDDocumentation(Element e)
          throws WSDDException
      {
          super(e, "documentation");
      }
  
      /**
       *
       * @param d (Document) XXX
       * @param n (Node) XXX
       * @throws WSDDException XXX
       */
      public WSDDDocumentation(Document d, Node n)
          throws WSDDException
      {
          super(d, n, "documentation");
      }
  
      /**
       *
       * @return XXX
       */
      public String getValue()
      {
  		Node node = getElement().getFirstChild();
  		if (null == node) return "";
  		
          return node.getNodeValue();
      }
  
      /**
       *
       * @param value XXX
       */
      public void setValue(String value)
      {
          Node node = getElement().getFirstChild();
          if (null == node) 
  		{
  			Element element = getElement();
  			Node childTextNode = element.getOwnerDocument().createTextNode(value);
  			element.appendChild(childTextNode);
  			
  		}
          else 
          {
          	getElement().getFirstChild().setNodeValue(value);
          }
      }
  }
  
  
  
  1.6       +104 -25   xml-axis/java/src/org/apache/axis/deployment/wsdd/providers/WSDDBsfProvider.java
  
  Index: WSDDBsfProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/providers/WSDDBsfProvider.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WSDDBsfProvider.java	2001/10/03 15:30:04	1.5
  +++ WSDDBsfProvider.java	2001/10/11 15:49:29	1.6
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -55,48 +55,127 @@
   package org.apache.axis.deployment.wsdd.providers;
   
   import org.apache.axis.Handler;
  -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.apache.axis.deployment.wsdd.WSDDException;
  +import org.apache.axis.deployment.wsdd.WSDDConstants;
  +import org.apache.axis.deployment.DeploymentRegistry;
   import org.apache.axis.providers.BSFProvider;
   import org.apache.axis.providers.BasicProvider;
   import org.apache.axis.utils.QName;
   import org.apache.axis.utils.XMLUtils;
  +
   import org.w3c.dom.Element;
   import org.w3c.dom.NodeList;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
   
  -public class WSDDBsfProvider extends WSDDProvider {
  -    
  -    public WSDDBsfProvider(Element e) throws WSDDException { super(e); }
  +
  +/**
  + *
  + */
  +public class WSDDBsfProvider
  +    extends WSDDProvider
  +{
  +
  +    /**
  +     *
  +     * Wrap an extant DOM element in WSDD
  +     *
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDBsfProvider(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 WSDDBsfProvider(Document d, Node n)
  +        throws WSDDException
  +    {
  +        super(d, n);
       
  -    public Handler newProviderInstance(DeploymentRegistry registry) throws Exception {
  +	    Element specificProvider =
  +	    	d.createElementNS(WSDDConstants.WSDD_BSF, "bsf:provider");
  +	    getElement().appendChild(specificProvider);
  +    }
  +
  +    protected Element getProviderElement()
  +    	throws WSDDException
  +    {
  +	    Element prov =
  +	        (Element) getElement()
  +	            .getElementsByTagNameNS(WSDDConstants.WSDD_BSF, "provider")
  +	            .item(0);
  +
  +	    if (prov == null) {
  +	        throw new WSDDException(
  +	            "The BSF Provider requires the presence of a bsf:provider element in the WSDD");
  +	    }
  +    	
  +    	return prov;
  +    }
  +
  +    /**
  +     *
  +     * @param registry XXX
  +     * @return XXX
  +     * @throws Exception XXX
  +     */
  +    public Handler newProviderInstance(DeploymentRegistry registry)
  +        throws Exception
  +    {
  +
           String type;
  -        type = (!(type = getType()).equals("") ? type : "org.apache.axis.handlers.providers.BSFProvider");
  -        Class _class = Class.forName(type);
  -        BasicProvider provider = (BasicProvider)_class.newInstance();
  -        
  +
  +        type = (!(type = getType()).equals("")
  +                ? type
  +                : "org.apache.axis.handlers.providers.BSFProvider");
  +
  +        Class         _class   = Class.forName(type);
  +        BasicProvider provider = (BasicProvider) _class.newInstance();
  +
           // set the basic java provider deployment options
  -        Element prov = (Element)getElement().getElementsByTagNameNS(WSDDConstants.WSDD_BSF, "provider").item(0);
  -        if (prov == null) {
  -            throw new WSDDException("The BSF Provider requires the presence of a bsf:provider element in the WSDD");
  -        }
  +        Element prov = getProviderElement();
  +
           String option = prov.getAttribute("language");
  -        if (!option.equals("")) provider.addOption(BSFProvider.OPTION_LANGUAGE, option);
  +
  +        if (!option.equals("")) {
  +            provider.addOption(BSFProvider.OPTION_LANGUAGE, option);
  +        }
  +
           option = prov.getAttribute("src");
  -        if (!option.equals("")) provider.addOption(BSFProvider.OPTION_SRC, option);
  +
  +        if (!option.equals("")) {
  +            provider.addOption(BSFProvider.OPTION_SRC, option);
  +        }
  +
           option = XMLUtils.getInnerXMLString(prov);
  -        if (!option.equals("")) provider.addOption(BSFProvider.OPTION_SCRIPT, option);
  -        
  +
  +        if (!option.equals("")) {
  +            provider.addOption(BSFProvider.OPTION_SCRIPT, option);
  +        }
  +
           // collect the information about the operations
  -        NodeList nl = getElement().getElementsByTagNameNS(WSDDConstants.WSDD_NS, "operation");
  +        NodeList nl =
  +            getElement().getElementsByTagNameNS(WSDDConstants.WSDD_NS,
  +                                                "operation");
  +
           for (int n = 0; n < nl.getLength(); n++) {
  -            Element op = (Element)nl.item(n);
  +            Element op = (Element) nl.item(n);
  +
               provider.addOperation(op.getAttribute("name"),
  -                                  new QName(op.getAttribute("qName"),op));
  +                                  new QName(op.getAttribute("qName"), op));
           }
  -        
  +
           return provider;
       }
  -    
   }
  
  
  
  1.6       +105 -26   xml-axis/java/src/org/apache/axis/deployment/wsdd/providers/WSDDComProvider.java
  
  Index: WSDDComProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/providers/WSDDComProvider.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WSDDComProvider.java	2001/10/03 15:30:04	1.5
  +++ WSDDComProvider.java	2001/10/11 15:49:29	1.6
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -55,47 +55,126 @@
   package org.apache.axis.deployment.wsdd.providers;
   
   import org.apache.axis.Handler;
  -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.apache.axis.providers.BasicProvider;
  +import org.apache.axis.deployment.wsdd.WSDDException;
  +import org.apache.axis.deployment.wsdd.WSDDConstants;
  +import org.apache.axis.deployment.DeploymentRegistry;
   import org.apache.axis.providers.ComProvider;
  +import org.apache.axis.providers.BasicProvider;
   import org.apache.axis.utils.QName;
  +
   import org.w3c.dom.Element;
   import org.w3c.dom.NodeList;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
  +
  +
  +/**
  + *
  + */
  +public class WSDDComProvider
  +    extends WSDDProvider
  +{
  +
  +    /**
  +     *
  +     * Wrap an extant DOM element in WSDD
  +     *
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDComProvider(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 WSDDComProvider(Document d, Node n)
  +        throws WSDDException
  +    {
  +        super(d, n);
  +    
  +	    Element specificProvider =
  +	    	d.createElementNS(WSDDConstants.WSDD_COM, "com:provider");
  +	    getElement().appendChild(specificProvider);
  +    }
  +
  +    protected Element getProviderElement()
  +    	throws WSDDException
  +    {
  +	    Element prov =
  +	        (Element) getElement()
  +	            .getElementsByTagNameNS(WSDDConstants.WSDD_COM, "provider")
  +	            .item(0);
   
  -public class WSDDComProvider extends WSDDProvider {
  +	    if (prov == null) {
  +	        throw new WSDDException(
  +	            "The Com Provider requires the presence of a com:provider element in the WSDD");
  +	    }
  +    	
  +    	return prov;
  +    }
       
  -    public WSDDComProvider(Element e) throws WSDDException { super(e); }
  -  
  -    public Handler newProviderInstance(DeploymentRegistry registry) throws Exception {
  +    /**
  +     *
  +     * @param registry XXX
  +     * @return XXX
  +     * @throws Exception XXX
  +     */
  +    public Handler newProviderInstance(DeploymentRegistry registry)
  +        throws Exception
  +    {
  +
           String type;
  -        type = (!(type = getType()).equals("") ? type : "org.apache.axis.handlers.providers.ComProvider");
  -        Class _class = Class.forName(type);
  -        BasicProvider provider = (BasicProvider)_class.newInstance();
  -        
  +
  +        type = (!(type = getType()).equals("")
  +                ? type
  +                : "org.apache.axis.handlers.providers.ComProvider");
  +
  +        Class         _class   = Class.forName(type);
  +        BasicProvider provider = (BasicProvider) _class.newInstance();
  +
           // set the basic java provider deployment options
  -        Element prov = (Element)getElement().getElementsByTagNameNS(WSDDConstants.WSDD_COM, "provider").item(0);
  -        if (prov == null) {
  -            throw new WSDDException("The Com Provider requires the presence of a com:provider element in the WSDD");
  -        }
  +        Element prov = getProviderElement();
  +
           String option = prov.getAttribute("ProgID");
  -        if (!option.equals("")) provider.addOption(ComProvider.OPTION_PROGID, option);
  +
  +        if (!option.equals("")) {
  +            provider.addOption(ComProvider.OPTION_PROGID, option);
  +        }
  +
           option = prov.getAttribute("CLSID");
  -        if (!option.equals("")) provider.addOption(ComProvider.OPTION_CLSID, option);
  +
  +        if (!option.equals("")) {
  +            provider.addOption(ComProvider.OPTION_CLSID, option);
  +        }
  +
           option = prov.getAttribute("threadingModel");
  -        if (!option.equals("")) provider.addOption(ComProvider.OPTION_THREADING_MODEL, option);
  -        
  +
  +        if (!option.equals("")) {
  +            provider.addOption(ComProvider.OPTION_THREADING_MODEL, option);
  +        }
  +
           // collect the information about the operations
  -        NodeList nl = getElement().getElementsByTagNameNS(WSDDConstants.WSDD_NS, "operation");
  +        NodeList nl =
  +            getElement().getElementsByTagNameNS(WSDDConstants.WSDD_NS,
  +                                                "operation");
  +
           for (int n = 0; n < nl.getLength(); n++) {
  -            Element op = (Element)nl.item(n);
  +            Element op = (Element) nl.item(n);
  +
               provider.addOperation(op.getAttribute("name"),
  -                                  new QName(op.getAttribute("qName"),op));
  +                                  new QName(op.getAttribute("qName"), op));
           }
  -        
  +
           return provider;
       }
  -   
   }
  
  
  
  1.6       +103 -28   xml-axis/java/src/org/apache/axis/deployment/wsdd/providers/WSDDJavaProvider.java
  
  Index: WSDDJavaProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/providers/WSDDJavaProvider.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WSDDJavaProvider.java	2001/10/03 15:30:04	1.5
  +++ WSDDJavaProvider.java	2001/10/11 15:49:29	1.6
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -55,49 +55,124 @@
   package org.apache.axis.deployment.wsdd.providers;
   
   import org.apache.axis.Handler;
  +import org.apache.axis.deployment.wsdd.WSDDProvider;
  +import org.apache.axis.deployment.wsdd.WSDDException;
   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.apache.axis.providers.BasicProvider;
   import org.apache.axis.providers.java.JavaProvider;
  +import org.apache.axis.providers.BasicProvider;
   import org.apache.axis.utils.QName;
  +
   import org.w3c.dom.Element;
   import org.w3c.dom.NodeList;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Node;
  +
  +
  +/**
  + *
  + */
  +public class WSDDJavaProvider
  +    extends WSDDProvider
  +{
  +
  +    /**
  +     *
  +     * Wrap an extant DOM element in WSDD
  +     *
  +     * @param e (Element) XXX
  +     * @throws WSDDException XXX
  +     */
  +    public WSDDJavaProvider(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 WSDDJavaProvider(Document d, Node n)
  +        throws WSDDException
  +    {
  +        super(d, n);
  +		
  +		Element specificProvider =
  +			d.createElementNS(WSDDConstants.WSDD_JAVA, "java:provider");
  +		getElement().appendChild(specificProvider);
  +    }
  +
  +	protected Element getProviderElement()
  +		throws WSDDException
  +	{
  +		Element prov =
  +		    (Element) getElement()
  +		        .getElementsByTagNameNS(WSDDConstants.WSDD_JAVA, "provider")
  +		        .item(0);
   
  -public class WSDDJavaProvider extends WSDDProvider {
  -    
  -    public WSDDJavaProvider(Element e) throws WSDDException { super(e); }
  -    
  -    public Handler newProviderInstance(DeploymentRegistry registry) throws Exception {
  +		if (prov == null) {
  +		    throw new WSDDException(
  +		        "The Java Provider requires the presence of a java:provider element in the WSDD");
  +		}
  +		
  +		return prov;
  +	}
  +	
  +    /**
  +     *
  +     * @param registry XXX
  +     * @return XXX
  +     * @throws Exception XXX
  +     */
  +    public Handler newProviderInstance(DeploymentRegistry registry)
  +        throws Exception
  +    {
  +
           String type;
  -        type = (!(type = getType()).equals("") ? type : "org.apache.axis.handlers.providers.JavaProvider");
  -        Class _class = Class.forName(type);
  -        BasicProvider provider = (BasicProvider)_class.newInstance();
  -        
  +
  +        type = (!(type = getType()).equals("")
  +                ? type
  +                : "org.apache.axis.handlers.providers.JavaProvider");
  +
  +        Class         _class   = Class.forName(type);
  +        BasicProvider provider = (BasicProvider) _class.newInstance();
  +
           // set the basic java provider deployment options
  -        Element prov = (Element)getElement().getElementsByTagNameNS(WSDDConstants.WSDD_JAVA, "provider").item(0);
  -        if (prov == null) {
  -            throw new WSDDException("The Java Provider requires the presence of a java:provider element in the WSDD");
  -        }
  -        provider.addOption(JavaProvider.OPTION_CLASSNAME, prov.getAttribute("className"));
  -        provider.addOption(JavaProvider.OPTION_IS_STATIC, new Boolean(prov.getAttribute("isStatic")));
  -        
  +        Element prov = getProviderElement();
  +
  +        provider.addOption(JavaProvider.OPTION_CLASSNAME,
  +                           prov.getAttribute("className"));
  +        provider.addOption(JavaProvider.OPTION_IS_STATIC,
  +                           new Boolean(prov.getAttribute("isStatic")));
  +
           // set the classpath if present
  -        Element cp = (Element)getElement().getElementsByTagNameNS(WSDDConstants.WSDD_JAVA, "classPath").item(0);
  +        Element cp =
  +            (Element) getElement()
  +                .getElementsByTagNameNS(WSDDConstants.WSDD_JAVA, "classPath")
  +                .item(0);
  +
           if (cp != null) {
  -            provider.addOption(JavaProvider.OPTION_CLASSPATH, cp.getFirstChild().getNodeValue());
  +            provider.addOption(JavaProvider.OPTION_CLASSPATH,
  +                               cp.getFirstChild().getNodeValue());
           }
  -        
  +
           // collect the information about the operations
  -        NodeList nl = getElement().getElementsByTagNameNS(WSDDConstants.WSDD_NS, "operation");
  +        NodeList nl =
  +            getElement().getElementsByTagNameNS(WSDDConstants.WSDD_NS,
  +                                                "operation");
  +
           for (int n = 0; n < nl.getLength(); n++) {
  -            Element op = (Element)nl.item(n);
  +            Element op = (Element) nl.item(n);
  +
               provider.addOperation(op.getAttribute("name"),
  -                                  new QName(op.getAttribute("qName"),op));
  +                                  new QName(op.getAttribute("qName"), op));
           }
  -        
  +
           return provider;
       }
  -    
   }
  
  
  
  1.2       +1 -1      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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServiceMapping.java	2001/05/05 09:03:36	1.1
  +++ ServiceMapping.java	2001/10/11 15:49:29	1.2
  @@ -17,7 +17,7 @@
    * 
    * This is here just as a placeholder for now
    */
  -public class ServiceMapping extends DeploymentDocument { 
  +public class ServiceMapping implements DeploymentDocument { 
       
       public void deploy(DeploymentRegistry registry) {
           
  
  
  
  1.24      +79 -22    xml-axis/java/src/org/apache/axis/utils/XMLUtils.java
  
  Index: XMLUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/XMLUtils.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- XMLUtils.java	2001/10/10 17:07:38	1.23
  +++ XMLUtils.java	2001/10/11 15:49:29	1.24
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    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
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    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,
  @@ -26,7 +26,7 @@
    *
    * 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 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -56,13 +56,12 @@
   package org.apache.axis.utils ;
   
   import org.apache.axis.Constants;
  -
   import org.w3c.dom.Attr;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   import org.w3c.dom.NamedNodeMap;
   import org.w3c.dom.Node;
  -
  +import org.w3c.dom.NodeList;
   import org.xml.sax.InputSource;
   import org.xml.sax.SAXException;
   
  @@ -74,22 +73,23 @@
   import java.io.OutputStream;
   import java.io.OutputStreamWriter;
   import java.io.Writer;
  +import java.util.Hashtable;
   import java.util.Stack;
   
   public class XMLUtils {
       private static DocumentBuilderFactory dbf = initDOMFactory();
       private static SAXParserFactory       saxFactory;
       private static Stack                  saxParsers = new Stack();
  -    
  +
       static {
           // Initialize SAX Parser factory defaults
           initSAXFactory(null, true, false);
       }
  -    
  +
       /** Encode a string appropriately for XML.
  -     * 
  +     *
        * Lifted from ApacheSOAP 2.2 (org.apache.soap.Utils)
  -     * 
  +     *
        * @param orig the String to encode
        * @return a String in which XML special chars are repalced by entities
        */
  @@ -126,13 +126,13 @@
       }
   
       /** Initialize the SAX parser factory.
  -     * 
  +     *
        * @param factoryClassName The class name of the desired SAXParserFactory
        *                         implementation.  Will be assigned to the system
        *                         property <b>javax.xml.parsers.SAXParserFactory</b>.
        * @param namespaceAware true if we want a namespace-aware parser (which we do)
        * @param validating true if we want a validating parser
  -     * 
  +     *
        */
       public static void initSAXFactory(String factoryClassName,
                                         boolean namespaceAware,
  @@ -157,9 +157,9 @@
           }
           return( dbf );
       }
  -    
  +
       /** Get a SAX parser instance from the JAXP factory.
  -     * 
  +     *
        * @return a SAXParser instance.
        */
       public static synchronized SAXParser getSAXParser() {
  @@ -216,11 +216,11 @@
       {
           return DOM2Writer.nodeToString(element, omitXMLDecl);
       }
  -    
  +
       public static String ElementToString(Element element) {
           return privateElementToString(element, true);
       }
  -    
  +
       public static String DocumentToString(Document doc) {
           return privateElementToString(doc.getDocumentElement(), false);
       }
  @@ -230,11 +230,11 @@
                                                 boolean pretty) {
           DOM2Writer.serializeAsXML(element, writer, omitXMLDecl, pretty);
       }
  -    
  +
       public static void ElementToWriter(Element element, Writer writer) {
           privateElementToWriter(element, writer, true, false);
       }
  -    
  +
       public static void DocumentToStream(Document doc, OutputStream out) {
           Writer writer = new OutputStreamWriter(out);
           privateElementToWriter(doc.getDocumentElement(), writer, false, false);
  @@ -254,12 +254,12 @@
           int start, end;
           start = elementString.indexOf(">") + 1;
           end = elementString.lastIndexOf("</");
  -        if (end > 0) 
  +        if (end > 0)
               return elementString.substring(start,end);
  -        else 
  +        else
               return null;
       }
  -    
  +
       public static String getPrefix(String uri, Node e) {
           while (e != null && (e.getNodeType() == Element.ELEMENT_NODE)) {
               NamedNodeMap attrs = e.getAttributes();
  @@ -278,11 +278,68 @@
   
       public static String getNamespace(String prefix, Node e) {
           while (e != null && (e.getNodeType() == Node.ELEMENT_NODE)) {
  -            String name = 
  +            String name =
                   ((Element)e).getAttributeNS(Constants.NS_URI_XMLNS, prefix);
               if (name != null && name.length() > 0) return name;
               e = e.getParentNode();
           }
           return null;
  +    }
  +    /**
  +     * Gather all existing prefixes in use in this document
  +     *
  +     */
  +    private static Hashtable getPrefixes(Document d)
  +    {
  +    	Hashtable result = new Hashtable();
  +
  +    	NodeList list = d.getElementsByTagName("*");
  +
  +    	for (int i=0; i<list.getLength(); i++)
  +    	{
  +    		Element e = (Element)list.item(i);
  +    		NamedNodeMap attrs = e.getAttributes();
  +    		for (int n = 0; n < attrs.getLength(); n++)
  +    		{
  +    		    Attr a = (Attr)attrs.item(n);
  +    		    String name;
  +    		    if ((name = a.getName()).startsWith("xmlns:"))
  +    			{
  +    			// do *not* store nsUri for lookup, as a prefix might be
  +    			//   one-many in the document as a whole
  +    		        result.put(name.substring(6), "");
  +    		    }
  +    		}
  +    	}
  +    	return result;
  +    }
  +
  +    /**
  +     * Take note of all existing prefixes in use in this document, and
  +     *  create a new one
  +     *
  +     */
  +    public static String getNewPrefix(Document d, String nsUri)
  +    {
  +    	Hashtable extantPrefixes = getPrefixes(d);
  +
  +    	// Now try to pick one that isn't extant
  +    	String winner = null;
  +    	for (int j=0; winner == null; j++)
  +    	{
  +    		String candidate = "ns" + j;
  +    		if (! extantPrefixes.containsKey(candidate))
  +    		{
  +    			winner = candidate;
  +    		}
  +    	}
  +
  +    	// Install the winner at the top of the document
  +    	d.getDocumentElement().setAttributeNS(
  +    			Constants.NS_URI_XMLNS,
  +    			"xmlns:" + winner,
  +    			nsUri);
  +
  +    	return winner;
       }
  -}
  + }
  
  
  

Mime
View raw message