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 2007/03/28 17:25:22 UTC

svn commit: r523422 - in /incubator/yoko/trunk/tools/src: main/java/org/apache/yoko/tools/common/ main/java/org/apache/yoko/tools/processors/idl/ test/java/org/apache/yoko/tools/ test/resources/idl/

Author: mvescovi
Date: Wed Mar 28 10:25:21 2007
New Revision: 523422

URL: http://svn.apache.org/viewvc?view=rev&rev=523422
Log:
[YOKO-310] Added idltowsdl tool option '-b' to treat bounded strings as unbounded. Fixed bug in TypedefVisitor

Added:
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_Anonstring_unbounded.wsdl   (with props)
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_String_unbounded.wsdl   (with props)
Modified:
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/ToolCorbaConstants.java
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/StringVisitor.java
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/TypedefVisitor.java
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/WSDLASTVisitor.java
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/IDLToWSDLTest.java

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/ToolCorbaConstants.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/ToolCorbaConstants.java?view=diff&rev=523422&r1=523421&r2=523422
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/ToolCorbaConstants.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/ToolCorbaConstants.java Wed Mar 28 10:25:21 2007
@@ -39,4 +39,6 @@
     public static final String CFG_SCHEMA_NAMESPACE_PREFIX = "xsd1";
     public static final String CFG_ADDRESSFILE = "addressfile";
     public static final String CFG_CORBATYPEMAP_NAMESPACE = "corbatypemapns";
+    public static final String CFG_WSDL_ENCODING = "encoding";
+    public static final String CFG_BOUNDEDSTRINGS = "boundedstrings";
 }

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java?view=diff&rev=523422&r1=523421&r2=523422
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java Wed Mar 28 10:25:21 2007
@@ -108,6 +108,9 @@
                     .addNamespace(ToolCorbaConstants.CFG_SCHEMA_NAMESPACE_PREFIX,
                                   (String) env.get(ToolCorbaConstants.CFG_SCHEMA_NAMESPACE));
             }
+            if (env.optionSet(ToolCorbaConstants.CFG_BOUNDEDSTRINGS)) {
+                visitor.setBoundedStringOverride(true);
+            }
             visitor.visit(idlTree);
             if (outputWriter == null) {
                 FileWriterUtil fw = new FileWriterUtil(outputDir);

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/StringVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/StringVisitor.java?view=diff&rev=523422&r1=523421&r2=523422
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/StringVisitor.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/StringVisitor.java Wed Mar 28 10:25:21 2007
@@ -92,10 +92,12 @@
             }
         }
         
-        if (boundNode != null) {
+        if (boundNode != null
+            && !wsdlVisitor.getBoundedStringOverride()) {
             if (identifierNode != null) {
                 // bounded string/wstring
                 visitBoundedString();
+
             } else {
                 // anonymous bounded string/wstring
                 visitAnonBoundedString();

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/TypedefVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/TypedefVisitor.java?view=diff&rev=523422&r1=523421&r2=523422
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/TypedefVisitor.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/TypedefVisitor.java Wed Mar 28 10:25:21 2007
@@ -76,7 +76,8 @@
             // Handle cases "typedef string"
             //              "typedef wstring"
 
-            if (StringVisitor.isBounded(typeDeclaratorNode)) {
+            if (StringVisitor.isBounded(typeDeclaratorNode)
+                && !wsdlVisitor.getBoundedStringOverride()) {
                 DeclaratorVisitor declaratorVisitor = new DeclaratorVisitor(typedefScope,
                                                                             wsdlVisitor,
                                                                             schemaType,
@@ -88,23 +89,33 @@
                 // to the CorbaTypeMap, therefore we cannot use DeclaratorVisitor here.
                 
                 while (identifierNode != null) {
-                    Alias corbaString = new Alias();
-                    if (typeDeclaratorNode.getType() == IDLTokenTypes.LITERAL_string) {
-                        corbaString.setBasetype(CorbaConstants.NT_CORBA_STRING);
-                    } else if (typeDeclaratorNode.getType() == IDLTokenTypes.LITERAL_wstring) {
-                        corbaString.setBasetype(CorbaConstants.NT_CORBA_WSTRING);
-                    } else { 
-                        // should never get here
-                        throw new RuntimeException("[TypedefVisitor] Attempted to visit an invalid node: "
-                                                   + typeDeclaratorNode.toString());
-                    }
-                    Scope newScope = new Scope(typedefScope.getParent(), identifierNode);
-                    corbaString.setQName(new QName(typeMap.getTargetNamespace(), newScope.toString()));
-                    corbaString.setType(Constants.XSD_STRING);
-                    corbaString.setRepositoryID(newScope.toIDLRepositoryID());
+                    if (ArrayVisitor.accept(identifierNode)) {
+                        ArrayVisitor arrayVisitor = new ArrayVisitor(getScope(),
+                                                                     wsdlVisitor,
+                                                                     schemaType,
+                                                                     corbaType,
+                                                                     identifierNode); 
+                        arrayVisitor.visit(identifierNode);
+
+                    } else {
+                        Alias corbaString = new Alias();
+                        if (typeDeclaratorNode.getType() == IDLTokenTypes.LITERAL_string) {
+                            corbaString.setBasetype(CorbaConstants.NT_CORBA_STRING);
+                        } else if (typeDeclaratorNode.getType() == IDLTokenTypes.LITERAL_wstring) {
+                            corbaString.setBasetype(CorbaConstants.NT_CORBA_WSTRING);
+                        } else { 
+                            // should never get here
+                            throw new RuntimeException("[TypedefVisitor] Attempted to visit an invalid node: "
+                                                       + typeDeclaratorNode.toString());
+                        }
+                        Scope newScope = new Scope(typedefScope.getParent(), identifierNode);
+                        corbaString.setQName(new QName(typeMap.getTargetNamespace(), newScope.toString()));
+                        corbaString.setType(Constants.XSD_STRING);
+                        corbaString.setRepositoryID(newScope.toIDLRepositoryID());
 
-                    typeMap.getStructOrExceptionOrUnion().add(corbaString);
+                        typeMap.getStructOrExceptionOrUnion().add(corbaString);
 
+                    }
                     identifierNode = identifierNode.getNextSibling();
                 }
             }

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/WSDLASTVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/WSDLASTVisitor.java?view=diff&rev=523422&r1=523421&r2=523422
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/WSDLASTVisitor.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/WSDLASTVisitor.java Wed Mar 28 10:25:21 2007
@@ -71,7 +71,8 @@
     
     TypeMappingType typeMap;
 
-    XmlSchemaType sequenceOctetType;
+    private XmlSchemaType sequenceOctetType;
+    private boolean boundedStringOverride;
     
     public WSDLASTVisitor(String tns, String schemans, String corbatypemaptns)
         throws WSDLException, JAXBException {
@@ -87,6 +88,9 @@
         
         // idl:sequence<octet> maps to xsd:base64Binary by default
         sequenceOctetType = schemas.getTypeByQName(Constants.XSD_BASE64);
+        
+        // treat bounded corba:string/corba:wstring as unbounded if set to true
+        setBoundedStringOverride(false);
     }
 
     public void visit(AST node) {
@@ -142,6 +146,14 @@
                                     + "for idl:sequence<octet> mapping.");
         }
         sequenceOctetType = stype;
+    }
+    
+    public boolean getBoundedStringOverride() {
+        return boundedStringOverride;
+    }
+    
+    public void setBoundedStringOverride(boolean value) {
+        boundedStringOverride = value;
     }
     
     public Binding[] getCorbaBindings() {

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/IDLToWSDLTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/IDLToWSDLTest.java?view=diff&rev=523422&r1=523421&r2=523422
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/IDLToWSDLTest.java (original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/IDLToWSDLTest.java Wed Mar 28 10:25:21 2007
@@ -272,4 +272,33 @@
         doTestGeneratedWsdl(expected, actual);
     }
 
+    // test "-b Treat bounded strings as unbounded."
+    public void testTreatBoundedStringsAsUnbounded() throws Exception {
+        File input = new File(getClass().getResource("/idl/String.idl").getFile());
+        File actual = new File(output, "String.wsdl");
+        File expected = new File(getClass().getResource("/idl/expected_String_unbounded.wsdl").getFile());
+        
+        String[] args = new String[] {"-b",
+                                      "-o", output.toString(),
+                                      input.toString()
+                                      };
+        int exc = execute(args);
+        assertEquals("IDLToWSDL Failed", noError, exc);
+        doTestGeneratedWsdl(expected, actual);
+    }
+    
+    //  test "-b Treat bounded strings as unbounded."
+    public void testTreatBoundedAnonStringsAsUnbounded() throws Exception {
+        File input = new File(getClass().getResource("/idl/Anonstring.idl").getFile());
+        File actual = new File(output, "Anonstring.wsdl");
+        File expected = new File(getClass().getResource("/idl/expected_Anonstring_unbounded.wsdl").getFile());
+        
+        String[] args = new String[] {"-b",
+                                      "-o", output.toString(),
+                                      input.toString()
+                                      };
+        int exc = execute(args);
+        assertEquals("IDLToWSDL Failed", noError, exc);
+        doTestGeneratedWsdl(expected, actual);        
+    }
 }

Added: incubator/yoko/trunk/tools/src/test/resources/idl/expected_Anonstring_unbounded.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_Anonstring_unbounded.wsdl?view=auto&rev=523422
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_Anonstring_unbounded.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_Anonstring_unbounded.wsdl Wed Mar 28 10:25:21 2007
@@ -0,0 +1,268 @@
+<?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/Anonstring" xmlns:tns="http://schemas.apache.org/yoko/idl/Anonstring" 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/Anonstring/typemap">
+    <corba:array xmlns="http://schemas.apache.org/yoko/idl/Anonstring/typemap" bound="10" repositoryID="IDL:AnonStrings:1.0" name="AnonStrings" type="corba:string" />
+    <corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonstring" xmlns="http://schemas.apache.org/yoko/idl/Anonstring/typemap" elemtype="corba:string" bound="0" repositoryID="IDL:AnonStrings/SequenceBoundedString:1.0" name="AnonStrings.SequenceBoundedString" type="ns4:AnonStrings.SequenceBoundedString" />
+    <corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonstring" xmlns="http://schemas.apache.org/yoko/idl/Anonstring/typemap" elemtype="corba:string" bound="0" name="AnonStrings._1_SequenceSequenceBoundedString" type="ns4:AnonStrings._1_SequenceSequenceBoundedString" />
+    <corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonstring" xmlns="http://schemas.apache.org/yoko/idl/Anonstring/typemap" elemtype="AnonStrings._1_SequenceSequenceBoundedString" bound="0" repositoryID="IDL:AnonStrings/SequenceSequenceBoundedString:1.0" name="AnonStrings.SequenceSequenceBoundedString" type="ns4:AnonStrings.SequenceSequenceBoundedString" />
+    <corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonstring" xmlns="http://schemas.apache.org/yoko/idl/Anonstring/typemap" elemtype="corba:string" bound="20" repositoryID="IDL:AnonStrings/BoundedSequenceBoundedString:1.0" name="AnonStrings.BoundedSequenceBoundedString" type="ns4:AnonStrings.BoundedSequenceBoundedString" />
+    <corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonstring" xmlns="http://schemas.apache.org/yoko/idl/Anonstring/typemap" elemtype="corba:string" bound="20" name="AnonStrings._1_SequenceBoundedSequenceBoundedString" type="ns4:AnonStrings._1_SequenceBoundedSequenceBoundedString" />
+    <corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonstring" xmlns="http://schemas.apache.org/yoko/idl/Anonstring/typemap" elemtype="AnonStrings._1_SequenceBoundedSequenceBoundedString" bound="0" repositoryID="IDL:AnonStrings/SequenceBoundedSequenceBoundedString:1.0" name="AnonStrings.SequenceBoundedSequenceBoundedString" type="ns4:AnonStrings.SequenceBoundedSequenceBoundedString" />
+    <corba:struct xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonstring" xmlns="http://schemas.apache.org/yoko/idl/Anonstring/typemap" repositoryID="IDL:AnonStrings/anonStringStruct:1.0" name="AnonStrings.anonStringStruct" type="ns4:AnonStrings.anonStringStruct">
+      <corba:member name="unboundedString" idltype="corba:string" />
+      <corba:member name="anotherUnboundedString" idltype="corba:string" />
+      <corba:member name="anonBoundedString" idltype="corba:string" />
+      <corba:member name="anotherAnonBoundedString" idltype="corba:string" />
+    </corba:struct>
+    <corba:struct xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonstring" xmlns="http://schemas.apache.org/yoko/idl/Anonstring/typemap" repositoryID="IDL:AnonStrings/typedefAnonStringStruct:1.0" name="AnonStrings.typedefAnonStringStruct" type="ns4:AnonStrings.typedefAnonStringStruct">
+      <corba:member name="unboundedString" idltype="corba:string" />
+      <corba:member name="anotherUnboundedString" idltype="corba:string" />
+      <corba:member name="anonBoundedString" idltype="corba:string" />
+      <corba:member name="anotherAnonBoundedString" idltype="corba:string" />
+    </corba:struct>
+    <corba:alias xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonstring" xmlns="http://schemas.apache.org/yoko/idl/Anonstring/typemap" basetype="AnonStrings.typedefAnonStringStruct" repositoryID="IDL:AnonStrings/myTypedefAnonStringStruct:1.0" name="AnonStrings.myTypedefAnonStringStruct" type="ns4:AnonStrings.typedefAnonStringStruct" />
+    <corba:union xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonstring" xmlns="http://schemas.apache.org/yoko/idl/Anonstring/typemap" discriminator="corba:long" repositoryID="IDL:AnonStrings/anonStringUnion:1.0" name="AnonStrings.anonStringUnion" type="ns4:AnonStrings.anonStringUnion">
+      <corba:unionbranch name="anonStringUnion1" idltype="corba:string">
+        <corba:case label="1" />
+      </corba:unionbranch>
+      <corba:unionbranch name="anonStringUnionDefault" idltype="corba:string" default="true" />
+    </corba:union>
+    <corba:union xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonstring" xmlns="http://schemas.apache.org/yoko/idl/Anonstring/typemap" discriminator="corba:long" repositoryID="IDL:AnonStrings/typedefAnonStringUnion:1.0" name="AnonStrings.typedefAnonStringUnion" type="ns4:AnonStrings.typedefAnonStringUnion">
+      <corba:unionbranch name="anonStringUnion1" idltype="corba:string">
+        <corba:case label="1" />
+      </corba:unionbranch>
+      <corba:unionbranch name="anonStringUnionDefault" idltype="corba:string" default="true" />
+    </corba:union>
+    <corba:alias xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonstring" xmlns="http://schemas.apache.org/yoko/idl/Anonstring/typemap" basetype="AnonStrings.typedefAnonStringUnion" repositoryID="IDL:AnonStrings/myTypedefAnonStringUnion:1.0" name="AnonStrings.myTypedefAnonStringUnion" type="ns4:AnonStrings.typedefAnonStringUnion" />
+    <corba:exception xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonstring" xmlns="http://schemas.apache.org/yoko/idl/Anonstring/typemap" repositoryID="IDL:AnonStrings/anonException:1.0" name="AnonStrings.anonException" type="ns4:AnonStrings.anonExceptionType">
+      <corba:member name="unboundedString" idltype="corba:string" />
+      <corba:member name="anotherUnboundedString" idltype="corba:string" />
+      <corba:member name="anonBoundedAnonString" idltype="corba:string" />
+      <corba:member name="anotherBoundedAnonString" idltype="corba:string" />
+    </corba:exception>
+  </corba:typeMapping>
+  <wsdl:types>
+    <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://schemas.apache.org/yoko/idl/Anonstring" xmlns="http://schemas.apache.org/yoko/idl/Anonstring" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+      <xs:complexType name="AnonStrings">
+        <xs:sequence>
+          <xs:element maxOccurs="10" minOccurs="10" name="item" type="xs:string">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="AnonStrings.SequenceBoundedString">
+        <xs:sequence>
+          <xs:element maxOccurs="unbounded" minOccurs="0" name="item" type="xs:string">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="AnonStrings._1_SequenceSequenceBoundedString">
+        <xs:sequence>
+          <xs:element maxOccurs="unbounded" minOccurs="0" name="item" type="xs:string">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="AnonStrings.SequenceSequenceBoundedString">
+        <xs:sequence>
+          <xs:element maxOccurs="unbounded" minOccurs="0" name="item" type="AnonStrings._1_SequenceSequenceBoundedString">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="AnonStrings.BoundedSequenceBoundedString">
+        <xs:sequence>
+          <xs:element maxOccurs="20" minOccurs="0" name="item" type="xs:string">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="AnonStrings._1_SequenceBoundedSequenceBoundedString">
+        <xs:sequence>
+          <xs:element maxOccurs="20" minOccurs="0" name="item" type="xs:string">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="AnonStrings.SequenceBoundedSequenceBoundedString">
+        <xs:sequence>
+          <xs:element maxOccurs="unbounded" minOccurs="0" name="item" type="AnonStrings._1_SequenceBoundedSequenceBoundedString">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:element name="anonStringOperation">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="inString" type="xs:string">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="anonStringOperationResponse">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="return" type="xs:string">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="anotherAnonStringOperation">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="inString" type="xs:string">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="anotherAnonStringOperationResponse">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="return" type="xs:string">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:complexType name="AnonStrings.anonStringStruct">
+        <xs:sequence>
+          <xs:element name="unboundedString" type="xs:string">
+          </xs:element>
+          <xs:element name="anotherUnboundedString" type="xs:string">
+          </xs:element>
+          <xs:element name="anonBoundedString" type="xs:string">
+          </xs:element>
+          <xs:element name="anotherAnonBoundedString" type="xs:string">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="AnonStrings.typedefAnonStringStruct">
+        <xs:sequence>
+          <xs:element name="unboundedString" type="xs:string">
+          </xs:element>
+          <xs:element name="anotherUnboundedString" type="xs:string">
+          </xs:element>
+          <xs:element name="anonBoundedString" type="xs:string">
+          </xs:element>
+          <xs:element name="anotherAnonBoundedString" type="xs:string">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="AnonStrings.myTypedefAnonStringStruct">
+        <xs:restriction base="AnonStrings.typedefAnonStringStruct">
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:complexType name="AnonStrings.anonStringUnion">
+        <xs:sequence>
+          <xs:element name="discriminator" type="xs:int">
+          </xs:element>
+          <xs:choice>
+            <xs:element name="anonStringUnion1" type="xs:string">
+            </xs:element>
+            <xs:element name="anonStringUnionDefault" type="xs:string">
+            </xs:element>
+          </xs:choice>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="AnonStrings.typedefAnonStringUnion">
+        <xs:sequence>
+          <xs:element name="discriminator" type="xs:int">
+          </xs:element>
+          <xs:choice>
+            <xs:element name="anonStringUnion1" type="xs:string">
+            </xs:element>
+            <xs:element name="anonStringUnionDefault" type="xs:string">
+            </xs:element>
+          </xs:choice>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="AnonStrings.myTypedefAnonStringUnion">
+        <xs:restriction base="AnonStrings.typedefAnonStringUnion">
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:element name="AnonStrings.anonException" type="AnonStrings.anonExceptionType">
+      </xs:element>
+      <xs:complexType name="AnonStrings.anonExceptionType">
+        <xs:sequence>
+          <xs:element name="unboundedString" type="xs:string">
+          </xs:element>
+          <xs:element name="anotherUnboundedString" type="xs:string">
+          </xs:element>
+          <xs:element name="anonBoundedAnonString" type="xs:string">
+          </xs:element>
+          <xs:element name="anotherBoundedAnonString" type="xs:string">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+    </xs:schema>
+  </wsdl:types>
+  <wsdl:message name="anonStringOperation">
+    <wsdl:part name="inparameter" element="tns:anonStringOperation">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="anotherAnonStringOperation">
+    <wsdl:part name="inparameter" element="tns:anotherAnonStringOperation">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="anotherAnonStringOperationResponse">
+    <wsdl:part name="outparameter" element="tns:anotherAnonStringOperationResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="anonStringOperationResponse">
+    <wsdl:part name="outparameter" element="tns:anonStringOperationResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:portType name="AnonStrings.anonStringIf">
+    <wsdl:operation name="anonStringOperation">
+      <wsdl:input name="anonStringOperationRequest" message="tns:anonStringOperation">
+    </wsdl:input>
+      <wsdl:output name="anonStringOperationResponse" message="tns:anonStringOperationResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="anotherAnonStringOperation">
+      <wsdl:input name="anotherAnonStringOperationRequest" message="tns:anotherAnonStringOperation">
+    </wsdl:input>
+      <wsdl:output name="anotherAnonStringOperationResponse" message="tns:anotherAnonStringOperationResponse">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="AnonStrings.anonStringIfCORBABinding" type="tns:AnonStrings.anonStringIf">
+    <corba:binding repositoryID="IDL:AnonStrings/anonStringIf:1.0" />
+    <wsdl:operation name="anonStringOperation">
+      <corba:operation name="anonStringOperation">
+        <corba:param mode="in" name="inString" idltype="corba:string" />
+        <corba:return name="return" idltype="corba:string" />
+      </corba:operation>
+      <wsdl:input name="anonStringOperationRequest">
+      </wsdl:input>
+      <wsdl:output name="anonStringOperationResponse">
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="anotherAnonStringOperation">
+      <corba:operation name="anotherAnonStringOperation">
+        <corba:param mode="in" name="inString" idltype="corba:string" />
+        <corba:return name="return" idltype="corba:string" />
+      </corba:operation>
+      <wsdl:input name="anotherAnonStringOperationRequest">
+      </wsdl:input>
+      <wsdl:output name="anotherAnonStringOperationResponse">
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="AnonStrings.anonStringIfCORBAService">
+    <wsdl:port name="AnonStrings.anonStringIfCORBAPort" binding="tns:AnonStrings.anonStringIfCORBABinding">
+      <corba:address location="IOR:" />
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>

Propchange: incubator/yoko/trunk/tools/src/test/resources/idl/expected_Anonstring_unbounded.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/tools/src/test/resources/idl/expected_Anonstring_unbounded.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/yoko/trunk/tools/src/test/resources/idl/expected_Anonstring_unbounded.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/yoko/trunk/tools/src/test/resources/idl/expected_String_unbounded.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_String_unbounded.wsdl?view=auto&rev=523422
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_String_unbounded.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_String_unbounded.wsdl Wed Mar 28 10:25:21 2007
@@ -0,0 +1,161 @@
+<?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/String" xmlns:tns="http://schemas.apache.org/yoko/idl/String" 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/String/typemap">
+    <corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/String/typemap" basetype="corba:string" repositoryID="IDL:string10:1.0" name="string10" type="xs:string" />
+    <corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/String/typemap" basetype="corba:wstring" repositoryID="IDL:wstring20:1.0" name="wstring20" type="xs:string" />
+    <corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/String/typemap" basetype="corba:string" repositoryID="IDL:myString10:1.0" name="myString10" type="xs:string" />
+    <corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/String/typemap" basetype="corba:string" repositoryID="IDL:myWString20:1.0" name="myWString20" type="xs:string" />
+    <corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/String/typemap" basetype="corba:string" repositoryID="IDL:myString:1.0" name="myString" type="xs:string" />
+    <corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/String/typemap" basetype="corba:wstring" repositoryID="IDL:myWString:1.0" name="myWString" type="xs:string" />
+    <corba:struct xmlns:ns4="http://schemas.apache.org/yoko/idl/String" xmlns="http://schemas.apache.org/yoko/idl/String/typemap" repositoryID="IDL:strStruct:1.0" name="strStruct" type="ns4:strStruct">
+      <corba:member name="unboundedStr" idltype="corba:string" />
+      <corba:member name="boundedStr10" idltype="corba:string" />
+      <corba:member name="unboundedWStr" idltype="corba:wstring" />
+      <corba:member name="boundedWStr20" idltype="corba:string" />
+      <corba:member name="myStringStruct" idltype="corba:string" />
+      <corba:member name="myWStringStruct" idltype="corba:string" />
+    </corba:struct>
+  </corba:typeMapping>
+  <wsdl:types>
+    <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://schemas.apache.org/yoko/idl/String" xmlns="http://schemas.apache.org/yoko/idl/String" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+      <xs:simpleType name="myString10">
+        <xs:restriction base="xs:string">
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:simpleType name="myWString20">
+        <xs:restriction base="xs:string">
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:complexType name="strStruct">
+        <xs:sequence>
+          <xs:element name="unboundedStr" type="xs:string">
+          </xs:element>
+          <xs:element name="boundedStr10" type="xs:string">
+          </xs:element>
+          <xs:element name="unboundedWStr" type="xs:string">
+          </xs:element>
+          <xs:element name="boundedWStr20" type="xs:string">
+          </xs:element>
+          <xs:element name="myStringStruct" type="xs:string">
+          </xs:element>
+          <xs:element name="myWStringStruct" type="xs:string">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:element name="combineStrings">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="string10Parm" type="xs:string">
+            </xs:element>
+            <xs:element name="myString10Parm" type="myString10">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="combineStringsResponse">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="return" type="xs:string">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="combineWstrings">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="wstring20Parm" type="xs:string">
+            </xs:element>
+            <xs:element name="myWString20Parm" type="myWString20">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="combineWstringsResponse">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="return" type="xs:string">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:schema>
+  </wsdl:types>
+  <wsdl:message name="combineWstrings">
+    <wsdl:part name="inparameter" element="tns:combineWstrings">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="combineStrings">
+    <wsdl:part name="inparameter" element="tns:combineStrings">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="combineWstringsResponse">
+    <wsdl:part name="outparameter" element="tns:combineWstringsResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="combineStringsResponse">
+    <wsdl:part name="outparameter" element="tns:combineStringsResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:portType name="if">
+    <wsdl:operation name="combineStrings">
+      <wsdl:input name="combineStringsRequest" message="tns:combineStrings">
+    </wsdl:input>
+      <wsdl:output name="combineStringsResponse" message="tns:combineStringsResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="combineWstrings">
+      <wsdl:input name="combineWstringsRequest" message="tns:combineWstrings">
+    </wsdl:input>
+      <wsdl:output name="combineWstringsResponse" message="tns:combineWstringsResponse">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="ifCORBABinding" type="tns:if">
+    <corba:binding repositoryID="IDL:if:1.0" />
+    <wsdl:operation name="combineStrings">
+      <corba:operation name="combineStrings">
+        <corba:param mode="in" name="string10Parm" idltype="corba:string" />
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/String/typemap" mode="in" name="myString10Parm" idltype="myString10" />
+        <corba:return name="return" idltype="corba:string" />
+      </corba:operation>
+      <wsdl:input name="combineStringsRequest">
+      </wsdl:input>
+      <wsdl:output name="combineStringsResponse">
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="combineWstrings">
+      <corba:operation name="combineWstrings">
+        <corba:param mode="in" name="wstring20Parm" idltype="corba:string" />
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/String/typemap" mode="in" name="myWString20Parm" idltype="myWString20" />
+        <corba:return name="return" idltype="corba:string" />
+      </corba:operation>
+      <wsdl:input name="combineWstringsRequest">
+      </wsdl:input>
+      <wsdl:output name="combineWstringsResponse">
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="ifCORBAService">
+    <wsdl:port name="ifCORBAPort" binding="tns:ifCORBABinding">
+      <corba:address location="IOR:" />
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>

Propchange: incubator/yoko/trunk/tools/src/test/resources/idl/expected_String_unbounded.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/tools/src/test/resources/idl/expected_String_unbounded.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/yoko/trunk/tools/src/test/resources/idl/expected_String_unbounded.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml