axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/wsdl Parameters.java Emitter.java JavaImplWriter.java JavaInterfaceWriter.java JavaServiceInterfaceWriter.java JavaSkelWriter.java JavaStubWriter.java JavaTestCaseWriter.java
Date Thu, 15 Nov 2001 20:08:41 GMT
dims        01/11/15 12:08:41

  Modified:    java/src/org/apache/axis/wsdl Emitter.java
                        JavaImplWriter.java JavaInterfaceWriter.java
                        JavaServiceInterfaceWriter.java JavaSkelWriter.java
                        JavaStubWriter.java JavaTestCaseWriter.java
  Added:       java/src/org/apache/axis/wsdl Parameters.java
  Log:
  - Extract Emitter.Parameters into a separate file/class.
  - Convert some member variables and functions to protected (from private - This is needed
for writing custom emitters).
  
  Revision  Changes    Path
  1.102     +14 -58    xml-axis/java/src/org/apache/axis/wsdl/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/Emitter.java,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- Emitter.java	2001/11/13 22:12:54	1.101
  +++ Emitter.java	2001/11/15 20:08:41	1.102
  @@ -100,26 +100,26 @@
       public static final byte REQUEST_SCOPE     = 0x10;
       public static final byte SESSION_SCOPE     = 0x11;
   
  -    private Document doc = null;
  -    private Definition def = null;
  +    protected Document doc = null;
  +    protected Definition def = null;
       protected WsdlAttributes wsdlAttr = null;
       protected boolean bEmitSkeleton = false;
       protected boolean bMessageContext = false;
       protected boolean bEmitTestCase = false;
       protected boolean bVerbose = false;
  -    private boolean bGenerateImports = true;
  -    private String outputDir = null;
  -    private byte scope = NO_EXPLICIT_SCOPE;
  +    protected boolean bGenerateImports = true;
  +    protected String outputDir = null;
  +    protected byte scope = NO_EXPLICIT_SCOPE;
       protected ArrayList classList = new ArrayList();
       protected ArrayList fileList = new ArrayList();
  -    private Namespaces namespaces = null;
  -    private HashMap delaySetMap = null;
  +    protected Namespaces namespaces = null;
  +    protected HashMap delaySetMap = null;
       protected TypeFactory emitFactory = null;
  -    private WriterFactory writerFactory = null;
  +    protected WriterFactory writerFactory = null;
   
       // portTypesInfo is a Hashmap of <PortType, HashMap2> pairs where HashMap2 is
a
       // Hashmap of <Operation, Parameters> pairs.
  -    private HashMap portTypesInfo = null;
  +    protected HashMap portTypesInfo = null;
   
       /**
        * Default constructor.
  @@ -273,7 +273,7 @@
       /**
        * Do some cleanup of the 'symbol table' and add our own symbol table structures
        */
  -    private void firstPass() throws IOException {
  +    protected void firstPass() throws IOException {
   
           // PortTypes and Services can share the same name.  If they do in this Definition,
           // force their names to be suffixed with _PortType and _Service, respectively.
  @@ -430,7 +430,7 @@
       /**
        * Generate the bindings for all port types.
        */
  -    private void writePortTypes() throws IOException {
  +    protected void writePortTypes() throws IOException {
           Map portTypes = def.getPortTypes();
           Iterator i = portTypes.values().iterator();
   
  @@ -470,50 +470,6 @@
   
   
       /**
  -     * This class simply collects all the parameter or message data for an operation into
one place.
  -     */
  -    protected static class Parameters {
  -
  -        // This vector contains instances of the Parameter class
  -        public Vector list = new Vector();
  -
  -        // The type of the first output part, used as the method's return value
  -        public String returnType = null;
  -
  -        // The name of the return type (from the part name of the output message.
  -        // Used to create the RPCParam for the return value.
  -        public String returnName = null;
  -
  -        // A comma-separated list of all of the faults
  -        public String faultString = null;
  -
  -        // The signature that the interface and the stub will use
  -        public String signature = null;
  -
  -        // The signature that the skeleton will use
  -        public String skelSignature = null;
  -
  -        // The signature that the skeleton impl
  -        public String axisSignature = null;
  -
  -        // The numbers of the respective parameters
  -        public int inputs = 0;
  -        public int inouts = 0;
  -        public int outputs = 0;
  -
  -        public String toString() {
  -            return "\nreturnType = " + returnType
  -                    + "\nreturnTypeName = " + returnName
  -                    + "\nfaultString = " + faultString
  -                    + "\nsignature = " + signature
  -                    + "\nskelSignature = " + skelSignature
  -                    + "\naxisSignature = " + axisSignature
  -                    + "\n(inputs, inouts, outputs) = (" + inputs + ", " + inouts + ", "
+ outputs + ")"
  -                    + "\nlist = " + list;
  -        } // toString
  -    } // class Parameters
  -
  -    /**
        * For the given operation, this method returns the parameter info conveniently collated.
        * There is a bit of processing that is needed to write the interface, stub, and skeleton.
        * Rather than do that processing 3 times, it is done once, here, and stored in the
  @@ -791,7 +747,7 @@
       /**
        * Generate the stubs and skeletons for all binding tags.
        */
  -    private void writeBindings() throws IOException {
  +    protected void writeBindings() throws IOException {
           Map bindings = def.getBindings();
           Iterator i = bindings.values().iterator();
   
  @@ -818,7 +774,7 @@
       /**
        * Create the service class or classes
        */
  -    private void writeServices() throws IOException {
  +    protected void writeServices() throws IOException {
           Map services = def.getServices();
           Iterator i = services.values().iterator();
   
  @@ -838,7 +794,7 @@
        * Generate bindings (classes and class holders) for the complex types.
        * If generating serverside (skeleton) spit out beanmappings
        */
  -    private void writeTypes() throws IOException {
  +    protected void writeTypes() throws IOException {
           HashMap types = emitFactory.getTypes();
           Iterator i = types.values().iterator();
           while (i.hasNext()) {
  
  
  
  1.4       +2 -2      xml-axis/java/src/org/apache/axis/wsdl/JavaImplWriter.java
  
  Index: JavaImplWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/JavaImplWriter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JavaImplWriter.java	2001/11/09 15:02:17	1.3
  +++ JavaImplWriter.java	2001/11/15 20:08:41	1.4
  @@ -126,7 +126,7 @@
           List operations = binding.getBindingOperations();
           for (int i = 0; i < operations.size(); ++i) {
               BindingOperation operation = (BindingOperation) operations.get(i);
  -            Emitter.Parameters parameters = (Emitter.Parameters) operationParameters.get(operation.getOperation().getName());
  +            Parameters parameters = (Parameters) operationParameters.get(operation.getOperation().getName());
   
               // Get the soapAction from the <soap:operation>
               String soapAction = "";
  @@ -159,7 +159,7 @@
   
       private void writeOperation(
               BindingOperation operation,
  -            Emitter.Parameters parms,
  +            Parameters parms,
               String soapAction,
               String namespace,
               boolean isRPC) throws IOException {
  
  
  
  1.4       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/JavaInterfaceWriter.java
  
  Index: JavaInterfaceWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/JavaInterfaceWriter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JavaInterfaceWriter.java	2001/11/09 15:02:17	1.3
  +++ JavaInterfaceWriter.java	2001/11/15 20:08:41	1.4
  @@ -110,7 +110,7 @@
        */
       private void writeOperation(PortType portType, Operation operation, String namespace)
throws IOException {
           writeComment(pw, operation.getDocumentationElement());
  -        Emitter.Parameters parms = (Emitter.Parameters) operationParameters.get(operation.getName());
  +        Parameters parms = (Parameters) operationParameters.get(operation.getName());
           pw.println(parms.signature + ";");
       } // writeOperation
   
  
  
  
  1.4       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/JavaServiceInterfaceWriter.java
  
  Index: JavaServiceInterfaceWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/JavaServiceInterfaceWriter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JavaServiceInterfaceWriter.java	2001/11/09 15:02:17	1.3
  +++ JavaServiceInterfaceWriter.java	2001/11/15 20:08:41	1.4
  @@ -105,7 +105,7 @@
        * This method generates the axis server side impl interface signatures operation.
        */
       private void writeOperationAxisSkelSignatures(Operation operation) throws IOException
{
  -        Emitter.Parameters parms = (Emitter.Parameters) operationParameters.get(operation.getName());
  +        Parameters parms = (Parameters) operationParameters.get(operation.getName());
           pw.println(parms.axisSignature + ";");
       } // writeOperationAxisSkelSignatures
   
  
  
  
  1.4       +2 -2      xml-axis/java/src/org/apache/axis/wsdl/JavaSkelWriter.java
  
  Index: JavaSkelWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/JavaSkelWriter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JavaSkelWriter.java	2001/11/09 15:02:17	1.3
  +++ JavaSkelWriter.java	2001/11/15 20:08:41	1.4
  @@ -126,7 +126,7 @@
           List operations = binding.getBindingOperations();
           for (int i = 0; i < operations.size(); ++i) {
               BindingOperation operation = (BindingOperation) operations.get(i);
  -            Emitter.Parameters parameters = (Emitter.Parameters) operationParameters.get(operation.getOperation().getName());
  +            Parameters parameters = (Parameters) operationParameters.get(operation.getOperation().getName());
   
               // Get the soapAction from the <soap:operation>
               String soapAction = "";
  @@ -162,7 +162,7 @@
        */
       private void writeOperation(
               BindingOperation operation,
  -            Emitter.Parameters parms,
  +            Parameters parms,
               String soapAction,
               String namespace,
               boolean isRPC) throws IOException {
  
  
  
  1.7       +2 -2      xml-axis/java/src/org/apache/axis/wsdl/JavaStubWriter.java
  
  Index: JavaStubWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/JavaStubWriter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JavaStubWriter.java	2001/11/12 20:38:51	1.6
  +++ JavaStubWriter.java	2001/11/15 20:08:41	1.7
  @@ -191,7 +191,7 @@
           List operations = binding.getBindingOperations();
           for (int i = 0; i < operations.size(); ++i) {
               BindingOperation operation = (BindingOperation) operations.get(i);
  -            Emitter.Parameters parameters = (Emitter.Parameters) operationParameters.get(operation.getOperation().getName());
  +            Parameters parameters = (Parameters) operationParameters.get(operation.getOperation().getName());
   
               // Get the soapAction from the <soap:operation>
               String soapAction = "";
  @@ -370,7 +370,7 @@
        */
       private void writeOperation(
               BindingOperation operation,
  -            Emitter.Parameters parms,
  +            Parameters parms,
               String soapAction,
               String namespace,
               boolean isRPC) throws IOException {
  
  
  
  1.4       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/JavaTestCaseWriter.java
  
  Index: JavaTestCaseWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/JavaTestCaseWriter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JavaTestCaseWriter.java	2001/11/09 15:02:17	1.3
  +++ JavaTestCaseWriter.java	2001/11/15 20:08:41	1.4
  @@ -168,7 +168,7 @@
               pw.println("        try {");
               Operation op = (Operation) ops.next();
               String namespace = (String) emitter.getNamespaces().get(port.getQName().getNamespaceURI());
  -            Emitter.Parameters params = (Emitter.Parameters) operationParameters.get(op.getName());
  +            Parameters params = (Parameters) operationParameters.get(op.getName());
   
               if ( !"void".equals( params.returnType ) ) {
                   pw.print("            ");
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/wsdl/Parameters.java
  
  Index: Parameters.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.axis.wsdl;
  
  import java.util.Vector;
  
  /**
   * This class simply collects all the parameter or message data for an operation into one
place.
   */
  public class Parameters {
  
      // This vector contains instances of the Parameter class
      public Vector list = new Vector();
  
      // The type of the first output part, used as the method's return value
      public String returnType = null;
  
      // The name of the return type (from the part name of the output message.
      // Used to create the RPCParam for the return value.
      public String returnName = null;
  
      // A comma-separated list of all of the faults
      public String faultString = null;
  
      // The signature that the interface and the stub will use
      public String signature = null;
  
      // The signature that the skeleton will use
      public String skelSignature = null;
  
      // The signature that the skeleton impl
      public String axisSignature = null;
  
      // The numbers of the respective parameters
      public int inputs = 0;
      public int inouts = 0;
      public int outputs = 0;
  
      public String toString() {
          return "\nreturnType = " + returnType
                  + "\nreturnTypeName = " + returnName
                  + "\nfaultString = " + faultString
                  + "\nsignature = " + signature
                  + "\nskelSignature = " + skelSignature
                  + "\naxisSignature = " + axisSignature
                  + "\n(inputs, inouts, outputs) = (" + inputs + ", " + inouts + ", " + outputs
+ ")"
                  + "\nlist = " + list;
      } // toString
  } // class Parameters
  
  
  

Mime
View raw message