You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yoko-commits@incubator.apache.org by mv...@apache.org on 2006/11/08 14:28:59 UTC

svn commit: r472506 - in /incubator/yoko/branches/idltowsdl_anon_refactor/tools/src: main/java/org/apache/yoko/tools/processors/idl/ test/java/org/apache/yoko/tools/processors/ test/resources/idl/

Author: mvescovi
Date: Wed Nov  8 06:28:59 2006
New Revision: 472506

URL: http://svn.apache.org/viewvc?view=rev&rev=472506
Log:
Adding support for IDL anonymous arrays.

Added:
    incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/Anonarray.idl
    incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonarray.wsdl   (with props)
Modified:
    incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ArrayVisitor.java
    incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/DeclaratorVisitor.java
    incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ExceptionVisitor.java
    incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/StructVisitor.java
    incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/UnionVisitor.java
    incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java

Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ArrayVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ArrayVisitor.java?view=diff&rev=472506&r1=472505&r2=472506
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ArrayVisitor.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ArrayVisitor.java Wed Nov  8 06:28:59 2006
@@ -70,8 +70,18 @@
 
         AST firstSizeNode = node.getFirstChild();
         AST nextSizeNode = firstSizeNode.getNextSibling();
-        int index = 0;
         Types result = null;
+        Long index = new Long(0);
+
+        // find first available index
+        if (identifierNode == null) {
+            QName qname = null;
+            do {
+                index++;    
+                qname = new QName(schema.getTargetNamespace(),
+                                  generateAnonymousName(index));
+            } while (schema.getTypeByName(qname) != null);
+        }
         
         // process all anonarrays, skip first array as it might not be anonymous
         if (nextSizeNode != null) {
@@ -92,7 +102,7 @@
             ctype = generateCorbaArray(name, size, result.getCorbaType().getQName());
         } else {
             // anonymous array
-            String name = "_1_" + getScope().tail();
+            String name = generateAnonymousName(index);
             stype = generateSchemaArray(name, size, result.getSchemaType().getQName());
             ctype = generateCorbaAnonarray(name, size, result.getCorbaType().getQName());            
         }
@@ -103,9 +113,12 @@
 
         // add corbaType
         typeMap.getStructOrExceptionOrUnion().add(ctype);
+        
+        setSchemaType(stype);
+        setCorbaType(ctype);
     }
 
-    private Types doAnonarray(AST node, int index, QName stype, QName ctype) {
+    private Types doAnonarray(AST node, Long index, QName stype, QName ctype) {
         Types result = new Types();
         
         if (node != null) {
@@ -117,8 +130,7 @@
             result = doAnonarray(next, index, stype, ctype);
             
             Long size = new Long(node.toString());
-            Long id = new Long(index);
-            String name = "_" + id.toString() + "_" + getScope().tail();
+            String name = generateAnonymousName(index);
             
             if (result.getSchemaType() == null) {
                 result.setSchemaType(generateSchemaArray(name, size, stype));
@@ -182,6 +194,14 @@
         return anonarray;
     }
     
+    private String generateAnonymousName(Long index) {
+        StringBuffer name = new StringBuffer();
+        name.append("_");
+        name.append(index.toString());
+        name.append("_");
+        name.append(getScope().tail());
+        return name.toString();
+    }
     class Types {
         private XmlSchemaType schemaType;
         private CorbaTypeImpl corbaType;

Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/DeclaratorVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/DeclaratorVisitor.java?view=diff&rev=472506&r1=472505&r2=472506
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/DeclaratorVisitor.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/DeclaratorVisitor.java Wed Nov  8 06:28:59 2006
@@ -39,9 +39,6 @@
     // <complex_declarator> ::= <array_declarator>
 
 
-    private XmlSchemaType schemaType;
-    private CorbaTypeImpl corbaType;
-    
     public DeclaratorVisitor(Scope scope,
                              XmlSchemaCollection xmlSchemas,
                              XmlSchema xmlSchema,
@@ -49,8 +46,8 @@
                              XmlSchemaType schemaTypeRef,
                              CorbaTypeImpl corbaTypeRef) {
         super(scope, xmlSchemas, xmlSchema, corbaTypeMap);
-        schemaType = schemaTypeRef;
-        corbaType = corbaTypeRef;
+        setSchemaType(schemaTypeRef);
+        setCorbaType(corbaTypeRef);
     }
     
     public void visit(AST node) {
@@ -91,18 +88,18 @@
                                                          schemas,
                                                          schema,
                                                          typeMap,
-                                                         schemaType,
-                                                         corbaType,
+                                                         getSchemaType(),
+                                                         getCorbaType(),
                                                          node); 
             arrayVisitor.visit(node);
 
         } else {
             // add schemaType
-            schema.getItems().add(schemaType);
-            schema.addType(schemaType);
+            schema.getItems().add(getSchemaType());
+            schema.addType(getSchemaType());
 
             // add corbaType
-            typeMap.getStructOrExceptionOrUnion().add(corbaType);
+            typeMap.getStructOrExceptionOrUnion().add(getCorbaType());
         }
 
     }

Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ExceptionVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ExceptionVisitor.java?view=diff&rev=472506&r1=472505&r2=472506
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ExceptionVisitor.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ExceptionVisitor.java Wed Nov  8 06:28:59 2006
@@ -113,6 +113,20 @@
             XmlSchemaType stype = visitor.getSchemaType();
             CorbaTypeImpl ctype = visitor.getCorbaType();
             
+            // needed for anonymous arrays in exceptions
+            if (ArrayVisitor.accept(memberNode)) {
+                ArrayVisitor arrayVisitor = new ArrayVisitor(newScope,
+                                                             schemas,
+                                                             schema,
+                                                             typeMap,
+                                                             stype,
+                                                             ctype,
+                                                             null);
+                arrayVisitor.visit(memberNode);
+                stype = arrayVisitor.getSchemaType();
+                ctype = arrayVisitor.getCorbaType();
+            }
+
             // xmlschema:member
             XmlSchemaElement member = new XmlSchemaElement();
             String memberName = memberNode.toString();

Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/StructVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/StructVisitor.java?view=diff&rev=472506&r1=472505&r2=472506
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/StructVisitor.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/StructVisitor.java Wed Nov  8 06:28:59 2006
@@ -59,7 +59,7 @@
         // <member> ::= <type_spec> <declarators> ";"
         
         AST identifierNode = node.getFirstChild();
-        
+        Scope newScope = new Scope(getScope(), identifierNode);
         // xmlschema:struct
         String structName = identifierNode.toString();
         XmlSchemaComplexType complexType = new XmlSchemaComplexType(schema);
@@ -85,7 +85,7 @@
             XmlSchemaType schemaType = null;
             CorbaTypeImpl corbaType = null;
             try {
-                TypesVisitor visitor = new TypesVisitor(new Scope(getScope(), identifierNode), 
+                TypesVisitor visitor = new TypesVisitor(newScope, 
                                                         schemas,
                                                         schema,
                                                         typeMap,
@@ -100,6 +100,20 @@
                 System.exit(1);
             }
 
+            // needed for anonymous arrays in structs 
+            if (ArrayVisitor.accept(memberNode)) {
+                ArrayVisitor arrayVisitor = new ArrayVisitor(newScope,
+                                                             schemas,
+                                                             schema,
+                                                             typeMap,
+                                                             schemaType,
+                                                             corbaType,
+                                                             null);
+                arrayVisitor.visit(memberNode);
+                schemaType = arrayVisitor.getSchemaType();
+                corbaType = arrayVisitor.getCorbaType();
+            }
+            
             // xmlschema:member
             XmlSchemaElement member = new XmlSchemaElement();
             String memberName = memberNode.toString();
@@ -122,7 +136,7 @@
         // declaration phase
         XmlSchemaType schemaType = complexType;
         CorbaTypeImpl corbaType = struct;
-        DeclaratorVisitor declaratorVisitor = new DeclaratorVisitor(getScope(),
+        DeclaratorVisitor declaratorVisitor = new DeclaratorVisitor(newScope,
                                                                     schemas,
                                                                     schema,
                                                                     typeMap,

Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/UnionVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/UnionVisitor.java?view=diff&rev=472506&r1=472505&r2=472506
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/UnionVisitor.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/UnionVisitor.java Wed Nov  8 06:28:59 2006
@@ -169,6 +169,22 @@
             XmlSchemaType stype = visitor.getSchemaType();
             CorbaTypeImpl ctype = visitor.getCorbaType();
             
+            
+            // needed for anonymous arrays in unions
+            if (ArrayVisitor.accept(nameNode)) {
+                ArrayVisitor arrayVisitor = new ArrayVisitor(scope,
+                                                             schemas,
+                                                             schema,
+                                                             typeMap,
+                                                             stype,
+                                                             ctype,
+                                                             null);
+                arrayVisitor.visit(nameNode);
+                stype = arrayVisitor.getSchemaType();
+                ctype = arrayVisitor.getCorbaType();
+            }
+            
+            
             // xmlschema:element
             element.setName(nameNode.toString());
             element.setSchemaTypeName(stype.getQName());

Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java?view=diff&rev=472506&r1=472505&r2=472506
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java Wed Nov  8 06:28:59 2006
@@ -182,6 +182,10 @@
         testWSDLGeneration("/idl/Array.idl", "/idl/expected_Array.wsdl");
     }
 
+    public void testAnonarrayGeneration() throws Exception {
+        testWSDLGeneration("/idl/Anonarray.idl", "/idl/expected_Anonarray.wsdl");
+    }
+
     public void testAnonsequenceGeneration() throws Exception {
         testWSDLGeneration("/idl/Anonsequence.idl", "/idl/expected_Anonsequence.wsdl");
     }

Added: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/Anonarray.idl
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/Anonarray.idl?view=auto&rev=472506
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/Anonarray.idl (added)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/Anonarray.idl Wed Nov  8 06:28:59 2006
@@ -0,0 +1,63 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+*/
+
+
+struct anonStruct {
+
+    long structLongArray[2];
+    long structLongArrayArray[2][4];
+    long structLongArrayArrayArray[2][4][8];
+
+};
+
+typedef struct anonTypedefStruct {
+
+    long typedefStructLongArray[2];
+    long typedefStructLongArrayArray[2][4];
+    long typedefStructLongArrayArrayArray[2][4][8];
+
+} myAnonTypedefStruct;
+
+
+
+union anonUnion switch(long) {
+    case 1:
+        long unionLongArray[2];
+    case 2:
+        long unionLongArrayArray[2][4];
+    default:
+        long unionLongArrayArrayArray[2][4][8];
+};
+
+typedef union anonTypedefUnion switch(long) {
+    case 1:
+        long unionLongArray[2];
+    case 2:
+        long unionLongArrayArray[2][4];
+    default:
+        long unionLongArrayArrayArray[2][4][8];
+} myAnonUnion;
+
+
+
+exception anonException {
+    long exceptionLongArray[2];
+    long exceptionLongArrayArray[2][4];
+    long exceptionLongArrayArrayArray[2][4][8];
+};

Added: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonarray.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonarray.wsdl?view=auto&rev=472506
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonarray.wsdl (added)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonarray.wsdl Wed Nov  8 06:28:59 2006
@@ -0,0 +1,340 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://schemas.apache.org/yoko/idl/Anonarray" xmlns:tns="http://schemas.apache.org/yoko/idl/Anonarray" xmlns:corba="http://schemas.apache.org/yoko/bindings/corba" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <corba:typeMapping targetNamespace="http://schemas.apache.org/yoko/idl/Anonarray/typemap">
+    <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="2" name="_1_anonStruct" type="corba:long" />
+    <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="4" name="_3_anonStruct" type="corba:long" />
+    <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="2" name="_2_anonStruct" type="_3_anonStruct" />
+    <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="8" name="_6_anonStruct" type="corba:long" />
+    <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="4" name="_5_anonStruct" type="_6_anonStruct" />
+    <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="2" name="_4_anonStruct" type="_5_anonStruct" />
+    <corba:struct xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonarray" xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" repositoryID="IDL:anonStruct:1.0" name="anonStruct" type="ns4:anonStruct">
+      <corba:member name="structLongArray" idltype="_1_anonStruct" />
+      <corba:member name="structLongArrayArray" idltype="_2_anonStruct" />
+      <corba:member name="structLongArrayArrayArray" idltype="_4_anonStruct" />
+    </corba:struct>
+      <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="2" name="_1_anonTypedefStruct" type="corba:long" />
+      <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="4" name="_3_anonTypedefStruct" type="corba:long" />
+      <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="2" name="_2_anonTypedefStruct" type="_3_anonTypedefStruct" />
+      <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="8" name="_6_anonTypedefStruct" type="corba:long" />
+      <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="4" name="_5_anonTypedefStruct" type="_6_anonTypedefStruct" />
+      <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="2" name="_4_anonTypedefStruct" type="_5_anonTypedefStruct" />
+      <corba:struct xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonarray" xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" repositoryID="IDL:anonTypedefStruct:1.0" name="anonTypedefStruct" type="ns4:anonTypedefStruct">
+        <corba:member name="typedefStructLongArray" idltype="_1_anonTypedefStruct" />
+        <corba:member name="typedefStructLongArrayArray" idltype="_2_anonTypedefStruct" />
+        <corba:member name="typedefStructLongArrayArrayArray" idltype="_4_anonTypedefStruct" />
+      </corba:struct>
+        <corba:alias xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonarray" xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" basetype="anonTypedefStruct" repositoryID="IDL:myAnonTypedefStruct:1.0" name="myAnonTypedefStruct" type="ns4:anonTypedefStruct" />
+        <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="2" name="_1_anonUnion" type="corba:long" />
+        <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="4" name="_3_anonUnion" type="corba:long" />
+        <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="2" name="_2_anonUnion" type="_3_anonUnion" />
+        <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="8" name="_6_anonUnion" type="corba:long" />
+        <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="4" name="_5_anonUnion" type="_6_anonUnion" />
+        <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="2" name="_4_anonUnion" type="_5_anonUnion" />
+        <corba:union xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonarray" xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" discriminator="corba:long" repositoryID="IDL:anonUnion:1.0" name="anonUnion" type="ns4:anonUnion">
+          <corba:unionbranch name="unionLongArray" idltype="_1_anonUnion">
+            <corba:case label="1" />
+          </corba:unionbranch>
+            <corba:unionbranch name="unionLongArrayArray" idltype="_2_anonUnion">
+              <corba:case label="2" />
+            </corba:unionbranch>
+              <corba:unionbranch name="unionLongArrayArrayArray" idltype="_4_anonUnion" default="true" />
+            </corba:union>
+              <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="2" name="_1_anonTypedefUnion" type="corba:long" />
+              <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="4" name="_3_anonTypedefUnion" type="corba:long" />
+              <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="2" name="_2_anonTypedefUnion" type="_3_anonTypedefUnion" />
+              <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="8" name="_6_anonTypedefUnion" type="corba:long" />
+              <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="4" name="_5_anonTypedefUnion" type="_6_anonTypedefUnion" />
+              <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="2" name="_4_anonTypedefUnion" type="_5_anonTypedefUnion" />
+              <corba:union xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonarray" xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" discriminator="corba:long" repositoryID="IDL:anonTypedefUnion:1.0" name="anonTypedefUnion" type="ns4:anonTypedefUnion">
+                <corba:unionbranch name="unionLongArray" idltype="_1_anonTypedefUnion">
+                  <corba:case label="1" />
+                </corba:unionbranch>
+                  <corba:unionbranch name="unionLongArrayArray" idltype="_2_anonTypedefUnion">
+                    <corba:case label="2" />
+                  </corba:unionbranch>
+                    <corba:unionbranch name="unionLongArrayArrayArray" idltype="_4_anonTypedefUnion" default="true" />
+                  </corba:union>
+                    <corba:alias xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonarray" xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" basetype="anonTypedefUnion" repositoryID="IDL:myAnonUnion:1.0" name="myAnonUnion" type="ns4:anonTypedefUnion" />
+                    <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="2" name="_1_anonException" type="corba:long" />
+                    <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="4" name="_3_anonException" type="corba:long" />
+                    <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="2" name="_2_anonException" type="_3_anonException" />
+                    <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="8" name="_6_anonException" type="corba:long" />
+                    <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="4" name="_5_anonException" type="_6_anonException" />
+                    <corba:anonarray xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" bound="2" name="_4_anonException" type="_5_anonException" />
+                    <corba:exception xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonarray" xmlns="http://schemas.apache.org/yoko/idl/Anonarray/typemap" repositoryID="IDL:anonException:1.0" name="anonException" type="ns4:anonExceptionType">
+                      <corba:member name="exceptionLongArray" idltype="_1_anonException" />
+                      <corba:member name="exceptionLongArrayArray" idltype="_2_anonException" />
+                      <corba:member name="exceptionLongArrayArrayArray" idltype="_4_anonException" />
+                    </corba:exception>
+                    </corba:typeMapping>
+  <wsdl:types>
+    <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://schemas.apache.org/yoko/idl/Anonarray" xmlns="http://schemas.apache.org/yoko/idl/Anonarray" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+      <xs:complexType name="_1_anonStruct">
+        <xs:sequence>
+          <xs:element maxOccurs="2" minOccurs="2" name="item" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_3_anonStruct">
+        <xs:sequence>
+          <xs:element maxOccurs="4" minOccurs="4" name="item" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_2_anonStruct">
+        <xs:sequence>
+          <xs:element maxOccurs="2" minOccurs="2" name="item" type="_3_anonStruct">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_6_anonStruct">
+        <xs:sequence>
+          <xs:element maxOccurs="8" minOccurs="8" name="item" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_5_anonStruct">
+        <xs:sequence>
+          <xs:element maxOccurs="4" minOccurs="4" name="item" type="_6_anonStruct">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_4_anonStruct">
+        <xs:sequence>
+          <xs:element maxOccurs="2" minOccurs="2" name="item" type="_5_anonStruct">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="anonStruct">
+        <xs:sequence>
+          <xs:element name="structLongArray" type="_1_anonStruct">
+          </xs:element>
+          <xs:element name="structLongArrayArray" type="_2_anonStruct">
+          </xs:element>
+          <xs:element name="structLongArrayArrayArray" type="_4_anonStruct">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_1_anonTypedefStruct">
+        <xs:sequence>
+          <xs:element maxOccurs="2" minOccurs="2" name="item" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_3_anonTypedefStruct">
+        <xs:sequence>
+          <xs:element maxOccurs="4" minOccurs="4" name="item" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_2_anonTypedefStruct">
+        <xs:sequence>
+          <xs:element maxOccurs="2" minOccurs="2" name="item" type="_3_anonTypedefStruct">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_6_anonTypedefStruct">
+        <xs:sequence>
+          <xs:element maxOccurs="8" minOccurs="8" name="item" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_5_anonTypedefStruct">
+        <xs:sequence>
+          <xs:element maxOccurs="4" minOccurs="4" name="item" type="_6_anonTypedefStruct">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_4_anonTypedefStruct">
+        <xs:sequence>
+          <xs:element maxOccurs="2" minOccurs="2" name="item" type="_5_anonTypedefStruct">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="anonTypedefStruct">
+        <xs:sequence>
+          <xs:element name="typedefStructLongArray" type="_1_anonTypedefStruct">
+          </xs:element>
+          <xs:element name="typedefStructLongArrayArray" type="_2_anonTypedefStruct">
+          </xs:element>
+          <xs:element name="typedefStructLongArrayArrayArray" type="_4_anonTypedefStruct">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="myAnonTypedefStruct">
+        <xs:restriction base="anonTypedefStruct">
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:complexType name="_1_anonUnion">
+        <xs:sequence>
+          <xs:element maxOccurs="2" minOccurs="2" name="item" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_3_anonUnion">
+        <xs:sequence>
+          <xs:element maxOccurs="4" minOccurs="4" name="item" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_2_anonUnion">
+        <xs:sequence>
+          <xs:element maxOccurs="2" minOccurs="2" name="item" type="_3_anonUnion">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_6_anonUnion">
+        <xs:sequence>
+          <xs:element maxOccurs="8" minOccurs="8" name="item" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_5_anonUnion">
+        <xs:sequence>
+          <xs:element maxOccurs="4" minOccurs="4" name="item" type="_6_anonUnion">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_4_anonUnion">
+        <xs:sequence>
+          <xs:element maxOccurs="2" minOccurs="2" name="item" type="_5_anonUnion">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="anonUnion">
+        <xs:sequence>
+          <xs:element name="discriminator" type="xs:int">
+          </xs:element>
+          <xs:choice>
+            <xs:element name="unionLongArray" type="_1_anonUnion">
+            </xs:element>
+            <xs:element name="unionLongArrayArray" type="_2_anonUnion">
+            </xs:element>
+            <xs:element name="unionLongArrayArrayArray" type="_4_anonUnion">
+            </xs:element>
+          </xs:choice>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_1_anonTypedefUnion">
+        <xs:sequence>
+          <xs:element maxOccurs="2" minOccurs="2" name="item" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_3_anonTypedefUnion">
+        <xs:sequence>
+          <xs:element maxOccurs="4" minOccurs="4" name="item" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_2_anonTypedefUnion">
+        <xs:sequence>
+          <xs:element maxOccurs="2" minOccurs="2" name="item" type="_3_anonTypedefUnion">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_6_anonTypedefUnion">
+        <xs:sequence>
+          <xs:element maxOccurs="8" minOccurs="8" name="item" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_5_anonTypedefUnion">
+        <xs:sequence>
+          <xs:element maxOccurs="4" minOccurs="4" name="item" type="_6_anonTypedefUnion">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_4_anonTypedefUnion">
+        <xs:sequence>
+          <xs:element maxOccurs="2" minOccurs="2" name="item" type="_5_anonTypedefUnion">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="anonTypedefUnion">
+        <xs:sequence>
+          <xs:element name="discriminator" type="xs:int">
+          </xs:element>
+          <xs:choice>
+            <xs:element name="unionLongArray" type="_1_anonTypedefUnion">
+            </xs:element>
+            <xs:element name="unionLongArrayArray" type="_2_anonTypedefUnion">
+            </xs:element>
+            <xs:element name="unionLongArrayArrayArray" type="_4_anonTypedefUnion">
+            </xs:element>
+          </xs:choice>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="myAnonUnion">
+        <xs:restriction base="anonTypedefUnion">
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:complexType name="_1_anonException">
+        <xs:sequence>
+          <xs:element maxOccurs="2" minOccurs="2" name="item" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_3_anonException">
+        <xs:sequence>
+          <xs:element maxOccurs="4" minOccurs="4" name="item" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_2_anonException">
+        <xs:sequence>
+          <xs:element maxOccurs="2" minOccurs="2" name="item" type="_3_anonException">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_6_anonException">
+        <xs:sequence>
+          <xs:element maxOccurs="8" minOccurs="8" name="item" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_5_anonException">
+        <xs:sequence>
+          <xs:element maxOccurs="4" minOccurs="4" name="item" type="_6_anonException">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="_4_anonException">
+        <xs:sequence>
+          <xs:element maxOccurs="2" minOccurs="2" name="item" type="_5_anonException">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:element name="anonException" type="anonExceptionType">
+      </xs:element>
+      <xs:complexType name="anonExceptionType">
+        <xs:sequence>
+          <xs:element name="exceptionLongArray" type="_1_anonException">
+          </xs:element>
+          <xs:element name="exceptionLongArrayArray" type="_2_anonException">
+          </xs:element>
+          <xs:element name="exceptionLongArrayArrayArray" type="_4_anonException">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+    </xs:schema>
+  </wsdl:types>
+</wsdl:definitions>

Propchange: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonarray.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonarray.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml