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 en...@apache.org on 2006/10/09 15:36:56 UTC

svn commit: r454409 - in /incubator/yoko/trunk/tools/src: main/java/org/apache/yoko/tools/processors/wsdl/ test/java/org/apache/yoko/tools/processors/ test/resources/idlgen/ test/resources/wsdl/

Author: enolan
Date: Mon Oct  9 08:36:55 2006
New Revision: 454409

URL: http://svn.apache.org/viewvc?view=rev&rev=454409
Log:
Yoko-171 & Yoko 172 - Add support for date and time types in wsdltoidl for Corba binding generation and idl generation.

Added:
    incubator/yoko/trunk/tools/src/test/resources/idlgen/datetime.wsdl   (with props)
    incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_datetime.idl
    incubator/yoko/trunk/tools/src/test/resources/wsdl/datetime.wsdl   (with props)
Modified:
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToCorbaBindingTypeTest.java
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java
    incubator/yoko/trunk/tools/src/test/resources/idlgen/any.wsdl

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java?view=diff&rev=454409&r1=454408&r2=454409
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java Mon Oct  9 08:36:55 2006
@@ -442,39 +442,7 @@
                         } 
                     }                   
                 }
-                
-                XmlSchemaObjectTable elements = xmlSchemaTypes.getElements();                            
-                Iterator i2 = elements.getValues();                
-                while (i2.hasNext()) {                
-                    XmlSchemaElement el = (XmlSchemaElement)i2.next();
-                    boolean anonymous = false;
-                    if (el.getSchemaType() == null) {
-                        anonymous = true;
-                    } else {
-                        anonymous = wsdltypes.isAnonymous(el.getSchemaType().getName());
-                    }
-                    
-                    if (el.getSchemaType() != null) {
-                        corbaTypeImpl = 
-                            convertSchemaToCorbaType(el.getSchemaType(),
-                                                 el.getQName(), el.getSchemaType(), 
-                                                 anonymous);
-                        if (el.isNillable()) {                            
-                            QName uname =  
-                                createQNameCorbaNamespace(corbaTypeImpl.getQName().getLocalPart() + "_nil");
-                            corbaTypeImpl = createNillableUnion(uname, 
-                                checkPrefix(el.getQName()), checkPrefix(corbaTypeImpl.getQName()));
-                        }
-                        if (corbaTypeImpl != null) { 
-                            if (corbaTypeImpl.getQName() != null) {
-                                corbaTypeImpl.setQName(null);        
-                            }
-                            if (!isDuplicate(corbaTypeImpl)) {
-                                typeMappingType.getStructOrExceptionOrUnion().add(corbaTypeImpl);
-                            }
-                        }
-                    }                   
-                }
+                addCorbaElements(corbaTypeImpl, xmlSchemaTypes);                
             }
             definition.addExtensibilityElement(typeMappingType);
         } catch (WSDLException ex) {
@@ -483,6 +451,50 @@
     }          
 
     
+    private void addCorbaElements(CorbaTypeImpl corbaTypeImpl, 
+                                  XmlSchema xmlSchemaTypes) throws Exception {
+        XmlSchemaObjectTable elements = xmlSchemaTypes.getElements();                            
+        Iterator i2 = elements.getValues();                
+        while (i2.hasNext()) {                
+            XmlSchemaElement el = (XmlSchemaElement)i2.next();
+            boolean anonymous = false;
+            if (el.getSchemaType() == null) {
+                anonymous = true;
+            } else {
+                anonymous = wsdltypes.isAnonymous(el.getSchemaType().getName());
+            }
+            
+            if (el.getSchemaType() != null) {
+                corbaTypeImpl = 
+                    convertSchemaToCorbaType(el.getSchemaType(),
+                                         el.getQName(), el.getSchemaType(), 
+                                         anonymous);
+                if (el.isNillable()) {                            
+                    QName uname =  
+                        createQNameCorbaNamespace(corbaTypeImpl.getQName().getLocalPart() + "_nil");
+                    corbaTypeImpl = createNillableUnion(uname, 
+                        checkPrefix(el.getQName()), checkPrefix(corbaTypeImpl.getQName()));
+                } else if (isPrimitive(corbaTypeImpl)) {
+                    corbaTypeImpl = null;
+                }
+                if (corbaTypeImpl != null) { 
+                    if (corbaTypeImpl.getQName() != null) {
+                        corbaTypeImpl.setQName(null);        
+                    }
+                    if (!isDuplicate(corbaTypeImpl)) {
+                        typeMappingType.getStructOrExceptionOrUnion().add(corbaTypeImpl);
+                    }
+                }
+            }                   
+        }
+    }
+    
+    private boolean isPrimitive(CorbaTypeImpl corbaTypeImpl) {               
+        if ((CorbaTypeImpl)CORBAPRIMITIVEMAP.get(corbaTypeImpl.getQName()) != null) {
+            return true;
+        }
+        return false;
+    }
     
     private boolean queryBinding(Definition definition, QName bqname) {
         Map bindings = definition.getBindings();

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToCorbaBindingTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToCorbaBindingTypeTest.java?view=diff&rev=454409&r1=454408&r2=454409
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToCorbaBindingTypeTest.java (original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToCorbaBindingTypeTest.java Mon Oct  9 08:36:55 2006
@@ -83,6 +83,33 @@
         }
         return null;
     }
+    
+    public void testDateTimeTypes() throws Exception {
+        
+        try {
+            String fileName = getClass().getResource("/wsdl/datetime.wsdl").toString();
+            generator.setWsdlFile(fileName);
+            generator.addInterfaceName("BasePortType");
+
+            Definition model = generator.generateCORBABinding();
+            Document document = writer.getDocument(model);
+
+            Element typemap = getElementNode(document, "corba:typeMapping");            
+            assertNotNull(typemap);
+            assertEquals(2, typemap.getElementsByTagName("corba:union").getLength());
+            assertEquals(2, typemap.getElementsByTagName("corba:struct").getLength());
+
+            WSDLToIDLAction idlgen = new WSDLToIDLAction();
+            idlgen.setBindingName("BaseCORBABinding");
+            idlgen.setOutputFile("datetime.idl");
+            idlgen.generateIDL(model);
+                        
+            File f = new File("datetime.idl");
+            assertTrue("datetime.idl should be generated", f.exists()); 
+        } finally {
+            new File("datetime.idl").deleteOnExit();
+        }
+    }
 
     public void testNestedInterfaceTypes() throws Exception {
         
@@ -424,7 +451,7 @@
             Definition model = generator.generateCORBABinding();
 
             TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);
-            assertEquals(6, mapType.getStructOrExceptionOrUnion().size());
+            assertEquals(5, mapType.getStructOrExceptionOrUnion().size());
             Iterator i = mapType.getStructOrExceptionOrUnion().iterator();
             int strcnt = 0;
             int unioncnt = 0;

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java?view=diff&rev=454409&r1=454408&r2=454409
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java (original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java Mon Oct  9 08:36:55 2006
@@ -551,6 +551,27 @@
             new File("nested_interfaces.idl").deleteOnExit();
         }
     }
+    
+    public void testDateTimeTypesIdlgen() throws Exception {
+        
+        try {
+            String fileName = getClass().getResource("/idlgen/datetime.wsdl").toString();
+            idlgen.setWsdlFile(fileName);
+            
+            idlgen.setBindingName("BaseCORBABinding");
+            idlgen.setOutputFile("datetime.idl");            
+            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.generateIDL(null);
+
+            InputStream origstream = 
+                getClass().getResourceAsStream("/idlgen/expected_datetime.idl");
+            byte orig[] = inputStreamToBytes(origstream);
+
+            checkIDLStrings(orig, idloutput.toByteArray());
+        } finally {
+            new File("datetime.idl").deleteOnExit();
+        }
+    }
 
 
 

Modified: incubator/yoko/trunk/tools/src/test/resources/idlgen/any.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idlgen/any.wsdl?view=diff&rev=454409&r1=454408&r2=454409
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idlgen/any.wsdl (original)
+++ incubator/yoko/trunk/tools/src/test/resources/idlgen/any.wsdl Mon Oct  9 08:36:55 2006
@@ -64,7 +64,6 @@
                           <corba:member name="varAny" idltype="corba:any" />
                           <corba:member name="varString" idltype="corba:string" />
                         </corba:struct>
-                          <corba:const xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="" xmlns:ns4="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="corbaTypeImpl" type="xs:string" name="string" />
                         </corba:typeMapping>
   <types>
     <schema targetNamespace="http://schemas.apache.org/idltypes/any.idl" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
@@ -153,4 +152,4 @@
       </output>
     </operation>
   </binding>
-</definitions>
+</definitions>
\ No newline at end of file

Added: incubator/yoko/trunk/tools/src/test/resources/idlgen/datetime.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idlgen/datetime.wsdl?view=auto&rev=454409
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idlgen/datetime.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idlgen/datetime.wsdl Mon Oct  9 08:36:55 2006
@@ -0,0 +1,270 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions targetNamespace="http://schemas.apache.org/idl/datetime.idl" xmlns:tns="http://schemas.apache.org/idl/datetime.idl" xmlns:corbatm="http://schemas.apache.org/typemap/corba/datetime.idl" xmlns:corba="http://schemas.apache.org/yoko/bindings/corba" xmlns:ns1="http://schemas.apache.org/idl/datetime.idl/corba/typemap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://schemas.apache.org/idltypes/datetime.idl" xmlns:references="http://schemas.apache.org/references" xmlns="http://schemas.xmlsoap.org/wsdl/">
+  <corba:typeMapping targetNamespace="http://schemas.apache.org/idl/datetime.idl/corba/typemap/">
+    <corba:union xmlns:xsd1="http://schemas.apache.org/idltypes/datetime.idl" discriminator="corba:long" repositoryID="IDL:BasePortType/_omg_SimpleUnion:1.0" type="xsd1:BasePortType._omg_SimpleUnion" name="BasePortType._omg_SimpleUnion">
+      <corba:unionbranch name="varUTCTime" idltype="corba:dateTime" default="false">
+        <corba:case label="0" />
+      </corba:unionbranch>
+        <corba:unionbranch name="varInt" idltype="corba:long" default="false">
+          <corba:case label="1" />
+        </corba:unionbranch>
+          <corba:unionbranch name="varFloat" idltype="corba:float" default="false">
+            <corba:case label="2" />
+          </corba:unionbranch>
+          </corba:union>
+            <corba:union xmlns:ns3="http://schemas.apache.org/idltypes/datetime.idl" discriminator="corba:long" repositoryID="IDL:BasePortType/SimpleUnion:1.0" type="ns3:BasePortType.SimpleUnion" name="BasePortType.SimpleUnion">
+              <corba:unionbranch name="varUTCTime" idltype="corba:dateTime" default="false">
+                <corba:case label="0" />
+              </corba:unionbranch>
+                <corba:unionbranch name="varInt" idltype="corba:long" default="false">
+                  <corba:case label="1" />
+                </corba:unionbranch>
+                  <corba:unionbranch name="varFloat" idltype="corba:float" default="false">
+                    <corba:case label="2" />
+                  </corba:unionbranch>
+                  </corba:union>
+                    <corba:struct xmlns:xsd1="http://schemas.apache.org/idltypes/datetime.idl" repositoryID="IDL:TimeBase/IntervalT:1.0" type="xsd1:TimeBase.IntervalT" name="TimeBase.IntervalT">
+                      <corba:member name="lower_bound" idltype="corba:ulonglong" />
+                      <corba:member name="upper_bound" idltype="corba:ulonglong" />
+                    </corba:struct>
+                      <corba:struct xmlns:xsd1="http://schemas.apache.org/idltypes/datetime.idl" repositoryID="IDL:BasePortType/SimpleStruct:1.0" type="xsd1:BasePortType.SimpleStruct" name="BasePortType.SimpleStruct">
+                        <corba:member name="varUTCTime" idltype="corba:dateTime" />
+                        <corba:member name="varInt" idltype="corba:long" />
+                        <corba:member name="varTime" idltype="corba:ulonglong" />
+                      </corba:struct>
+                      </corba:typeMapping>
+  <types>
+    <schema targetNamespace="http://schemas.apache.org/idltypes/datetime.idl" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <xsd:complexType xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeBase.IntervalT">
+        <xsd:sequence>
+          <xsd:element name="lower_bound" type="xsd:unsignedLong"/>
+          <xsd:element name="upper_bound" type="xsd:unsignedLong"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.SimpleStruct">
+        <xsd:sequence>
+          <xsd:element name="varUTCTime" type="xsd:dateTime"/>
+          <xsd:element name="varInt" type="xsd:int"/>
+          <xsd:element name="varTime" type="xsd:unsignedLong"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.SimpleUnion">
+        <xsd:choice>
+          <xsd:element name="varUTCTime" type="xsd:dateTime"/>
+          <xsd:element name="varInt" type="xsd:int"/>
+          <xsd:element name="varFloat" type="xsd:float"/>
+        </xsd:choice>
+      </xsd:complexType>
+      <xsd:complexType xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType._omg_SimpleUnion">
+        <xsd:sequence>
+          <xsd:element maxOccurs="1" minOccurs="1" name="discriminator" type="xsd:int"/>
+          <xsd:choice maxOccurs="1" minOccurs="0">
+            <xsd:element name="varUTCTime" type="xsd:dateTime"/>
+            <xsd:element name="varInt" type="xsd:int"/>
+            <xsd:element name="varFloat" type="xsd:float"/>
+          </xsd:choice>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoDateTime.input" type="xsd:dateTime"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoDateTime.return" type="xsd:dateTime"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoDate.input" type="xsd:date"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoDate.return" type="xsd:date"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoTime.input" type="xsd:time"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoTime.return" type="xsd:time"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoGYearMonth.input" type="xsd:gYearMonth"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoGYearMonth.return" type="xsd:gYearMonth"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoGYear.input" type="xsd:gYear"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoGYear.return" type="xsd:gYear"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoGMonthDay.input" type="xsd:gMonthDay"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoGMonthDay.return" type="xsd:gMonthDay"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoGMonth.input" type="xsd:gMonth"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoGMonth.return" type="xsd:gMonth"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoGDay.input" type="xsd:gDay"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.echoGDay.return" type="xsd:gDay"/>
+      <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BasePortType.set_interval.interval" type="xsd1:TimeBase.IntervalT"/>
+    </schema>
+  </types>
+  <message name="BasePortType.set_intervalResponse">
+  </message>
+  <message name="BasePortType.echoGYear">
+    <part name="inputGYear" element="xsd1:BasePortType.echoGYear.input"/>
+  </message>
+  <message name="BasePortType.echoGMonthResponse">
+    <part name="return" element="xsd1:BasePortType.echoGMonth.return"/>
+  </message>
+  <message name="BasePortType.echoDateTime">
+    <part name="inputDateTime" element="xsd1:BasePortType.echoDateTime.input"/>
+  </message>
+  <message name="BasePortType.echoGYearMonthResponse">
+    <part name="return" element="xsd1:BasePortType.echoGYearMonth.return"/>
+  </message>
+  <message name="BasePortType.echoTimeResponse">
+    <part name="return" element="xsd1:BasePortType.echoTime.return"/>
+  </message>
+  <message name="BasePortType.echoGYearResponse">
+    <part name="return" element="xsd1:BasePortType.echoGYear.return"/>
+  </message>
+  <message name="BasePortType.echoGDay">
+    <part name="inputGDay" element="xsd1:BasePortType.echoGDay.input"/>
+  </message>
+  <message name="BasePortType.echoGMonthDayResponse">
+    <part name="return" element="xsd1:BasePortType.echoGMonthDay.return"/>
+  </message>
+  <message name="BasePortType.echoGYearMonth">
+    <part name="inputGYearMonth" element="xsd1:BasePortType.echoGYearMonth.input"/>
+  </message>
+  <message name="BasePortType.echoGMonthDay">
+    <part name="inputGMonthDay" element="xsd1:BasePortType.echoGMonthDay.input"/>
+  </message>
+  <message name="BasePortType.echoTime">
+    <part name="inputTime" element="xsd1:BasePortType.echoTime.input"/>
+  </message>
+  <message name="BasePortType.echoDate">
+    <part name="inputDate" element="xsd1:BasePortType.echoDate.input"/>
+  </message>
+  <message name="BasePortType.echoDateTimeResponse">
+    <part name="return" element="xsd1:BasePortType.echoDateTime.return"/>
+  </message>
+  <message name="BasePortType.set_interval">
+    <part name="interval" element="xsd1:BasePortType.set_interval.interval"/>
+  </message>
+  <message name="BasePortType.echoGDayResponse">
+    <part name="return" element="xsd1:BasePortType.echoGDay.return"/>
+  </message>
+  <message name="BasePortType.echoDateResponse">
+    <part name="return" element="xsd1:BasePortType.echoDate.return"/>
+  </message>
+  <message name="BasePortType.echoGMonth">
+    <part name="inputGMonth" element="xsd1:BasePortType.echoGMonth.input"/>
+  </message>
+  <portType name="BasePortType">
+    <operation name="echoDateTime">
+      <input name="echoDateTime" message="tns:BasePortType.echoDateTime"/>
+      <output name="echoDateTimeResponse" message="tns:BasePortType.echoDateTimeResponse"/>
+    </operation>
+    <operation name="echoDate">
+      <input name="echoDate" message="tns:BasePortType.echoDate"/>
+      <output name="echoDateResponse" message="tns:BasePortType.echoDateResponse"/>
+    </operation>
+    <operation name="echoTime">
+      <input name="echoTime" message="tns:BasePortType.echoTime"/>
+      <output name="echoTimeResponse" message="tns:BasePortType.echoTimeResponse"/>
+    </operation>
+    <operation name="echoGYearMonth">
+      <input name="echoGYearMonth" message="tns:BasePortType.echoGYearMonth"/>
+      <output name="echoGYearMonthResponse" message="tns:BasePortType.echoGYearMonthResponse"/>
+    </operation>
+    <operation name="echoGYear">
+      <input name="echoGYear" message="tns:BasePortType.echoGYear"/>
+      <output name="echoGYearResponse" message="tns:BasePortType.echoGYearResponse"/>
+    </operation>
+    <operation name="echoGMonthDay">
+      <input name="echoGMonthDay" message="tns:BasePortType.echoGMonthDay"/>
+      <output name="echoGMonthDayResponse" message="tns:BasePortType.echoGMonthDayResponse"/>
+    </operation>
+    <operation name="echoGMonth">
+      <input name="echoGMonth" message="tns:BasePortType.echoGMonth"/>
+      <output name="echoGMonthResponse" message="tns:BasePortType.echoGMonthResponse"/>
+    </operation>
+    <operation name="echoGDay">
+      <input name="echoGDay" message="tns:BasePortType.echoGDay"/>
+      <output name="echoGDayResponse" message="tns:BasePortType.echoGDayResponse"/>
+    </operation>
+    <operation name="set_interval">
+      <input name="set_interval" message="tns:BasePortType.set_interval"/>
+      <output name="set_intervalResponse" message="tns:BasePortType.set_intervalResponse"/>
+    </operation>
+  </portType>
+  <binding name="BaseCORBABinding" type="tns:BasePortType">
+    <corba:binding repositoryID="IDL:BasePortType:1.0" />
+    <operation name="echoDateTime">
+      <corba:operation name="echoDateTime">
+        <corba:param mode="in" name="inputDateTime" idltype="corba:dateTime" />
+        <corba:return name="return" idltype="corba:dateTime" />
+      </corba:operation>
+      <input name="echoDateTime">
+      </input>
+      <output name="echoDateTimeResponse">
+      </output>
+    </operation>
+    <operation name="echoDate">
+      <corba:operation name="echoDate">
+        <corba:param mode="in" name="inputDate" idltype="corba:string" />
+        <corba:return name="return" idltype="corba:string" />
+      </corba:operation>
+      <input name="echoDate">
+      </input>
+      <output name="echoDateResponse">
+      </output>
+    </operation>
+    <operation name="echoTime">
+      <corba:operation name="echoTime">
+        <corba:param mode="in" name="inputTime" idltype="corba:string" />
+        <corba:return name="return" idltype="corba:string" />
+      </corba:operation>
+      <input name="echoTime">
+      </input>
+      <output name="echoTimeResponse">
+      </output>
+    </operation>
+    <operation name="echoGYearMonth">
+      <corba:operation name="echoGYearMonth">
+        <corba:param mode="in" name="inputGYearMonth" idltype="corba:string" />
+        <corba:return name="return" idltype="corba:string" />
+      </corba:operation>
+      <input name="echoGYearMonth">
+      </input>
+      <output name="echoGYearMonthResponse">
+      </output>
+    </operation>
+    <operation name="echoGYear">
+      <corba:operation name="echoGYear">
+        <corba:param mode="in" name="inputGYear" idltype="corba:string" />
+        <corba:return name="return" idltype="corba:string" />
+      </corba:operation>
+      <input name="echoGYear">
+      </input>
+      <output name="echoGYearResponse">
+      </output>
+    </operation>
+    <operation name="echoGMonthDay">
+      <corba:operation name="echoGMonthDay">
+        <corba:param mode="in" name="inputGMonthDay" idltype="corba:string" />
+        <corba:return name="return" idltype="corba:string" />
+      </corba:operation>
+      <input name="echoGMonthDay">
+      </input>
+      <output name="echoGMonthDayResponse">
+      </output>
+    </operation>
+    <operation name="echoGMonth">
+      <corba:operation name="echoGMonth">
+        <corba:param mode="in" name="inputGMonth" idltype="corba:string" />
+        <corba:return name="return" idltype="corba:string" />
+      </corba:operation>
+      <input name="echoGMonth">
+      </input>
+      <output name="echoGMonthResponse">
+      </output>
+    </operation>
+    <operation name="echoGDay">
+      <corba:operation name="echoGDay">
+        <corba:param mode="in" name="inputGDay" idltype="corba:string" />
+        <corba:return name="return" idltype="corba:string" />
+      </corba:operation>
+      <input name="echoGDay">
+      </input>
+      <output name="echoGDayResponse">
+      </output>
+    </operation>
+    <operation name="set_interval">
+      <corba:operation name="set_interval">
+        <corba:param xmlns:ns1="http://schemas.apache.org/idl/datetime.idl/corba/typemap/" mode="in" name="interval" idltype="ns1:TimeBase.IntervalT" />
+      </corba:operation>
+      <input name="set_interval">
+      </input>
+      <output name="set_intervalResponse">
+      </output>
+    </operation>
+  </binding>
+</definitions>

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

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

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

Added: incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_datetime.idl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_datetime.idl?view=auto&rev=454409
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_datetime.idl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_datetime.idl Mon Oct  9 08:36:55 2006
@@ -0,0 +1,61 @@
+#include <omg/TimeBase.idl>
+
+interface BasePortType {
+    union _omg_SimpleUnion switch(long) {
+        case 0:
+            TimeBase::UtcT varUTCTime;
+        case 1:
+            long varInt;
+        case 2:
+            float varFloat;
+    };
+    union SimpleUnion switch(long) {
+        case 0:
+            TimeBase::UtcT varUTCTime;
+        case 1:
+            long varInt;
+        case 2:
+            float varFloat;
+    };
+    struct SimpleStruct {
+        TimeBase::UtcT varUTCTime;
+        long varInt;
+        unsigned long long varTime;
+    };
+    TimeBase::UtcT
+    echoDateTime(
+        in TimeBase::UtcT inputDateTime
+    );
+    string
+    echoDate(
+        in string inputDate
+    );
+    string
+    echoTime(
+        in string inputTime
+    );
+    string
+    echoGYearMonth(
+        in string inputGYearMonth
+    );
+    string
+    echoGYear(
+        in string inputGYear
+    );
+    string
+    echoGMonthDay(
+        in string inputGMonthDay
+    );
+    string
+    echoGMonth(
+        in string inputGMonth
+    );
+    string
+    echoGDay(
+        in string inputGDay
+    );
+    void
+    set_interval(
+        in ::TimeBase::IntervalT interval
+    );
+};

Added: incubator/yoko/trunk/tools/src/test/resources/wsdl/datetime.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/wsdl/datetime.wsdl?view=auto&rev=454409
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/wsdl/datetime.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/wsdl/datetime.wsdl Mon Oct  9 08:36:55 2006
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
+ targetNamespace="http://schemas.apache.org/idl/datetime.idl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://schemas.apache.org/idl/datetime.idl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsd1="http://schemas.apache.org/idltypes/datetime.idl"
+ xmlns:corba="http://schemas.apache.org/bindings/corba"
+ xmlns:corbatm="http://schemas.apache.org/typemap/corba/datetime.idl"
+ xmlns:references="http://schemas.apache.org/references">
+  <types>
+    <schema targetNamespace="http://schemas.apache.org/idltypes/datetime.idl"
+     xmlns="http://www.w3.org/2001/XMLSchema"
+     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <xsd:complexType name="TimeBase.IntervalT">
+        <xsd:sequence>
+          <xsd:element name="lower_bound" type="xsd:unsignedLong"/>
+          <xsd:element name="upper_bound" type="xsd:unsignedLong"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="BasePortType.SimpleStruct">
+        <xsd:sequence>
+          <xsd:element name="varUTCTime" type="xsd:dateTime"/>
+          <xsd:element name="varInt" type="xsd:int"/>
+          <xsd:element name="varTime" type="xsd:unsignedLong"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="BasePortType.SimpleUnion">
+        <xsd:choice>
+          <xsd:element name="varUTCTime" type="xsd:dateTime"/>
+          <xsd:element name="varInt" type="xsd:int"/>
+          <xsd:element name="varFloat" type="xsd:float"/>
+        </xsd:choice>
+      </xsd:complexType>
+      <xsd:complexType name="BasePortType._omg_SimpleUnion">
+        <xsd:sequence>
+          <xsd:element minOccurs="1" maxOccurs="1" name="discriminator" type="xsd:int"/>
+          <xsd:choice minOccurs="0" maxOccurs="1">
+            <xsd:element name="varUTCTime" type="xsd:dateTime"/>
+            <xsd:element name="varInt" type="xsd:int"/>
+            <xsd:element name="varFloat" type="xsd:float"/>
+          </xsd:choice>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:element name="BasePortType.echoDateTime.input" type="xsd:dateTime"/>
+      <xsd:element name="BasePortType.echoDateTime.return" type="xsd:dateTime"/>
+      <xsd:element name="BasePortType.echoDate.input" type="xsd:date"/>
+      <xsd:element name="BasePortType.echoDate.return" type="xsd:date"/>
+      <xsd:element name="BasePortType.echoTime.input" type="xsd:time"/>
+      <xsd:element name="BasePortType.echoTime.return" type="xsd:time"/>
+      <xsd:element name="BasePortType.echoGYearMonth.input" type="xsd:gYearMonth"/>
+      <xsd:element name="BasePortType.echoGYearMonth.return" type="xsd:gYearMonth"/>
+      <xsd:element name="BasePortType.echoGYear.input" type="xsd:gYear"/>
+      <xsd:element name="BasePortType.echoGYear.return" type="xsd:gYear"/>
+      <xsd:element name="BasePortType.echoGMonthDay.input" type="xsd:gMonthDay"/>
+      <xsd:element name="BasePortType.echoGMonthDay.return" type="xsd:gMonthDay"/>
+      <xsd:element name="BasePortType.echoGMonth.input" type="xsd:gMonth"/>
+      <xsd:element name="BasePortType.echoGMonth.return" type="xsd:gMonth"/>
+      <xsd:element name="BasePortType.echoGDay.input" type="xsd:gDay"/>
+      <xsd:element name="BasePortType.echoGDay.return" type="xsd:gDay"/>
+      <xsd:element name="BasePortType.set_interval.interval" type="xsd1:TimeBase.IntervalT"/>
+    </schema>
+  </types>
+  <message name="BasePortType.echoDateTime">
+    <part name="inputDateTime" element="xsd1:BasePortType.echoDateTime.input"/>
+  </message>
+  <message name="BasePortType.echoDateTimeResponse">
+    <part name="return" element="xsd1:BasePortType.echoDateTime.return"/>
+  </message>
+  <message name="BasePortType.echoDate">
+    <part name="inputDate" element="xsd1:BasePortType.echoDate.input"/>
+  </message>
+  <message name="BasePortType.echoDateResponse">
+    <part name="return" element="xsd1:BasePortType.echoDate.return"/>
+  </message>
+  <message name="BasePortType.echoTime">
+    <part name="inputTime" element="xsd1:BasePortType.echoTime.input"/>
+  </message>
+  <message name="BasePortType.echoTimeResponse">
+    <part name="return" element="xsd1:BasePortType.echoTime.return"/>
+  </message>
+  <message name="BasePortType.echoGYearMonth">
+    <part name="inputGYearMonth" element="xsd1:BasePortType.echoGYearMonth.input"/>
+  </message>
+  <message name="BasePortType.echoGYearMonthResponse">
+    <part name="return" element="xsd1:BasePortType.echoGYearMonth.return"/>
+  </message>
+  <message name="BasePortType.echoGYear">
+    <part name="inputGYear" element="xsd1:BasePortType.echoGYear.input"/>
+  </message>
+  <message name="BasePortType.echoGYearResponse">
+    <part name="return" element="xsd1:BasePortType.echoGYear.return"/>
+  </message>
+  <message name="BasePortType.echoGMonthDay">
+    <part name="inputGMonthDay" element="xsd1:BasePortType.echoGMonthDay.input"/>
+  </message>
+  <message name="BasePortType.echoGMonthDayResponse">
+    <part name="return" element="xsd1:BasePortType.echoGMonthDay.return"/>
+  </message>
+  <message name="BasePortType.echoGMonth">
+    <part name="inputGMonth" element="xsd1:BasePortType.echoGMonth.input"/>
+  </message>
+  <message name="BasePortType.echoGMonthResponse">
+    <part name="return" element="xsd1:BasePortType.echoGMonth.return"/>
+  </message>
+  <message name="BasePortType.echoGDay">
+    <part name="inputGDay" element="xsd1:BasePortType.echoGDay.input"/>
+  </message>
+  <message name="BasePortType.echoGDayResponse">
+    <part name="return" element="xsd1:BasePortType.echoGDay.return"/>
+  </message>
+  <message name="BasePortType.set_interval">
+    <part name="interval" element="xsd1:BasePortType.set_interval.interval"/>
+  </message>
+  <message name="BasePortType.set_intervalResponse"/>
+  <portType name="BasePortType">
+    <operation name="echoDateTime">
+      <input message="tns:BasePortType.echoDateTime" name="echoDateTime"/>
+      <output message="tns:BasePortType.echoDateTimeResponse" name="echoDateTimeResponse"/>
+    </operation>
+    <operation name="echoDate">
+      <input message="tns:BasePortType.echoDate" name="echoDate"/>
+      <output message="tns:BasePortType.echoDateResponse" name="echoDateResponse"/>
+    </operation>
+    <operation name="echoTime">
+      <input message="tns:BasePortType.echoTime" name="echoTime"/>
+      <output message="tns:BasePortType.echoTimeResponse" name="echoTimeResponse"/>
+    </operation>
+    <operation name="echoGYearMonth">
+      <input message="tns:BasePortType.echoGYearMonth" name="echoGYearMonth"/>
+      <output message="tns:BasePortType.echoGYearMonthResponse" name="echoGYearMonthResponse"/>
+    </operation>
+    <operation name="echoGYear">
+      <input message="tns:BasePortType.echoGYear" name="echoGYear"/>
+      <output message="tns:BasePortType.echoGYearResponse" name="echoGYearResponse"/>
+    </operation>
+    <operation name="echoGMonthDay">
+      <input message="tns:BasePortType.echoGMonthDay" name="echoGMonthDay"/>
+      <output message="tns:BasePortType.echoGMonthDayResponse" name="echoGMonthDayResponse"/>
+    </operation>
+    <operation name="echoGMonth">
+      <input message="tns:BasePortType.echoGMonth" name="echoGMonth"/>
+      <output message="tns:BasePortType.echoGMonthResponse" name="echoGMonthResponse"/>
+    </operation>
+    <operation name="echoGDay">
+      <input message="tns:BasePortType.echoGDay" name="echoGDay"/>
+      <output message="tns:BasePortType.echoGDayResponse" name="echoGDayResponse"/>
+    </operation>
+    <operation name="set_interval">
+      <input message="tns:BasePortType.set_interval" name="set_interval"/>
+      <output message="tns:BasePortType.set_intervalResponse" name="set_intervalResponse"/>
+    </operation>
+  </portType>
+</definitions>
\ No newline at end of file

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

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

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