axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject cvs commit: xml-axis/java/test/wsdl/filegen FileGen.wsdl
Date Thu, 13 Dec 2001 17:33:19 GMT
scheu       01/12/13 09:33:19

  Modified:    java/src/org/apache/axis/utils resources.properties
               java/src/org/apache/axis/wsdl/toJava CollectionType.java
                        DefinedType.java Emitter.java
                        JavaComplexTypeWriter.java JavaDeployWriter.java
                        JavaEnumTypeWriter.java JavaFaultWriter.java
                        JavaHolderWriter.java JavaStubWriter.java
                        JavaTypeWriter.java JavaWriter.java
                        JavaWriterFactory.java Parameter.java
                        Parameters.java SchemaUtils.java SymTabEntry.java
                        SymbolTable.java Type.java Utils.java
                        WriterFactory.java
               java/test/refattr refattr.wsdl
               java/test/wsdl Wsdl2javaTestSuite.xml
               java/test/wsdl/filegen FileGen.wsdl
  Added:       java/src/org/apache/axis/wsdl/toJava DefinedElement.java
                        Element.java TypeEntry.java Undefined.java
                        UndefinedDelegate.java UndefinedElement.java
                        UndefinedType.java
  Removed:     java/src/org/apache/axis/wsdl/toJava ElementType.java
                        RefdType.java
  Log:
  Significant changes were made to the SymbolTable.
  
  1) The Type class hierarchy has been replaced with
  
                        SymTabEntry
                            |
                        TypeEntry
                      /           \
                Type                Element
                 |                     |
     (BaseJavaType,                (DefinedElement,
      CollectionType                UndefinedElement)
      DefinedType,
      UndefinedType)
  
     This was done to more accurately reflect that a QName can be
     either an Element or a Type.  See TypeEntry.java for more details.
  
  2) The SymbolTable processing has been changed to more thoroughly support
     forward references of types and elements.  This involves deferring some
     of the initialization of a TypeEntry (like the java name) until the
     undefined type/elements are defined.  See TypeEntry.java and Undefined.java.
  
  3) TypeEntry objects now have a refType field which locates a dependent type.
     (For example a TypeEntry for an array will have a refType that locates the
     TypeEntry for the array element.)  This extra information is reflected in the
     symbol table dump, and is necessary for proper forward reference resolution.
  
  Revision  Changes    Path
  1.31      +1 -0      xml-axis/java/src/org/apache/axis/utils/resources.properties
  
  Index: resources.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/resources.properties,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- resources.properties	2001/12/13 14:13:06	1.30
  +++ resources.properties	2001/12/13 17:33:17	1.31
  @@ -582,3 +582,4 @@
   #NOTE: in cannotFindJNDIHome00, do not translate "EJB" or "JNDI"
   cannotFindJNDIHome00=Cannot find EJB at JNDI location {0}
   cannotCreateInitialContext00=Cannot create InitialContext
  +undefinedloop00= The definition of {0} results in a loop.
  
  
  
  1.2       +2 -2      xml-axis/java/src/org/apache/axis/wsdl/toJava/CollectionType.java
  
  Index: CollectionType.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/CollectionType.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CollectionType.java	2001/12/11 15:08:47	1.1
  +++ CollectionType.java	2001/12/13 17:33:17	1.2
  @@ -67,8 +67,8 @@
    * added with the special QName  <name>[<minOccurs>, <maxOccurs>]
    */
   public class CollectionType extends DefinedType {
  -    public CollectionType(QName pqName, String pjName, Node pNode) {
  -        super(pqName, pjName, pNode);
  +    public CollectionType(QName pqName, TypeEntry refType, Node pNode, String dims) {
  +        super(pqName, refType, pNode, dims);
   
           // Initially these CollectionTypes are not emitted.  This may change.
           setShouldEmit(false); 
  
  
  
  1.2       +4 -0      xml-axis/java/src/org/apache/axis/wsdl/toJava/DefinedType.java
  
  Index: DefinedType.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/DefinedType.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefinedType.java	2001/12/11 15:08:47	1.1
  +++ DefinedType.java	2001/12/13 17:33:17	1.2
  @@ -67,5 +67,9 @@
           super(pqName, pjName, pNode);
           setShouldEmit(true);
       }
  +    public DefinedType(QName pqName, TypeEntry refType, Node pNode, String dims) {
  +        super(pqName, refType, pNode, dims);
  +        setShouldEmit(true);
  +    }
   };
   
  
  
  
  1.2       +2 -2      xml-axis/java/src/org/apache/axis/wsdl/toJava/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/Emitter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Emitter.java	2001/12/11 15:08:47	1.1
  +++ Emitter.java	2001/12/13 17:33:17	1.2
  @@ -388,8 +388,8 @@
       protected void writeTypes() throws IOException {
           Vector types = symbolTable.getTypes();
           for (int i = 0; i < types.size(); ++i) {
  -            Type type = (Type) types.elementAt(i);
  -            if (type.isDefined() && type.getShouldEmit() && type.getBaseType() == null) {
  +            TypeEntry type = (TypeEntry) types.elementAt(i);
  +            if (type.getNode() != null && type.getShouldEmit() && type.getBaseType() == null) {
                   Writer writer = writerFactory.getWriter(type, symbolTable);
                   writer.write();
               }
  
  
  
  1.2       +5 -5      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaComplexTypeWriter.java
  
  Index: JavaComplexTypeWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaComplexTypeWriter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JavaComplexTypeWriter.java	2001/12/11 15:08:47	1.1
  +++ JavaComplexTypeWriter.java	2001/12/13 17:33:17	1.2
  @@ -68,9 +68,9 @@
   * This is Wsdl2java's Complex Type Writer.  It writes the <typeName>.java file.
   */
   public class JavaComplexTypeWriter extends JavaWriter {
  -    private Type type;
  +    private TypeEntry type;
       private Vector elements;
  -    private Type extendType;  
  +    private TypeEntry extendType;  
   
       /**
        * Constructor.
  @@ -81,7 +81,7 @@
        */
       protected JavaComplexTypeWriter(
               Emitter emitter,
  -            Type type, Vector elements, Type extendType) {
  +            TypeEntry type, Vector elements, TypeEntry extendType) {
           super(emitter, type, "", "java",
                   JavaUtils.getMessage("genType00"));
           this.type = type;
  @@ -104,10 +104,10 @@
           }
   
           // We are only interested in the java names of the types, so replace the
  -        // Types in the list with their java names.  
  +        // TypeEntry in the list with their java names.  
           // Also filter element names for Java 
           for (int i=0; i < elements.size(); i+=2) {
  -            elements.setElementAt(((Type) elements.get(i)).getJavaName(), i);
  +            elements.setElementAt(((TypeEntry) elements.get(i)).getJavaName(), i);
               elements.setElementAt( Utils.xmlNameToJava((String) elements.get(i + 1)), i + 1);
           }
   
  
  
  
  1.3       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaDeployWriter.java
  
  Index: JavaDeployWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaDeployWriter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JavaDeployWriter.java	2001/12/13 17:11:56	1.2
  +++ JavaDeployWriter.java	2001/12/13 17:33:17	1.3
  @@ -137,7 +137,7 @@
   
           pw.println();
           for (int i = 0; i < types.size(); ++i) {
  -            Type type = (Type) types.elementAt(i);
  +            TypeEntry type = (TypeEntry) types.elementAt(i);
               if (type.getBaseType() == null && type.isReferenced()
                       && !type.getJavaName().endsWith("[]")) {
                   pw.println("  <beanMapping");
  
  
  
  1.2       +3 -3      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaEnumTypeWriter.java
  
  Index: JavaEnumTypeWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaEnumTypeWriter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JavaEnumTypeWriter.java	2001/12/11 15:08:47	1.1
  +++ JavaEnumTypeWriter.java	2001/12/13 17:33:17	1.2
  @@ -66,7 +66,7 @@
   * This is Wsdl2java's Complex Type Writer.  It writes the <typeName>.java file.
   */
   public class JavaEnumTypeWriter extends JavaWriter {
  -    private Type type;
  +    private TypeEntry type;
       private Vector elements;
   
       /**
  @@ -74,7 +74,7 @@
        */
       protected JavaEnumTypeWriter(
               Emitter emitter,
  -            Type type, Vector elements) {
  +            TypeEntry type, Vector elements) {
           super(emitter, type, "", "java",
                   JavaUtils.getMessage("genType00"));
           this.type = type;
  @@ -90,7 +90,7 @@
           Node node = type.getNode();
   
           // The first index is the base type.  Get its java name.
  -        String baseType = ((Type) elements.get(0)).getJavaName();
  +        String baseType = ((TypeEntry) elements.get(0)).getJavaName();
           String javaName = Utils.getJavaLocalName(type.getName());
   
           // Note:
  
  
  
  1.2       +2 -2      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaFaultWriter.java
  
  Index: JavaFaultWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaFaultWriter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JavaFaultWriter.java	2001/12/11 15:08:47	1.1
  +++ JavaFaultWriter.java	2001/12/13 17:33:17	1.2
  @@ -92,7 +92,7 @@
   
           // Write data members of the exception and getter methods for them
           for (int i = 0; i < params.size(); i += 2) {
  -            String type = ((Type) params.get(i)).getName();
  +            String type = ((TypeEntry) params.get(i)).getName();
               String variable = (String) params.get(i + 1);
               pw.println("    public " + type + " " + variable + ";");
               pw.println("    public " + type + " get" + Utils.capitalizeFirstChar(variable) + "() {");
  @@ -111,7 +111,7 @@
               pw.print("      public " + className + "(");
               for (int i = 0; i < params.size(); i += 2) {
                   if (i != 0) pw.print(", ");
  -                pw.print(((Type) params.get(i)).getName() + " " + params.get(i + 1));
  +                pw.print(((TypeEntry) params.get(i)).getName() + " " + params.get(i + 1));
               }
               pw.println(") {");
               for (int i = 1; i < params.size(); i += 2) {
  
  
  
  1.3       +2 -2      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaHolderWriter.java
  
  Index: JavaHolderWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaHolderWriter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JavaHolderWriter.java	2001/12/13 17:11:56	1.2
  +++ JavaHolderWriter.java	2001/12/13 17:33:17	1.3
  @@ -64,12 +64,12 @@
   * This is Wsdl2java's Holder Writer.  It writes the <typeName>Holder.java file.
   */
   public class JavaHolderWriter extends JavaWriter {
  -    private Type type;
  +    private TypeEntry type;
   
       /**
        * Constructor.
        */
  -    protected JavaHolderWriter(Emitter emitter, Type type) {
  +    protected JavaHolderWriter(Emitter emitter, TypeEntry type) {
           super(
                   emitter,
                   new QName(
  
  
  
  1.3       +11 -11    xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java
  
  Index: JavaStubWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JavaStubWriter.java	2001/12/13 17:11:56	1.2
  +++ JavaStubWriter.java	2001/12/13 17:33:17	1.3
  @@ -139,7 +139,7 @@
           pw.println("            call = (org.apache.axis.client.Call) service.createCall();");
   
           while (it.hasNext()) {
  -            writeSerializationInit((Type) it.next());
  +            writeSerializationInit((TypeEntry) it.next());
           }
   
           pw.println("        }");
  @@ -224,7 +224,7 @@
       } // writeFileBody
   
       /**
  -     * This method returns a set of all the Types in a given PortType.
  +     * This method returns a set of all the TypeEntry in a given PortType.
        * The elements of the returned HashSet are Types.
        */
       private HashSet getTypesInPortType(PortType portType) {
  @@ -241,10 +241,10 @@
           // Extract those types which are complex types.
           Iterator i = firstPassTypes.iterator();
           while (i.hasNext()) {
  -            Type type = (Type) i.next();
  +            TypeEntry type = (TypeEntry) i.next();
               if (!types.contains(type)) {
                   types.add(type);
  -                if (type.isDefined() && type.getBaseType() == null) {
  +                if ((type.getNode() != null) && type.getBaseType() == null) {
                       types.addAll(
                               Utils.getNestedTypes(type.getNode(), symbolTable));
                   }
  @@ -254,8 +254,8 @@
       } // getTypesInPortType
   
       /**
  -     * This method returns a set of all the Types in a given Operation.
  -     * The elements of the returned HashSet are Types.
  +     * This method returns a set of all the TypeEntry in a given Operation.
  +     * The elements of the returned HashSet are TypeEntry.
        */
       private HashSet getTypesInOperation(Operation operation) {
           HashSet types = new HashSet();
  @@ -300,7 +300,7 @@
       } // getTypesInOperation
   
       /**
  -     * This method returns a vector of Types for the parts.
  +     * This method returns a vector of TypeEntry for the parts.
        */
       private void partTypes(Vector v, Collection parts, boolean literal) {
           Iterator i = parts.iterator();
  @@ -312,19 +312,19 @@
               if (literal) {
                   qType = part.getElementName();
                   if (qType != null) {
  -                    v.add(symbolTable.getElementTypeEntry(qType));
  +                    v.add(symbolTable.getElement(qType));
                   }
               } else {
                   qType = part.getTypeName(); 
                   if (qType == null) {
                       qType = part.getElementName();
                       if (qType != null) {
  -                        v.add(symbolTable.getElementTypeEntry(qType));
  +                        v.add(symbolTable.getElement(qType));
                       }
                   }
                   else {
                       if (qType != null) {
  -                        v.add(symbolTable.getTypeEntry(qType));
  +                        v.add(symbolTable.getType(qType));
                       }
                   }
               }
  @@ -336,7 +336,7 @@
        */
       private boolean firstSer = true ;
   
  -    private void writeSerializationInit(Type type) throws IOException {
  +    private void writeSerializationInit(TypeEntry type) throws IOException {
           if (type.getBaseType() != null || type.getName().endsWith("[]")) {
               return;
           }
  
  
  
  1.3       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaTypeWriter.java
  
  Index: JavaTypeWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaTypeWriter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JavaTypeWriter.java	2001/12/13 17:11:56	1.2
  +++ JavaTypeWriter.java	2001/12/13 17:33:17	1.3
  @@ -80,7 +80,7 @@
        */
       public JavaTypeWriter(
               Emitter emitter,
  -            Type type,
  +            TypeEntry type,
               SymbolTable symbolTable) {
           if (type.isReferenced()) {
   
  
  
  
  1.2       +3 -3      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaWriter.java
  
  Index: JavaWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaWriter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JavaWriter.java	2001/12/11 15:08:47	1.1
  +++ JavaWriter.java	2001/12/13 17:33:17	1.2
  @@ -237,7 +237,7 @@
       /**
        * Return a string with "var" wrapped as an Object type if needed
        */
  -    protected String wrapPrimitiveType(Type type, String var) {
  +    protected String wrapPrimitiveType(TypeEntry type, String var) {
           String objType = type == null ? null : (String) TYPES.get(type.getName());
           if (objType != null) {
               return "new " + objType + "(" + var + ")";
  @@ -251,7 +251,7 @@
        * Return the Object variable 'var' cast to the appropriate type
        * doing the right thing for the primitive types.
        */
  -    protected String getResponseString(Type type, String var) {
  +    protected String getResponseString(TypeEntry type, String var) {
           if (type == null) {
               return ";";
           }
  @@ -266,7 +266,7 @@
           }
       } // getResponseString
   
  -    protected boolean isPrimitiveType(Type type) {
  +    protected boolean isPrimitiveType(TypeEntry type) {
           return TYPES.get(type.getName()) != null;
       }
   
  
  
  
  1.3       +14 -14    xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaWriterFactory.java
  
  Index: JavaWriterFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaWriterFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JavaWriterFactory.java	2001/12/13 17:11:56	1.2
  +++ JavaWriterFactory.java	2001/12/13 17:33:17	1.3
  @@ -135,7 +135,7 @@
       /**
        * Return Wsdl2java's JavaTypeWriter object.
        */
  -    public Writer getWriter(Type type, SymbolTable symbolTable) {
  +    public Writer getWriter(TypeEntry type, SymbolTable symbolTable) {
           return new JavaTypeWriter(emitter, type, symbolTable);
       } // getWriter
   
  @@ -156,11 +156,11 @@
               for (int i = 0; i < v.size(); ++i) {
                   SymTabEntry entry = (SymTabEntry) v.elementAt(i);
   
  -                // If entry instanceof Type, then the java name has already been filled in.
  +                // If entry instanceof TypeEntry, then the java name has already been filled in.
                   // Don't try to do it again.  This method should really be doing the filling in
                   // of ALL enty java names, but that's another step toward generalizing the
                   // framework that I don't have time for right now.
  -                if (!(entry instanceof Type)) {
  +                if (!(entry instanceof TypeEntry)) {
                       entry.setName(symbolTable.getJavaName(entry.getQName()));
                   }
               }
  @@ -178,19 +178,19 @@
               if (v.size() > 1) {
                   boolean resolve = true;
                   // Common Special Case:
  -                // If a Type and ElementType have the same QName, and the ElementType
  +                // If a Type and Element have the same QName, and the Element
                   // uses type= to reference the Type, then they are the same class so 
                   // don't bother mangling.
                   if (v.size() == 2 &&
  -                    ((v.elementAt(0) instanceof ElementType &&
  +                    ((v.elementAt(0) instanceof Element &&
                         v.elementAt(1) instanceof Type) ||
  -                     (v.elementAt(1) instanceof ElementType &&
  +                     (v.elementAt(1) instanceof Element &&
                         v.elementAt(0) instanceof Type))) {
  -                    ElementType e = null;
  -                    if (v.elementAt(0) instanceof ElementType) {
  -                        e = (ElementType)v.elementAt(0);
  +                    Element e = null;
  +                    if (v.elementAt(0) instanceof Element) {
  +                        e = (Element)v.elementAt(0);
                       } else {
  -                        e = (ElementType)v.elementAt(1);
  +                        e = (Element)v.elementAt(1);
                       }
                       QName eType = Utils.getNodeTypeRefQName(e.getNode(), "type");
                       if (eType != null && eType.equals(e.getQName()))
  @@ -221,10 +221,10 @@
                       boolean firstType = true;
                       for (int i = 0; i < v.size(); ++i) {
                           SymTabEntry entry = (SymTabEntry) v.elementAt(i);
  -                        if (entry instanceof ElementType) {
  +                        if (entry instanceof Element) {
                               entry.setName(mangleName(entry.getName() , "_ElemType"));
                           }
  -                        else if (entry instanceof Type) {
  +                        else if (entry instanceof TypeEntry) {
                               // Search all other types for java names that match this one.
                               // The sameJavaClass method returns true if the java names are
                               // the same (ignores [] ).
  @@ -232,9 +232,9 @@
                                   firstType = false;
                                   Vector types = symbolTable.getTypes();
                                   for (int j = 0; j < types.size(); ++j) {
  -                                    Type type = (Type) types.elementAt(j);
  +                                    TypeEntry type = (TypeEntry) types.elementAt(j);
                                       if (type != entry && 
  -                                        !(type instanceof ElementType) &&
  +                                        !(type instanceof Element) &&
                                           type.getBaseType() == null &&
                                           sameJavaClass(((Type)entry).getName(), type.getName())) {
                                           v.add(type);  
  
  
  
  1.2       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/Parameter.java
  
  Index: Parameter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/Parameter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Parameter.java	2001/12/11 15:08:47	1.1
  +++ Parameter.java	2001/12/13 17:33:17	1.2
  @@ -67,7 +67,7 @@
       public static final byte INOUT = 3;
   
       public String name;
  -    public Type type;
  +    public TypeEntry type;
       public byte mode = IN;
   
       public String toString() {
  
  
  
  1.2       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/Parameters.java
  
  Index: Parameters.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/Parameters.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Parameters.java	2001/12/11 15:08:47	1.1
  +++ Parameters.java	2001/12/13 17:33:17	1.2
  @@ -65,7 +65,7 @@
       public Vector list = new Vector();
   
       // The type of the first output part, used as the method's return value
  -    public Type returnType = null;
  +    public TypeEntry 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.
  
  
  
  1.3       +10 -10    xml-axis/java/src/org/apache/axis/wsdl/toJava/SchemaUtils.java
  
  Index: SchemaUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/SchemaUtils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SchemaUtils.java	2001/12/12 20:53:38	1.2
  +++ SchemaUtils.java	2001/12/13 17:33:17	1.3
  @@ -81,7 +81,7 @@
       /**
        * If the specified node represents a supported JAX-RPC complexType/element,
        * a Vector is returned which contains the child element types and
  -     * child element names.  The even indices are the element types (Types) and
  +     * child element names.  The even indices are the element types (TypeEntry) and
        * the odd indices are the corresponding names (Strings).
        * If the specified node is not a supported JAX-RPC complexType/element
        * null is returned.
  @@ -171,7 +171,7 @@
   
                           // Get the name and type qnames.
                           // The name of the element is the local part of the name's qname.
  -                        // The type qname is used to locate the Type, which is then
  +                        // The type qname is used to locate the TypeEntry, which is then
                           // used to retrieve the proper java name of the type.
                           Node elementNode = elements.item(i);
                           QName nodeName = Utils.getNodeNameQName(elementNode);
  @@ -184,9 +184,9 @@
                               typeAttr = false;
                           }
   
  -                        Type Type = (Type) symbolTable.getTypeEntry(nodeType, !typeAttr);
  -                        if (Type != null) {
  -                            v.add(Type);
  +                        TypeEntry type = (TypeEntry) symbolTable.getTypeEntry(nodeType, !typeAttr);
  +                        if (type != null) {
  +                            v.add(type);
                               v.add(nodeName.getLocalPart());
                           }
                       }
  @@ -201,7 +201,7 @@
        * If the specified node represents a supported JAX-RPC complexType/element
        * which extends another complexType.  The Type of the base is returned.
        */
  -    public static Type getComplexElementExtensionBase(Node node, SymbolTable symbolTable) {
  +    public static TypeEntry getComplexElementExtensionBase(Node node, SymbolTable symbolTable) {
           if (node == null) {
               return null;
           }
  @@ -262,7 +262,7 @@
                   return null; // No extension base
               }
               // Return associated Type
  -            return (Type) symbolTable.getTypeEntry(extendsType);
  +            return (TypeEntry) symbolTable.getType(extendsType);
           }
           return null;
       }
  @@ -270,7 +270,7 @@
       /**
        * If the specified node represents a supported JAX-RPC enumeration,
        * a Vector is returned which contains the base type and the enumeration values.
  -     * The first element in the vector is the base type (an Type).
  +     * The first element in the vector is the base type (an TypeEntry).
        * Subsequent elements are values (Strings).
        * If this is not an enumeration, null is returned.
        */
  @@ -318,10 +318,10 @@
               // (the base attribute contains this type).
               // The base type must be a built-in type...and we only think
               // this makes sense for string.
  -            Type baseEType = null;
  +            TypeEntry baseEType = null;
               if (restrictionNode != null) {
                   QName baseType = Utils.getNodeTypeRefQName(restrictionNode, "base");
  -                baseEType = symbolTable.getTypeEntry(baseType);
  +                baseEType = symbolTable.getType(baseType);
                   if (baseEType != null && 
                       !baseEType.getJavaName().equals("java.lang.String")) {
                       baseEType = null;
  
  
  
  1.3       +11 -5     xml-axis/java/src/org/apache/axis/wsdl/toJava/SymTabEntry.java
  
  Index: SymTabEntry.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/SymTabEntry.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SymTabEntry.java	2001/12/13 17:11:56	1.2
  +++ SymTabEntry.java	2001/12/13 17:33:17	1.3
  @@ -144,16 +144,22 @@
        * Collate the info in this object in string form.
        */
       public String toString() {
  +        return toString("");
  +    } // toString
  +    /**
  +     * Collate the info in this object in string form with indentation.
  +     */
  +    protected String toString(String indent) {
           String string =
  -                "QName:         " + qname + '\n' + 
  -                "name:          " + name + '\n' + 
  -                "isReferenced?  " + isReferenced + '\n';
  -        String prefix = "dynamicVars:   ";
  +            indent + "QName:         " + qname + '\n' + 
  +            indent + "name:          " + name + '\n' + 
  +            indent + "isReferenced?  " + isReferenced + '\n';
  +        String prefix = indent + "dynamicVars:   ";
           Iterator keys = dynamicVars.keySet().iterator();
           while (keys.hasNext()) {
               Object key = keys.next();
               string += prefix + key + " = " + dynamicVars.get(key) + '\n';
  -            prefix = "               ";
  +            prefix = indent + "               ";
           }
           return string;
       } // toString
  
  
  
  1.4       +293 -241  xml-axis/java/src/org/apache/axis/wsdl/toJava/SymbolTable.java
  
  Index: SymbolTable.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/SymbolTable.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SymbolTable.java	2001/12/13 17:11:56	1.3
  +++ SymbolTable.java	2001/12/13 17:33:17	1.4
  @@ -122,7 +122,7 @@
   
       private HashMap symbolTable = new HashMap();
   
  -    // A list of the Type elements in the symbol table
  +    // A list of the TypeEntry elements in the symbol table
       private Vector types = new Vector();
   
       private boolean debug = false;
  @@ -137,6 +137,172 @@
       } // ctor
   
       /**
  +     * Get the raw symbol table HashMap.
  +     */
  +    public HashMap getHashMap() {
  +        return symbolTable;
  +    } // getHashMap
  +
  +    /**
  +     * Get the list of entries with the given QName.  Since symbols can share QNames, this list is
  +     * necessary.  This list will not contain any more than one element of any given SymTabEntry.
  +     */
  +    public Vector getSymbols(QName qname) {
  +        return (Vector) symbolTable.get(qname);
  +    } // get
  +
  +    /**
  +     * Get the entry with the given QName of the given class.  If it does not exist, return null.
  +     */
  +    private SymTabEntry get(QName qname, Class cls) {
  +        Vector v = (Vector) symbolTable.get(qname);
  +        if (v == null) {
  +            return null;
  +        }
  +        else {
  +            for (int i = 0; i < v.size(); ++i) {
  +                SymTabEntry entry = (SymTabEntry) v.elementAt(i);
  +                if (cls.isInstance(entry)) {
  +                    return entry;
  +                }
  +            }
  +            return null;
  +        }
  +    } // get
  +
  +
  +    /**
  +     * Get the type entry for the given qname.
  +     * @param qname
  +     * @param wantElementType boolean that indicates type or element (for type= or ref=)
  +     */
  +    public TypeEntry getTypeEntry(QName qname, boolean wantElementType) {
  +        if (wantElementType) {
  +            return getElement(qname);
  +        } else
  +            return getType(qname);
  +    } // getTypeEntry
  +
  +    /**
  +     * Get the Type TypeEntry with the given QName.  If it doesn't exist, return null.
  +     */
  +    public Type getType(QName qname) {
  +        for (int i = 0; i < types.size(); ++i) {
  +            TypeEntry type = (TypeEntry) types.get(i);
  +            if (type.getQName().equals(qname)
  +                    && (type instanceof Type)) {
  +                return (Type) type;
  +            }
  +        }
  +        return null;
  +    } // getType
  +
  +    /**
  +     * Get the Element TypeEntry with the given QName.  If it doesn't exist, return null.
  +     */
  +    public Element getElement(QName qname) {
  +        for (int i = 0; i < types.size(); ++i) {
  +            TypeEntry type = (TypeEntry) types.get(i);
  +            if (type.getQName().equals(qname) && type instanceof Element) {
  +                return (Element) type;
  +            }
  +        }
  +        return null;
  +    } // getElement
  +
  +    /**
  +     * Get the MessageEntry with the given QName.  If it doesn't exist, return null.
  +     */
  +    public MessageEntry getMessageEntry(QName qname) {
  +        return (MessageEntry) get(qname, MessageEntry.class);
  +    } // getMessageEntry
  +
  +    /**
  +     * Get the PortTypeEntry with the given QName.  If it doesn't exist, return null.
  +     */
  +    public PortTypeEntry getPortTypeEntry(QName qname) {
  +        return (PortTypeEntry) get(qname, PortTypeEntry.class);
  +    } // getPortTypeEntry
  +
  +    /**
  +     * Get the BindingEntry with the given QName.  If it doesn't exist, return null.
  +     */
  +    public BindingEntry getBindingEntry(QName qname) {
  +        return (BindingEntry) get(qname, BindingEntry.class);
  +    } // getBindingEntry
  +
  +    /**
  +     * Get the ServiceEntry with the given QName.  If it doesn't exist, return null.
  +     */
  +    public ServiceEntry getServiceEntry(QName qname) {
  +        return (ServiceEntry) get(qname, ServiceEntry.class);
  +    } // getServiceEntry
  +
  +    /**
  +     * Get the list of all the XML schema types in the symbol table.  In other words, all entries
  +     * that are instances of TypeEntry.
  +     */
  +    public Vector getTypes() {
  +        return types;
  +    } // getTypes
  +
  +    /**
  +     * Invoke this method to associate a namespace URI with a autogenerated Java Package
  +     * name, if an entry is not already present
  +     *
  +     */
  +    public void map (String namespace) {
  +        if (namespaces.get(namespace) == null) {
  +          namespaces.put(namespace, Utils.makePackageName(namespace));
  +        }
  +    }
  +
  +    /**
  +     * Invoke this method to associate a namespace URI with a particular Java Package
  +     */
  +    public void map (String namespace, String pkg) {
  +        namespaces.put(namespace, pkg);
  +    }
  +
  +    public void setNamespaceMap(HashMap map) {
  +        namespaces.putAll(map);
  +    }
  +
  +    /**
  +     * Get the Package name for the specified namespace
  +     */
  +    public String getPackage(String namespace) {
  +        return (String) namespaces.getCreate(namespace);
  +    }
  +
  +    /**
  +     * Get the Package name for the specified QName
  +     */
  +    public String getPackage(QName qName) {
  +        return getPackage(qName.getNamespaceURI());
  +    }
  +
  +    /**
  +     * Dump the contents of the symbol table.  For debugging purposes only.
  +     */
  +    public void dump(java.io.PrintStream out) {
  +        out.println();
  +        out.println(JavaUtils.getMessage("symbolTable00"));
  +        out.println("-----------------------");
  +        Iterator it = symbolTable.values().iterator();
  +        while (it.hasNext()) {
  +            Vector v = (Vector) it.next();
  +            for (int i = 0; i < v.size(); ++i) {
  +                out.println(
  +                        v.elementAt(i).getClass().getName());
  +                out.println(v.elementAt(i));
  +            }
  +        }
  +        out.println("-----------------------");
  +    } // dump
  +
  +
  +    /**
        * Add the given Definition and Document information to the symbol table (including imported
        * symbols), populating it with SymTabEntries for each of the top-level symbols.  When the
        * symbol table has been populated, iterate through it, setting the isReferenced flag
  @@ -199,10 +365,10 @@
           while (it.hasNext()) {
               Vector v = (Vector) it.next();
               for (int i = 0; i < v.size(); ++i) {
  -                if (v.get(i) instanceof RefdType) {
  +                if (v.get(i) instanceof Undefined) {
                       throw new IOException(
                               JavaUtils.getMessage("undefined00",
  -                            "" + ((RefdType)v.get(i)).getQName()));
  +                            "" + ((TypeEntry)v.get(i)).getQName()));
                   }
               }
           }
  @@ -325,7 +491,7 @@
               else if (nodeKind.getLocalPart().equals("part") &&
                        Utils.isWsdlNS(nodeKind.getNamespaceURI())) {
   
  -                // This is a wsdl part.  Create an Type representing the reference
  +                // This is a wsdl part.  Create an TypeEntry representing the reference
                   createTypeFromRef(node);
               }
           }
  @@ -347,13 +513,13 @@
       } // addTypes
   
       /**
  -     * Create a Type from the indicated node, which defines a type
  +     * Create a TypeEntry from the indicated node, which defines a type
        * that represents a complexType, simpleType or element (for ref=).
        */
       private void createTypeFromDef(Node node, boolean isElement,
               boolean belowSchemaLevel) throws IOException {
           // If this is not an element, make sure it is not an anonymous type.
  -        // If it is, the the existing ElementType will be used.  If
  +        // If it is, the the existing DefinedElement will be used.  If
           // not, create a new type.
           if (!isElement &&
               Utils.getAttribute(node, "name") == null) {
  @@ -370,7 +536,7 @@
               map(qName.getNamespaceURI());
   
               // If the node has a type or ref attribute, get the 
  -            // ultimate ref'd type
  +            // ref'd type
               QName refQName = Utils.getNodeTypeRefQName(node);
               if (refQName != null) {
                   // Discover whether type is from a type= or ref=/element=
  @@ -378,51 +544,53 @@
                   if (Utils.getNodeTypeRefQName(node, "type") != null)
                       typeAttr = true;
   
  -                Type refType = null;
  -                while (refQName != null) {
  -                    refType = getTypeEntry(refQName, !typeAttr);
  -                    refQName = null;
  -                    if (refType != null &&
  -                        refType.getNode() != null) {
  -                        refQName = Utils.getNodeTypeRefQName(refType.getNode());
  -                        typeAttr = false;
  -                        if (Utils.getNodeTypeRefQName(node, "type") != null)
  -                            typeAttr = true;
  -                        // A 'collection' type has a node that refers to itself.
  -                        // so we need to break out of the loop to avoid an infinite loop.
  -                        if (refQName != null && refQName.equals(refType.getQName()))
  -                            refQName = null;
  -                    }                         
  -                }
  +                // Now get the TypeEntry
  +                TypeEntry refType = getTypeEntry(refQName, !typeAttr);
  +
                   // Create a type from the referenced type
  -                if (!belowSchemaLevel && refType != null) {
  -                    symbolTablePut(new ElementType(qName, refType, node));
  +                if (!belowSchemaLevel) {
  +                    symbolTablePut(new DefinedElement(qName, refType, node, ""));
                   }
   
               }   
               else {
   
                   // See if this is an array definition.
  -                QName arrayQName = SchemaUtils.getArrayElementQName(node);
  -                if (arrayQName != null) {
  -                    String javaName = getJavaName(arrayQName)+"[]";
  -                    Type arrayType = null;
  +                QName arrayEQName = SchemaUtils.getArrayElementQName(node);
  +                if (arrayEQName != null) {
  +                    TypeEntry arrayType = null;
  +                    // Get the TypeEntry for the element name
  +                    TypeEntry arrayEType = getTypeEntry(arrayEQName, false);
  +                    if (arrayEType == null) {
  +                        // Array Element Type not defined, add one
  +                        if (debug) {
  +                            System.out.println("Create Type From Ref:" + arrayEQName);
  +                        }
  +                        String baseJavaName = Utils.getBaseJavaName(arrayEQName);
  +                        if (baseJavaName != null)
  +                            arrayEType = new BaseJavaType(arrayEQName);
  +                        else
  +                            arrayEType = new UndefinedType(arrayEQName);
  +                        symbolTablePut(arrayEType);
  +                    }
  +
  +                    // Create a defined type or element array of arrayEType.
                       if (isElement) {
  -                        arrayType = new ElementType(qName, javaName, node);
  +                        arrayType = new DefinedElement(qName, arrayEType, node, "[]");
                       } else {
  -                        arrayType = new DefinedType(qName, javaName, node);
  +                        arrayType = new DefinedType(qName, arrayEType, node, "[]");
                       }
                       symbolTablePut(arrayType);
                   }
                   else {
  -                    // Create a Type representing a base type or non-base type
  +                    // Create a TypeEntry representing a base type or non-base type
                       String baseJavaName = Utils.getBaseJavaName(qName);
                       if (baseJavaName != null) {
                           symbolTablePut(new BaseJavaType(qName));
                       }
                       else if (isElement) {
  -                        ElementType element = new ElementType(
  -                                qName, getJavaName(qName), node);
  +                        DefinedElement element = new DefinedElement(
  +                                  qName, getJavaName(qName), node);
                           symbolTablePut(element);
                           element.setShouldEmit(true);
                       }
  @@ -444,34 +612,53 @@
           if (qName != null) {
   
               // Discover whether type is from a type= or ref=/element=
  -            boolean typeAttr = false;
  -            if (Utils.getNodeTypeRefQName(node, "type") != null)
  -                typeAttr = true;
  -
  -            // Get Type or ElementType depending on whether type attr was used.
  -            Type type = getTypeEntry(qName, !typeAttr);
  -            String javaName = getJavaName(qName);
  -
  -            // A symbol table entry is only created if type= and the type is not
  -            // found
  -            if (type == null && typeAttr) {
  -                // Type not defined, add a base java type or a refdType
  -                if (debug) {
  -                    System.out.println("Create Type From Ref:" + qName);
  -                }
  -                String baseJavaName = Utils.getBaseJavaName(qName);
  -                if (baseJavaName != null)
  -                    symbolTablePut(new BaseJavaType(qName));
  -                else if (javaName.indexOf("[") > 0)
  -                    symbolTablePut(new CollectionType(qName, javaName, node));
  -                else 
  -                    symbolTablePut(new RefdType(qName, javaName));
  +            QName typeAttr = Utils.getNodeTypeRefQName(node, "type");
  +            
  +            // Get Type or Element depending on whether type attr was used.
  +            TypeEntry type = getTypeEntry(qName, (typeAttr==null));
  +            
  +            // A symbol table entry is created if the TypeEntry is not found    
  +            if (type == null) {
  +                // See if this is a special qname for collections
  +                if (qName.getLocalPart().indexOf("[") > 0) {
  +                    // Get the TypeEntry for the collection element
  +                    TypeEntry collEl = getTypeEntry(typeAttr, false);
  +                    if (collEl == null) {
  +                        if (debug) {
  +                            System.out.println("Create Type From Ref:" + typeAttr);
  +                        }
  +                        String baseJavaName = Utils.getBaseJavaName(typeAttr);
  +                        if (baseJavaName != null) {
  +                            collEl =new BaseJavaType(typeAttr);
  +                        } else {
  +                            collEl = new UndefinedType(typeAttr);
  +                        }
  +                        symbolTablePut(collEl);
  +                    }
  +                    if (debug) {
  +                        System.out.println("Create Type From Ref:" + qName);
  +                    }
  +                    symbolTablePut(new CollectionType(qName, collEl, node, "[]"));
  +                } else {
  +                    // Add a BaseJavaType or Undefined Type/Element
  +                    
  +                    // Type not defined, add a base java type or a refdType
  +                    if (debug) {
  +                        System.out.println("Create Type From Ref:" + qName);
  +                    }
  +                    String baseJavaName = Utils.getBaseJavaName(qName);
  +                    if (baseJavaName != null)
  +                        symbolTablePut(new BaseJavaType(qName));
  +                    else if (typeAttr != null)
  +                        symbolTablePut(new UndefinedType(qName));
  +                    else
  +                        symbolTablePut(new UndefinedElement(qName));
  +                }
               } else {
                   // Type exists, update shouldEmit flag if necessary
  -                if (type instanceof ElementType &&
  -                    type.isDefined() &&
  -                    type.getJavaName().indexOf("[") < 0 &&
  -                    ((ElementType) type).getDefinedDirectly()) {
  +                if (type instanceof DefinedElement &&
  +                    type.getNode() != null &&
  +                    type.getJavaName().indexOf("[") < 0) {
                       type.setShouldEmit(true);
                   }
               }
  @@ -640,7 +827,7 @@
           // Now that the remaining in and inout parameters are collected, the first entry in the
           // outputs Vector is the return value.  The rest are out parameters.
           if (outputs.size() > 0) {
  -            parameters.returnType = (Type) outputs.get(0);
  +            parameters.returnType = (TypeEntry) outputs.get(0);
               parameters.returnName = (String) outputs.get(1);
               ++parameters.outputs;
               for (int i = 3; i < outputs.size(); i += 2) {
  @@ -680,7 +867,7 @@
       private void addInishParm(Vector inputs, Vector outputs, int index, int outdex, Parameters parameters, boolean trimInput) {
           Parameter p = new Parameter();
           p.name = (String) inputs.get(index);
  -        p.type = (Type) inputs.get(index - 1);
  +        p.type = (TypeEntry) inputs.get(index - 1);
   
           // Should we remove the given parameter type/name entries from the Vector?
           if (trimInput) {
  @@ -709,7 +896,7 @@
       private void addOutParm(Vector outputs, int outdex, Parameters parameters, boolean trim) {
           Parameter p = new Parameter();
           p.name = (String) outputs.get(outdex);
  -        p.type = (Type) outputs.get(outdex - 1);
  +        p.type = (TypeEntry) outputs.get(outdex - 1);
           if (trim) {
               outputs.remove(outdex);
               outputs.remove(outdex - 1);
  @@ -731,10 +918,10 @@
               QName elementName = part.getElementName();
               QName typeName = part.getTypeName();
               if (typeName != null) {
  -                v.add(getTypeEntry(typeName));
  +                v.add(getType(typeName));
                   v.add(part.getName());
               } else if (elementName != null) {
  -                v.add(getElementTypeEntry(elementName));
  +                v.add(getElement(elementName));
                   v.add(part.getName());
               }
           }
  @@ -876,7 +1063,7 @@
                       stuff = def.getMessages();
                       if (stuff.isEmpty()) {
                           for (int i = 0; i < types.size(); ++i) {
  -                            Type type = (Type) types.get(i);
  +                            TypeEntry type = (TypeEntry) types.get(i);
                               setTypeReferences(type, doc);
                           }
                       }
  @@ -919,13 +1106,13 @@
           }
       } // setReferences
   
  -    private void setTypeReferences(Type entry, Document doc) {
  +    private void setTypeReferences(TypeEntry entry, Document doc) {
           // If we don't want to emit stuff from imported files, only set the
           // isReferenced flag if this entry exists in the immediate WSDL file.
           Node node = entry.getNode();
           if (addImports || node == null || node.getOwnerDocument() == doc) {
               entry.setIsReferenced(true);
  -            if (entry instanceof ElementType) {
  +            if (entry instanceof DefinedElement) {
                   QName referentName = Utils.getNodeTypeRefQName(node);
                   if (referentName != null) {
                       // Discover whether type is from a type= or ref=/element=
  @@ -933,7 +1120,7 @@
                       if (Utils.getNodeTypeRefQName(entry.getNode(), "type") != null)
                           typeAttr = true;
   
  -                    Type referent = getTypeEntry(referentName, !typeAttr);
  +                    TypeEntry referent = getTypeEntry(referentName, !typeAttr);
                       if (referent != null) {
                           setTypeReferences(referent, doc);
                       }
  @@ -944,7 +1131,7 @@
           HashSet nestedTypes = Utils.getNestedTypes(node, this);
           Iterator it = nestedTypes.iterator();
           while (it.hasNext()) {
  -            Type nestedType = (Type) it.next();
  +            TypeEntry nestedType = (TypeEntry) it.next();
               if (!nestedType.isReferenced()) {
                   setTypeReferences(nestedType, doc);
               }
  @@ -976,11 +1163,11 @@
           Iterator parts = message.getParts().values().iterator();
           while (parts.hasNext()) {
               Part part = (Part) parts.next();
  -            Type type = getTypeEntry(part.getTypeName());
  +            TypeEntry type = getType(part.getTypeName());
               if (type != null) {
                   setTypeReferences(type, doc);
               }
  -            type = getElementTypeEntry(part.getElementName());
  +            type = getElement(part.getElementName());
               if (type != null) {
                   setTypeReferences(type, doc);
               }
  @@ -1124,15 +1311,16 @@
           if (get(name, entry.getClass()) == null) {
               // An entry of the given qname of the given type doesn't exist yet.
   
  -            if (entry instanceof Type && get(name, RefdType.class) != null) {
  -                // A referenced entry exists in the symbol table, which means
  +            if (entry instanceof Type && 
  +                get(name, UndefinedType.class) != null) {
  +                // A undefined type  exists in the symbol table, which means
                   // that the type is used, but we don't yet have a definition for
                   // the type.  Now we DO have a definition for the type, so
  -                // replace the existing referenced type with the real type.
  +                // replace the existing undefined type with the real type.
                   Vector v = (Vector) symbolTable.get(name);
                   for (int i = 0; i < v.size(); ++i) {
                       Object oldEntry = v.elementAt(i);
  -                    if (oldEntry instanceof RefdType) {
  +                    if (oldEntry instanceof UndefinedType) {
   
                           // Replace it in the symbol table
                           v.setElementAt(entry, i);
  @@ -1143,8 +1331,36 @@
                                   types.setElementAt(entry, j);
                               }
                           }
  +                        
  +                        // Update all of the entries that refer to the unknown type
  +                        ((UndefinedType)oldEntry).update((Type)entry);
                       }
                   }
  +            } else if (entry instanceof Element && 
  +                get(name, UndefinedElement.class) != null) {
  +                // A undefined element exists in the symbol table, which means
  +                // that the element is used, but we don't yet have a definition for
  +                // the element.  Now we DO have a definition for the element, so
  +                // replace the existing undefined element with the real element.
  +                Vector v = (Vector) symbolTable.get(name);
  +                for (int i = 0; i < v.size(); ++i) {
  +                    Object oldEntry = v.elementAt(i);
  +                    if (oldEntry instanceof UndefinedElement) {
  +
  +                        // Replace it in the symbol table
  +                        v.setElementAt(entry, i);
  +
  +                        // Replace it in the types Vector
  +                        for (int j = 0; j < types.size(); ++j) {
  +                            if (types.elementAt(j) == oldEntry) {
  +                                types.setElementAt(entry, j);
  +                            }
  +                        }
  +                        
  +                        // Update all of the entries that refer to the unknown type
  +                        ((Undefined)oldEntry).update((Element)entry);
  +                    }
  +                }
               }
               else {
                   // Add this entry to the symbol table
  @@ -1154,7 +1370,7 @@
                       symbolTable.put(name, v);
                   }
                   v.add(entry);
  -                if (entry instanceof Type) {
  +                if (entry instanceof TypeEntry) {
                       types.add(entry);
                   }
               }
  @@ -1165,169 +1381,5 @@
           }
       } // symbolTablePut
   
  -    /**
  -     * Get the raw symbol table HashMap.
  -     */
  -    public HashMap getHashMap() {
  -        return symbolTable;
  -    } // getHashMap
  -
  -    /**
  -     * Get the list of entries with the given QName.  Since symbols can share QNames, this list is
  -     * necessary.  This list will not contain any more than one element of any given SymTabEntry.
  -     */
  -    public Vector getSymbols(QName qname) {
  -        return (Vector) symbolTable.get(qname);
  -    } // get
  -
  -    /**
  -     * Get the entry with the given QName of the given class.  If it does not exist, return null.
  -     */
  -    private SymTabEntry get(QName qname, Class cls) {
  -        Vector v = (Vector) symbolTable.get(qname);
  -        if (v == null) {
  -            return null;
  -        }
  -        else {
  -            for (int i = 0; i < v.size(); ++i) {
  -                SymTabEntry entry = (SymTabEntry) v.elementAt(i);
  -                if (cls.isInstance(entry)) {
  -                    return entry;
  -                }
  -            }
  -            return null;
  -        }
  -    } // get
  -
  -
  -    /**
  -     * Get the type entry for the given qname.
  -     * @param qname
  -     * @param wantElementType boolean that indicates type or element (for type= or ref=)
  -     */
  -    public Type getTypeEntry(QName qname, boolean wantElementType) {
  -        if (wantElementType) {
  -            return getElementTypeEntry(qname);
  -        } else
  -            return getTypeEntry(qname);
  -    } // getTypeEntry
  -
  -    /**
  -     * Get the non-ElementType TypeEntry with the given QName.  If it doesn't exist, return null.
  -     */
  -    public Type getTypeEntry(QName qname) {
  -        for (int i = 0; i < types.size(); ++i) {
  -            Type type = (Type) types.get(i);
  -            if (type.getQName().equals(qname)
  -                    && !(type instanceof ElementType)) {
  -                return type;
  -            }
  -        }
  -        return null;
  -    } // getTypeEntry
  -
  -    /**
  -     * Get the ElementType entry with the given QName.  If it doesn't exist, return null.
  -     */
  -    public ElementType getElementTypeEntry(QName qname) {
  -        for (int i = 0; i < types.size(); ++i) {
  -            Type type = (Type) types.get(i);
  -            if (type.getQName().equals(qname) && type instanceof ElementType) {
  -                return (ElementType) type;
  -            }
  -        }
  -        return null;
  -    } // getElementTypeEntry
  -
  -    /**
  -     * Get the MessageEntry with the given QName.  If it doesn't exist, return null.
  -     */
  -    public MessageEntry getMessageEntry(QName qname) {
  -        return (MessageEntry) get(qname, MessageEntry.class);
  -    } // getMessageEntry
  -
  -    /**
  -     * Get the PortTypeEntry with the given QName.  If it doesn't exist, return null.
  -     */
  -    public PortTypeEntry getPortTypeEntry(QName qname) {
  -        return (PortTypeEntry) get(qname, PortTypeEntry.class);
  -    } // getPortTypeEntry
  -
  -    /**
  -     * Get the BindingEntry with the given QName.  If it doesn't exist, return null.
  -     */
  -    public BindingEntry getBindingEntry(QName qname) {
  -        return (BindingEntry) get(qname, BindingEntry.class);
  -    } // getBindingEntry
  -
  -    /**
  -     * Get the ServiceEntry with the given QName.  If it doesn't exist, return null.
  -     */
  -    public ServiceEntry getServiceEntry(QName qname) {
  -        return (ServiceEntry) get(qname, ServiceEntry.class);
  -    } // getServiceEntry
  -
  -    /**
  -     * Get the list of all the XML schema types in the symbol table.  In other words, all entries
  -     * that are instances of TypeEntry.
  -     */
  -    public Vector getTypes() {
  -        return types;
  -    } // getTypes
  -
  -    /**
  -     * Invoke this method to associate a namespace URI with a autogenerated Java Package
  -     * name, if an entry is not already present
  -     *
  -     */
  -    public void map (String namespace) {
  -        if (namespaces.get(namespace) == null) {
  -          namespaces.put(namespace, Utils.makePackageName(namespace));
  -        }
  -    }
  -
  -    /**
  -     * Invoke this method to associate a namespace URI with a particular Java Package
  -     */
  -    public void map (String namespace, String pkg) {
  -        namespaces.put(namespace, pkg);
  -    }
  -
  -    public void setNamespaceMap(HashMap map) {
  -        namespaces.putAll(map);
  -    }
  -
  -    /**
  -     * Get the Package name for the specified namespace
  -     */
  -    public String getPackage(String namespace) {
  -        return (String) namespaces.getCreate(namespace);
  -    }
  -
  -    /**
  -     * Get the Package name for the specified QName
  -     */
  -    public String getPackage(QName qName) {
  -        return getPackage(qName.getNamespaceURI());
  -    }
  -
  -    /**
  -     * Dump the contents of the symbol table.  For debugging purposes only.
  -     */
  -    public void dump(java.io.PrintStream out) {
  -        out.println();
  -        out.println(JavaUtils.getMessage("symbolTable00"));
  -        out.println("-----------------------");
  -        Iterator it = symbolTable.values().iterator();
  -        while (it.hasNext()) {
  -            Vector v = (Vector) it.next();
  -            for (int i = 0; i < v.size(); ++i) {
  -                out.println(
  -                        v.elementAt(i).getClass().getName());
  -                out.println(v.elementAt(i));
  -            }
  -        }
  -        out.println("-----------------------");
  -    } // dump
   
   } // class SymbolTable
  
  
  
  1.2       +9 -87     xml-axis/java/src/org/apache/axis/wsdl/toJava/Type.java
  
  Index: Type.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/Type.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Type.java	2001/12/11 15:08:47	1.1
  +++ Type.java	2001/12/13 17:33:17	1.2
  @@ -60,109 +60,31 @@
   import javax.wsdl.QName;
   
   /**
  - * This class represents a type that is supported by the WSDL2Java emitter.
  - * A Type has a QName representing its XML name and a Java Name, which
  - * is its full java name.  The Type may also have a Node, which locates
  - * the definition of the emit type in the xml.
  - * A Type object extends SymTabEntry and is built by the SymbolTable class for
  - * each XML complexType, simpleType, or element (necessary for ref=) that is
  - * defined or encountered.
  + * This class represents a TypeEntry that is a type (complexType, simpleType, etc.
    *
    * @author Rich Scheuerle  (scheu@us.ibm.com)
    */
  -public class Type extends SymTabEntry {
  +public abstract class Type extends TypeEntry {
   
  -    private Node    node;        // Element node
  -    private boolean shouldEmit;  // Indicates if this Type should have code emitted for it.
  -    private boolean isBaseType;  // Indicates if represented by a java primitive or util class
  -
       /**
        * Create a Type object for an xml construct name that represents a base java type
        */
       protected Type(QName pqName) {
  -        super(pqName, Utils.getBaseJavaName(pqName));
  -        node = null;
  -        shouldEmit = false;
  -        isBaseType = true;
  +        super(pqName);
       }
          
       /**
  -     * Create a Type object for an xml construct that references another type.        
  -     * The Type corresponding to the ultimate reference type is passed as refType
  -     */  
  -    protected Type(QName pqName, Type refType, Node pNode) {
  -        super(pqName, refType.getJavaName());
  -        node = pNode;
  -        shouldEmit = false;
  -        isBaseType = (refType.getBaseType() != null);
  +     * Create a TypeEntry object for an xml construct that references a type that has 
  +     * not been defined yet.  Defer processing until refType is known.
  +     */ 
  +    protected Type(QName pqName, TypeEntry refType, Node pNode, String dims) {
  +        super(pqName, refType, pNode, dims);
       }
          
       /**
        * Create a Type object for an xml construct that is not a base java type
        */  
       protected Type(QName pqName, String pjName, Node pNode) {
  -        super(pqName, pjName);
  -        node  = pNode;
  -        shouldEmit  = (node != null);
  -        isBaseType = false;
  -    }
  -
  -    /**
  -     * Query Java Mapping Name
  -     */
  -    public String getJavaName() {
  -        return name;
  -    }
  -
  -    /**
  -     * Query Java Mapping Name
  -     */
  -    public Node getNode() {
  -        return node;
  -    }
  -
  -    /**
  -     * Query whether a Node defining the type exists.
  -     */
  -    public boolean isDefined() {
  -        return (node != null);
  -    }
  -
  -    /**
  -     * Query whether a Node should be emitted.
  -     */
  -    public boolean getShouldEmit() {
  -        return shouldEmit;
  -    }
  -
  -    /**
  -     * Indicate whether a Node should be emitted.
  -     */
  -    public void setShouldEmit(boolean pShouldEmit) {
  -        shouldEmit = pShouldEmit;
  -    }
  -
  -    /**
  -     * Returns the Java Base Type Name.
  -     * For example if the Type represents a schema integer, "int" is returned.
  -     * If this is a user defined type, null is returned.
  -     */
  -    public String getBaseType() {
  -        if (isBaseType) {
  -            return name;
  -        }
  -        else {
  -            return null;
  -        }
  -    }
  -
  -    /**
  -     * Get string representation.
  -     */
  -    public String toString() {
  -        return super.toString() + 
  -            "Emit?: " + shouldEmit + "\n" + 
  -            "Base?: " + isBaseType + "\n" + 
  -            "Node:  " + getNode() + "\n";
  +        super(pqName, pjName, pNode);
       }
   };
  
  
  
  1.3       +6 -5      xml-axis/java/src/org/apache/axis/wsdl/toJava/Utils.java
  
  Index: Utils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/Utils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Utils.java	2001/12/13 17:11:57	1.2
  +++ Utils.java	2001/12/13 17:33:17	1.3
  @@ -517,7 +517,8 @@
       /**
        * Given a type, return the Java mapping of that type's holder.
        */
  -    public static String holder(Type type, SymbolTable symbolTable) {
  +
  +    public static String holder(TypeEntry type, SymbolTable symbolTable) {
           String typeValue = type.getName();
           if (typeValue.equals("java.lang.String")) {
               return "javax.xml.rpc.holders.StringHolder";
  @@ -582,7 +583,7 @@
   
       /**
        * This method returns a set of all the nested types.
  -     * Nested types are types declared within this Type (or descendents)
  +     * Nested types are types declared within this TypeEntry (or descendents)
        * plus any extended types and the extended type nested types
        * The elements of the returned HashSet are Types.
        */
  @@ -601,12 +602,12 @@
                   if (!types.contains(v.get(i))) {
                       types.add(v.get(i));
                       getNestedTypes(
  -                            ((Type) v.get(i)).getNode(), types, symbolTable);
  +                            ((TypeEntry) v.get(i)).getNode(), types, symbolTable);
                   }
               }
           }
           // Process extended types
  -        Type extendType = SchemaUtils.getComplexElementExtensionBase(type, symbolTable);
  +        TypeEntry extendType = SchemaUtils.getComplexElementExtensionBase(type, symbolTable);
           if (extendType != null) {
               if (!types.contains(extendType)) {
                   types.add(extendType);
  @@ -616,7 +617,7 @@
   
           // Process array element types
           QName elementQName = SchemaUtils.getArrayElementQName(type);
  -        Type elementType = symbolTable.getTypeEntry(elementQName);
  +        TypeEntry elementType = symbolTable.getType(elementQName);
           if (elementType != null) {
               if (!types.contains(elementType)) {
                   types.add(elementType);
  
  
  
  1.2       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/WriterFactory.java
  
  Index: WriterFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/WriterFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WriterFactory.java	2001/12/11 15:08:47	1.1
  +++ WriterFactory.java	2001/12/13 17:33:17	1.2
  @@ -104,7 +104,7 @@
       /**
        * Get a Writer implementation that will generate bindings for the given Type.
        */
  -    public Writer getWriter(Type type, SymbolTable symbolTable);
  +    public Writer getWriter(TypeEntry type, SymbolTable symbolTable);
   
       /**
        * Get a Writer implementation that will generate anything that doesn't
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/wsdl/toJava/DefinedElement.java
  
  Index: DefinedElement.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.toJava;
  
  
  import org.w3c.dom.Node;
  
  import javax.wsdl.QName;
  
  /**
   * This Type is for a QName that is an element, these types are only emitted if 
   * referenced by a ref= or an element=.
   * An element type can be defined inline or it can be defined via
   * a ref/type attribute.
   */
  public class DefinedElement extends Element {
      /**
       * Create an element type defined by a ref/type attribute
       */
      public DefinedElement(QName pqName, TypeEntry refType, Node pNode, String dims) {
          super(pqName, refType, pNode, dims);
          setShouldEmit(false);  // No need to emit since code will use ref info
      };
      /**
       * Create an element type defined directly.               
       */
      public DefinedElement(QName pqName, String pjName, Node pNode) {
          super(pqName, pjName, pNode);
          setShouldEmit(false);  // Only emit if refd
      }
  };
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/wsdl/toJava/Element.java
  
  Index: Element.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.toJava;
  
  
  import org.w3c.dom.Node;
  
  import javax.wsdl.QName;
  
  /**
   * This class represents a TypeEntry that is a type (complexType, simpleType, etc.
   *
   * @author Rich Scheuerle  (scheu@us.ibm.com)
   */
  public abstract class Element extends TypeEntry {
  
      /**
       * Create an Element object for an xml construct that references a type that has 
       * not been defined yet.  Defer processing until refType is known.
       */ 
      protected Element(QName pqName, TypeEntry refType, Node pNode, String dims) {
          super(pqName, refType, pNode, dims);
      }
         
      /**
       * Create a Element object for an xml construct that is not a base java type
       */  
      protected Element(QName pqName, String pjName, Node pNode) {
          super(pqName, pjName, pNode);
      }
  };
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/wsdl/toJava/TypeEntry.java
  
  Index: TypeEntry.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.toJava;
  
  import org.apache.axis.utils.JavaUtils;
  import org.w3c.dom.Node;
  
  import javax.wsdl.QName;
  import java.io.IOException;
  
  /**
   * This class represents a wsdl types entry that is supported by the WSDL2Java emitter.
   * A TypeEntry has a QName representing its XML name and a Java Name, which
   * is its full java name.  The TypeEntry may also have a Node, which locates
   * the definition of the emit type in the xml.
   * A TypeEntry object extends SymTabEntry and is built by the SymbolTable class for
   * each supported root complexType, simpleType, and elements that are
   * defined or encountered.
   *
   *                    SymTabEntry
   *                        |
   *                    TypeEntry
   *                  /           \
   *            Type                Element
   *             |                     |
   * (BaseJavaType,                (DefinedElement,
   *  CollectionType                UndefinedElement)
   *  DefinedType,
   *  UndefinedType)
   *
   *  UndefinedType and UndefinedElement are placeholders when the real type or element
   *  is not encountered yet.  Both of these implement the Undefined interface.
   *  
   *  A TypeEntry whose java (or other language) name depends on an Undefined type, will
   *  have its java name initialization deferred until the Undefined type is replaced with
   *  a defined type.  The updateUndefined() method is invoked by the UndefinedDelegate to
   *  update the information.
   *
   *  Each TypeEntry whose language name depends on another TypeEntry will have the refType
   *  field set.  For example:
   *      <element name="foo" type="bar" />
   *  The TypeEntry for "foo" will have a refType set to the TypeEntry of "bar".
   * 
   *  Another Example:
   *     <xsd:complexType name="hobbyArray">
   *       <xsd:complexContent>
   *         <xsd:restriction base="soapenc:Array">
   *           <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
   *         </xsd:restriction>
   *       </xsd:complexContent>
   *     </xsd:complexType>
   *  The TypeEntry for "hobbyArray" will have a refType that locates the TypeEntry for xsd:string
   *  and the dims field will be "[]"
   *
   *
   *
   * @author Rich Scheuerle  (scheu@us.ibm.com)
   */
  public abstract class TypeEntry extends SymTabEntry {
  
      protected Node    node;      // Node
  
      protected TypeEntry refType; // Some TypeEntries refer to other types.
                                   
  
      protected String  dims;      // If refType is an element, dims indicates 
                                   // the array dims (for example "[]").
                                
      protected boolean undefined; // If refType is an Undefined type 
                                   // (or has a refType that is Undefined) 
                                   // then the undefined flag is set.
                                   //  The java name cannot be determined
                                   // until the Undefined type is found.
      protected boolean shouldEmit;// Indicates if this TypeEntry should 
                                   // have code emitted for it.
      protected boolean isBaseType;// Indicates if represented by a 
                                   // java primitive or util class
  
      /**
       * Create a TypeEntry object for an xml construct that references another type. 
       * Defer processing until refType is known.
       */  
      protected TypeEntry(QName pqName, TypeEntry refType, Node pNode, String dims) {
          super(pqName, "defer name");  // Set super qname (defer name)
          node = pNode;
          this.undefined = refType.undefined;
          this.refType = refType;
          if (dims == null)
              dims = "";
          this.dims = dims;
          
          if (refType.undefined) {
              // Need to defer processing until known.
              TypeEntry uType = refType;
              while (!(uType instanceof Undefined)) {
                  uType = uType.refType;
              }
              ((Undefined)uType).register(this);
          } else {
              setName(refType.getName() + dims);             
              isBaseType = (refType.getBaseType() != null && dims.equals(""));
          }
          shouldEmit = false;
          
          //System.out.println(toString());
  
      }
         
      /**
       * Create a TypeEntry object for an xml construct that is not a base java type
       */  
      protected TypeEntry(QName pqName, String pjName, Node pNode) {
          super(pqName, pjName);
          node  = pNode;
          refType = null;
          undefined = false;
          dims = "";
          shouldEmit  = (node != null);
          isBaseType = false;
          //System.out.println(toString());
      }
  
      /**
       * Create a TypeEntry object for an xml construct name that represents a base java type
       */
      protected TypeEntry(QName pqName) {
          super(pqName, Utils.getBaseJavaName(pqName));
          node = null;
          undefined = false;
          dims = "";
          shouldEmit = false;
          isBaseType = true;
          //System.out.println(toString());
      }
         
  
      /**
       * UpdateUndefined is called when the ref TypeEntry is finally known.
       */
      protected boolean updateUndefined(TypeEntry oldRef, TypeEntry newRef) throws IOException {
          // Replace refType with the new one if applicable
          if (refType == oldRef) {
              refType = newRef;
              // Detect a loop
              TypeEntry te = refType;
              while(te != null && te != this) {
                  te = te.refType;
              }
              if (te == this) {
                  // Detected a loop.
                  undefined = false;
                  setName("");
                  isBaseType = false;
                  node = null;                   
                  throw new IOException(JavaUtils.getMessage("undefinedloop00", getQName().toString()));
              }
          }
  
          // Update information if refType is now defined
          if (refType != null && undefined && refType.undefined==false) {
              undefined = false;
              setName(refType.getName() + dims);             
              isBaseType = (refType.getBaseType() != null && dims.equals(""));
          }
          return undefined;
      }
  
      /**
       * Query Java Mapping Name
       */
      public String getJavaName() {
          return name;
      }
  
      /**
       * Query Java Mapping Name
       */
      public Node getNode() {
          return node;
      }
  
      /**
       * Query whether a Node should be emitted.
       */
      public boolean getShouldEmit() {
          return shouldEmit;
      }
  
      /**
       * Indicate whether a Node should be emitted.
       */
      public void setShouldEmit(boolean pShouldEmit) {
          shouldEmit = pShouldEmit;
      }
  
      /**
       * Returns the Java Base Type Name.
       * For example if the Type represents a schema integer, "int" is returned.
       * If this is a user defined type, null is returned.
       */
      public String getBaseType() {
          if (isBaseType) {
              return name;
          }
          else {
              return null;
          }
      }
  
      /**
       * Get string representation.
       */
      public String toString() {
          return toString("");
      }
  
      /**
       * Get string representation with indentation
       */
      protected String toString(String indent) {
          String refString = indent + "RefType:       null \n";
          if (refType != null)
              refString = indent + "RefType:\n" + refType.toString(indent + "  ") + "\n";
          return super.toString(indent) + 
              indent + "Class:         " + this.getClass().getName() + "\n" + 
              indent + "Emit?:         " + shouldEmit + "\n" + 
              indent + "Base?:         " + isBaseType + "\n" + 
              indent + "Undefined?:    " + undefined + "\n" + 
              indent + "Node:          " + getNode() + "\n" +
              refString;
      }
  };
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/wsdl/toJava/Undefined.java
  
  Index: Undefined.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.toJava;
  
  import java.io.IOException;
  
  /**
   * This Undefined interface is implemented by UndefinedType and UndefinedElement.
   */
  public interface Undefined {
      /**
       *  Register referrant TypeEntry so that 
       *  the code can update the TypeEntry when the Undefined Element or Type is defined
       */
      public void register(TypeEntry referrant);
  
      /**
       *  Call update with the actual TypeEntry.  This updates all of the
       *  referrant TypeEntry's that were registered.
       */
      public void update(TypeEntry def) throws IOException;
        
  };
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/wsdl/toJava/UndefinedDelegate.java
  
  Index: UndefinedDelegate.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.toJava;
  
  
  
  import java.io.IOException;
  import java.util.Vector;
  import javax.wsdl.QName;
  import org.w3c.dom.Node;
  
  /**
   * This Undefined interface is implemented by UndefinedType and UndefinedElement.
   */
  public class UndefinedDelegate implements Undefined {
  
      private Vector list;
      private TypeEntry undefinedType;
  
      /**
       * Constructor
       */
      UndefinedDelegate(TypeEntry te) {
          list = new Vector();
          undefinedType = te;
      }
     /**
       *  Register referrant TypeEntry so that 
       *  the code can update the TypeEntry when the Undefined Element or Type is defined
       */
      public void register(TypeEntry referrant) {
          list.add(referrant);
      }
  
      /**
       *  Call update with the actual TypeEntry.  This updates all of the
       *  referrant TypeEntry's that were registered.
       */
      public void update(TypeEntry def) throws IOException {
          // Process list until every TypeEntry is defined
          boolean done = false;
          while (!done) {
              done = true;  // Assume this is the last pass
  
              // Call updatedUndefined for all items on the list
              for (int i=0; i < list.size() ; i++) {
                  TypeEntry te = (TypeEntry) list.elementAt(i);
                  if (te.updateUndefined(undefinedType, def))
                      done = false;  // Items still undefined, need another pass
              }
          }
      }
  };
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/wsdl/toJava/UndefinedElement.java
  
  Index: UndefinedElement.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.toJava;
  
  
  import java.io.IOException;
  import javax.wsdl.QName;
  
  import org.w3c.dom.Node;
  
  
  /**
   * This represents a QName found in a reference but is not defined.
   * If the type is later defined, the UndefinedType is replaced with a new Type
   */
  public class UndefinedElement extends Element implements Undefined {
  
      private UndefinedDelegate delegate = null;
  
      /**
       * Construct a referenced (but as of yet undefined) element
       */
      public UndefinedElement(QName pqName) {
          super(pqName, "", null);
          undefined = true;
          delegate = new UndefinedDelegate(this);
      }
  
      /**
       *  Register referrant TypeEntry so that 
       *  the code can update the TypeEntry when the Undefined Element or Type is defined
       */
      public void register(TypeEntry referrant) {
          delegate.register(referrant);
      }
  
      /**
       *  Call update with the actual TypeEntry.  This updates all of the
       *  referrant TypeEntry's that were registered.
       */
      public void update(TypeEntry def) throws IOException {
          delegate.update(def);
      }
  };
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/wsdl/toJava/UndefinedType.java
  
  Index: UndefinedType.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.toJava;
  
  import java.io.IOException;
  
  import javax.wsdl.QName;
  
  /**
   * This represents a QName found in a reference but is not defined.
   * If the type is later defined, the UndefinedType is replaced with a new Type
   */
  public class UndefinedType extends Type implements Undefined {
  
     private UndefinedDelegate delegate = null;
  
      /**
       * Construct a referenced (but as of yet undefined) type 
       */
      public UndefinedType(QName pqName) {
          super(pqName, "", null);
          undefined = true;
          delegate = new UndefinedDelegate(this);
      }
  
      /**
       *  Register referrant TypeEntry so that 
       *  the code can update the TypeEntry when the Undefined Element or Type is defined
       */
      public void register(TypeEntry referrant) {
          delegate.register(referrant);
      }
  
      /**
       *  Call update with the actual TypeEntry.  This updates all of the
       *  referrant TypeEntry's that were registered.
       */
      public void update(TypeEntry def) throws IOException {
          delegate.update(def);
      }
  };
  
  
  
  1.2       +0 -4      xml-axis/java/test/refattr/refattr.wsdl
  
  Index: refattr.wsdl
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/refattr/refattr.wsdl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- refattr.wsdl	2001/12/08 04:23:38	1.1
  +++ refattr.wsdl	2001/12/13 17:33:18	1.2
  @@ -47,10 +47,6 @@
         <!-- no mangling should occur since the same java type is used -->
         <xsd:element name="enum" type="typens:enum"/>
   
  -      <!-- The following are illegal.  Should not generate anything. But should not cause abend -->
  -      <xsd:element name="self"  ref="typens:self" />
  -      <xsd:element name="foo"   ref="typens:undefined_element" />
  -
         <!-- This is a 'forward use' of a type.  Not sure if this is legal, but we currently accept it -->
         <xsd:element name="forward"  type="typens:forward" />
         <xsd:complexType name="forward">
  
  
  
  1.46      +1 -1      xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml
  
  Index: Wsdl2javaTestSuite.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- Wsdl2javaTestSuite.xml	2001/12/10 23:23:01	1.45
  +++ Wsdl2javaTestSuite.xml	2001/12/13 17:33:18	1.46
  @@ -67,7 +67,7 @@
           <mapping namespace="urn:MultiRefTest2" package="test.multiref"/>
       </wsdl2java>
   
  -    <!-- MultiRef Test -->
  +    <!-- RefAttr Test -->
       <wsdl2java url="test/refattr/refattr.wsdl"
                  output="build/work"
                  deployscope="session"
  
  
  
  1.2       +2 -1      xml-axis/java/test/wsdl/filegen/FileGen.wsdl
  
  Index: FileGen.wsdl
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/filegen/FileGen.wsdl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileGen.wsdl	2001/12/10 21:19:04	1.1
  +++ FileGen.wsdl	2001/12/13 17:33:19	1.2
  @@ -51,7 +51,8 @@
       <part name="ISBN" type="xsd:string" />
     </message>
     <message name="otheropHttpGetOut">
  -    <part name="Body" element="xsd:string" />
  +    <!-- <part name="Body" element="xsd:string" /> -->
  +    <part name="Body" type="xsd:string" />
     </message>
   
     <!-- unused fault, should not be emitted -->
  
  
  

Mime
View raw message