incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mvesc...@apache.org
Subject svn commit: r504945 - in /incubator/yoko/trunk/bindings: ./ src/test/java/org/apache/yoko/bindings/corba/ src/test/resources/idl/ src/test/resources/idl/type_test/
Date Thu, 08 Feb 2007 16:34:23 GMT
Author: mvescovi
Date: Thu Feb  8 08:34:22 2007
New Revision: 504945

URL: http://svn.apache.org/viewvc?view=rev&rev=504945
Log:
[YOKO-245] Adding idltowsdl corba binding tests

Added:
    incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java   (with props)
    incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTest.java   (with props)
    incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestImpl.java   (with props)
    incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestServer.java   (with props)
    incubator/yoko/trunk/bindings/src/test/resources/idl/
    incubator/yoko/trunk/bindings/src/test/resources/idl/type_test/
    incubator/yoko/trunk/bindings/src/test/resources/idl/type_test/idltowsdl_type_test.idl
Modified:
    incubator/yoko/trunk/bindings/pom.xml

Modified: incubator/yoko/trunk/bindings/pom.xml
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/pom.xml?view=diff&rev=504945&r1=504944&r2=504945
==============================================================================
--- incubator/yoko/trunk/bindings/pom.xml (original)
+++ incubator/yoko/trunk/bindings/pom.xml Thu Feb  8 08:34:22 2007
@@ -160,24 +160,35 @@
                                 <property name="test.resources.dir" location="${basedir}/src/test/resources" />
 
                                 <mkdir dir="${generated.resources.test}/wsdl/type_test" />
-                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_1.xsd">
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl"
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.resources.test}/wsdl/type_test/type_test_1.xsd">
                                     <param name="groupID" expression="1" />
                                 </xslt>
-                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_2.xsd">
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl" 
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.resources.test}/wsdl/type_test/type_test_2.xsd">
                                     <param name="groupID" expression="2" />
                                 </xslt>
-                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_3.xsd">
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl" 
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.resources.test}/wsdl/type_test/type_test_3.xsd">
                                     <param name="groupID" expression="3" />
                                 </xslt>
-                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_wsdl.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_corba_inc.wsdl">
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_wsdl.xsl"
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.resources.test}/wsdl/type_test/type_test_corba_inc.wsdl">
                                     <param name="inc_xsd_path" expression="${file.url.prefix}${generated.resources.test}/wsdl/type_test" />
                                     <param name="use_style" expression="document" />
                                     <param name="tns_suffix" expression="corba" />
                                 </xslt>
                                 <mkdir dir="${generated.src.test}/org/apache/type_test/corba" />
-                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_impl_java.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.src.test}/org/apache/type_test/corba/TypeTestImpl.java" />
-                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_tester_java.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.src.test}/org/apache/type_test/corba/TypeTestTester.java" />
-
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_impl_java.xsl"
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.src.test}/org/apache/type_test/corba/TypeTestImpl.java" />
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_tester_java.xsl"
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.src.test}/org/apache/type_test/corba/TypeTestTester.java" />
                             </tasks>
                         </configuration>
                         <goals>
@@ -197,7 +208,9 @@
                                 <property name="test.resources.dir" location="${basedir}/src/test/resources" />
 
                                 <mkdir dir="${generated.resources.test}/wsdl/type_test" />
-                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_wsdl_service.xsl" in="${generated.resources.test}/wsdl/type_test/type_test_corba_binding.wsdl" out="${generated.resources.test}/wsdl/type_test/type_test_corba.wsdl" />
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_wsdl_service.xsl"
+                                      in="${generated.resources.test}/wsdl/type_test/type_test_corba_binding.wsdl"
+                                      out="${generated.resources.test}/wsdl/type_test/type_test_corba.wsdl" />
                             </tasks>
                         </configuration>
                         <goals>
@@ -262,6 +275,26 @@
                             <goal>wsdltoidl</goal>
                         </goals>
                     </execution>
+                    <execution>
+                        <id>idltowsdl-generate-type-test-corba-binding</id>
+                        <phase>process-test-sources</phase>
+                        <configuration>
+                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
+                            <outputDir>${basedir}/target/generated/src/test/resources/wsdl/type_test</outputDir>
+			    <idltowsdlOptions>
+                                <idltowsdlOption>
+                                    <idl>${basedir}/src/test/resources/idl/type_test/idltowsdl_type_test.idl</idl>
+                                        <extraargs>
+					     <extraarg>-a</extraarg>
+					     <extraarg>corbaloc::localhost:40010/idltowsdl_type_test</extraarg>
+                                        </extraargs>
+                                </idltowsdlOption>
+			    </idltowsdlOptions>
+                        </configuration>
+                        <goals>
+                            <goal>idltowsdl</goal>
+                        </goals>
+                    </execution>
                 </executions>
              </plugin>
             <plugin>
@@ -296,6 +329,26 @@
                                             ${basedir}/target/generated/src/test/resources/wsdl/type_test/type_test_3.xsd
                                         </dependency>
                                     </dependencies>
+                                </wsdlOption>
+                            </wsdlOptions>
+                        </configuration>
+                        <goals>
+                            <goal>wsdl2java</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>generate-corba-type-test-java-sources</id>
+                        <phase>process-test-resources</phase>
+                        <configuration>
+                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
+                            <wsdlOptions>
+                                <wsdlOption>
+                                    <wsdl>
+                                        ${basedir}/target/generated/src/test/resources/wsdl/type_test/idltowsdl_type_test.wsdl
+                                    </wsdl>
+                                    <extraargs>
+                                        <extraarg>-verbose</extraarg>
+                                    </extraargs>
                                 </wsdlOption>
                             </wsdlOptions>
                         </configuration>

Added: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java?view=auto&rev=504945
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java (added)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java Thu Feb  8 08:34:22 2007
@@ -0,0 +1,593 @@
+/**
+ * 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.
+ */
+
+package org.apache.yoko.bindings.corba;
+
+import javax.xml.ws.Holder;
+
+import junit.framework.TestCase;
+
+import org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTest;
+import org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTestEnum1;
+import org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTestSeqLong;
+import org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTestStruct1;
+import org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTestUnion1;
+
+import org.apache.yoko.orb.CORBA.Any;
+
+public abstract class AbstractIdlToWsdlTypeTestClient extends TestCase {
+
+    protected static org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTest client;
+    
+    AbstractIdlToWsdlTypeTestClient(String name) {
+        super(name);
+    }
+    
+    public void testGreetMe() {
+        String name = new String("Partner");
+        String ret = client.greetMe(name);
+        String expected = "Hallo there " + name;
+        assertTrue(ret.equals(expected));
+    }
+    
+    ////
+    // base_type
+    
+    public void testFloat() {
+        float valueSets[][] = {
+            {0, 0},                               
+            {Float.parseFloat("-1.1"), 0},
+            {0, Float.parseFloat("1.1")},
+            {Float.MIN_VALUE, Float.MAX_VALUE},
+            {Float.MAX_VALUE, Float.MIN_VALUE},
+        };
+        
+        for (int i = 0; i < valueSets.length; i++) {
+            float in = valueSets[i][0];
+            Holder<Float> inoutOrig = new Holder<Float>(valueSets[i][1]);
+            Holder<Float> inout = new Holder<Float>(valueSets[i][1]);
+            Holder<Float> out = new Holder<Float>();
+
+            float ret = client.testFloat(in, inout, out);
+
+            assertEquals("testFloat(): Incorrect value for out param", inoutOrig.value, out.value);
+            assertEquals("testFloat(): Incorrect value for inout param", Float.valueOf(in), inout.value);
+            assertEquals("testFloat(): Incorrect return value", in, ret);        
+        }
+    }
+    
+    public void testDouble() {
+        double valueSets[][] = {
+            {0, 0},                               
+            {Double.parseDouble("-1.1"), 0},
+            {0, Double.parseDouble("1.1")},
+            {Double.MIN_VALUE, Double.MAX_VALUE},
+            {Double.MAX_VALUE, Double.MIN_VALUE}
+        };
+        
+        for (int i = 0; i < valueSets.length; i++) {
+            double in = valueSets[i][0];
+            Holder<Double> inoutOrig = new Holder<Double>(valueSets[i][1]);
+            Holder<Double> inout = new Holder<Double>(valueSets[i][1]);
+            Holder<Double> out = new Holder<Double>();
+
+            double ret = client.testDouble(in, inout, out);
+
+            assertEquals("testDouble(): Incorrect value for out param", inoutOrig.value, out.value);
+            assertEquals("testDouble(): Incorrect value for inout param", Double.valueOf(in), inout.value);
+            assertEquals("testDouble(): Incorrect return value", in, ret);        
+        }
+    }
+
+    public void testShort() throws Exception {
+        short valueSets[][] = {
+            {0, 0},                   
+            {0, 1},
+            {-1, 0},
+            {Short.MIN_VALUE, Short.MAX_VALUE},
+            {Short.MAX_VALUE, Short.MIN_VALUE},
+        };
+
+        for (int i = 0; i < valueSets.length; i++) {
+            short in = valueSets[i][0];
+            Holder<Short> inoutOrig = new Holder<Short>(valueSets[i][1]);
+            Holder<Short> inout = new Holder<Short>(valueSets[i][1]);
+            Holder<Short> out = new Holder<Short>();
+
+            short ret = client.testShort(in, inout, out);
+            
+            assertEquals("testShort(): Incorrect value for out param", inoutOrig.value, out.value);
+            assertEquals("testShort(): Incorrect value for inout param", Short.valueOf(in), inout.value);
+            assertEquals("testShort(): Incorrect return value", in, ret);
+        }
+    }
+
+    public void testLong() throws Exception {
+        int valueSets[][] = {
+            {0, 0},                   
+            {0, 1},
+            {-1, 0},
+            {Integer.MIN_VALUE, Integer.MAX_VALUE},
+            {Integer.MAX_VALUE, Integer.MIN_VALUE}
+        };
+
+        for (int i = 0; i < valueSets.length; i++) {
+            int in = valueSets[i][0];
+            Holder<Integer> inoutOrig = new Holder<Integer>(valueSets[i][1]);
+            Holder<Integer> inout = new Holder<Integer>(valueSets[i][1]);
+            Holder<Integer> out = new Holder<Integer>();
+
+            long ret = client.testLong(in, inout, out);
+            
+            assertEquals("testLong(): Incorrect value for out param", inoutOrig.value, out.value);
+            assertEquals("testLong(): Incorrect value for inout param", Integer.valueOf(in), inout.value);
+            assertEquals("testLong(): Incorrect return value", in, ret);
+        }
+    }
+
+    public void testLongLong() throws Exception {
+        long valueSets[][] = {
+            {0, 0},                   
+            {0, 1},
+            {-1, 0},
+            {Long.MIN_VALUE, Long.MAX_VALUE},
+            {Long.MAX_VALUE, Long.MIN_VALUE}
+        };
+
+        for (int i = 0; i < valueSets.length; i++) {
+            long in = valueSets[i][0];
+            Holder<Long> inoutOrig = new Holder<Long>(valueSets[i][1]);
+            Holder<Long> inout = new Holder<Long>(valueSets[i][1]);
+            Holder<Long> out = new Holder<Long>();
+
+            long ret = client.testLongLong(in, inout, out);
+            
+            assertEquals("testLongLong(): Incorrect value for out param", inoutOrig.value, out.value);
+            assertEquals("testLongLong(): Incorrect value for inout param", Long.valueOf(in), inout.value);
+            assertEquals("testLongLong(): Incorrect return value", in, ret);
+        }
+    }
+
+    public void testUnsignedShort() throws Exception {
+        int valueSets[][] = {
+            {0, 0},                   
+            {0, 1},
+            {0, Integer.parseInt("16384")},
+            {0, Integer.parseInt("32767")},
+            {0, Integer.parseInt("32768")},
+            {0, Integer.parseInt("65535")},
+            {0, Integer.parseInt("65536")}
+        };
+
+        for (int i = 0; i < valueSets.length; i++) {
+            int in = valueSets[i][0];
+            Holder<Integer> inoutOrig = new Holder<Integer>(valueSets[i][1]);
+            Holder<Integer> inout = new Holder<Integer>(valueSets[i][1]);
+            Holder<Integer> out = new Holder<Integer>();
+
+            int ret = client.testUnsignedShort(in, inout, out);
+            
+            assertEquals("testUnsignedShort(): Incorrect value for out param", inoutOrig.value, out.value);
+            assertEquals("testUnsignedShort(): Incorrect value for inout param", Integer.valueOf(in), inout.value);
+            assertEquals("testUnsignedShort(): Incorrect return value", in, ret);
+        }
+    }
+
+    public void testUnsignedLong() throws Exception {
+        Double MAX = Math.pow(2, 32);
+        long MAX_UNSIGNED_LONG = MAX.longValue() - 1;
+        long valueSets[][] = {
+            {0, 0},                   
+            {0, 1},
+            {0, MAX_UNSIGNED_LONG},
+            {MAX_UNSIGNED_LONG, 0}
+        };
+
+        for (int i = 0; i < valueSets.length; i++) {
+            long in = valueSets[i][0];
+            Holder<Long> inoutOrig = new Holder<Long>(valueSets[i][1]);
+            Holder<Long> inout = new Holder<Long>(valueSets[i][1]);
+            Holder<Long> out = new Holder<Long>();
+
+            long ret = client.testUnsignedLong(in, inout, out);
+            
+            assertEquals("testUnsignedLong(): Incorrect value for out param", inoutOrig.value, out.value);
+            assertEquals("testUnsignedLong(): Incorrect value for inout param", Long.valueOf(in), inout.value);
+            assertEquals("testUnsignedLong(): Incorrect return value", in, ret);
+        }
+    }
+
+    public void testUnsignedLongLong() throws Exception {
+        java.math.BigInteger valueSets[][] = {
+            {java.math.BigInteger.ZERO, java.math.BigInteger.ZERO},                   
+            {java.math.BigInteger.ZERO, java.math.BigInteger.ONE},
+            {java.math.BigInteger.ONE, java.math.BigInteger.ZERO},
+            {java.math.BigInteger.ZERO, java.math.BigInteger.valueOf(Long.MAX_VALUE)},
+            {java.math.BigInteger.valueOf(Long.MAX_VALUE), java.math.BigInteger.ZERO}
+        };
+        
+        for (int i = 0; i < valueSets.length; i++) {
+            java.math.BigInteger in = valueSets[i][0];
+            Holder<java.math.BigInteger> inoutOrig = new Holder<java.math.BigInteger>(valueSets[i][1]);
+            Holder<java.math.BigInteger> inout = new Holder<java.math.BigInteger>(valueSets[i][1]);
+            Holder<java.math.BigInteger> out = new Holder<java.math.BigInteger>();
+
+            java.math.BigInteger ret = client.testUnsignedLongLong(in, inout, out);
+            
+            assertEquals("testUnsignedLongLong(): Incorrect value for out param", inoutOrig.value, out.value);
+            assertEquals("testUnsignedLongLong(): Incorrect value for inout param", in, inout.value);
+            assertEquals("testUnsignedLongLong(): Incorrect return value", in, ret);
+        }
+    }
+
+    public void testChar() throws Exception {
+        byte valueSets[][] = {
+            {0, 0},                   
+            {0, 1},
+            {1, 0},
+            {Byte.MIN_VALUE, Byte.MAX_VALUE},
+            {Byte.MAX_VALUE, Byte.MIN_VALUE}
+        };
+
+        for (int i = 0; i < valueSets.length; i++) {
+            byte in = valueSets[i][0];
+            Holder<Byte> inoutOrig = new Holder<Byte>(valueSets[i][1]);
+            Holder<Byte> inout = new Holder<Byte>(valueSets[i][1]);
+            Holder<Byte> out = new Holder<Byte>();
+
+            byte ret = client.testChar(in, inout, out);
+            
+            assertEquals("testChar(): Incorrect value for out param", inoutOrig.value, out.value);
+            assertEquals("testChar(): Incorrect value for inout param", Byte.valueOf(in), inout.value);
+            assertEquals("testChar(): Incorrect return value", in, ret);
+        }
+    }
+
+    public void testWchar() throws Exception {
+        String valueSets[][] = {
+            {"a", "b"},                   
+            {"b", "a"},
+            {"a", "z"},
+            {"", "y"}
+        };
+
+        for (int i = 0; i < valueSets.length; i++) {
+            String in = valueSets[i][0];
+            Holder<String> inoutOrig = new Holder<String>(valueSets[i][1]);
+            Holder<String> inout = new Holder<String>(valueSets[i][1]);
+            Holder<String> out = new Holder<String>();
+
+            String ret = client.testWchar(in, inout, out);
+            
+            assertEquals("testWchar(): Incorrect value for out param", inoutOrig.value, out.value);
+            assertEquals("testWchar(): Incorrect value for inout param", in, inout.value);
+            assertEquals("testWchar(): Incorrect return value", in, ret);
+        }
+    }
+
+    public void testBoolean() throws Exception {
+        boolean valueSets[][] = {
+            {false, false},                   
+            {false, true},
+            {true, false},
+            {true, true}
+        };
+
+        for (int i = 0; i < valueSets.length; i++) {
+            boolean in = valueSets[i][0];
+            Holder<Boolean> inoutOrig = new Holder<Boolean>(valueSets[i][1]);
+            Holder<Boolean> inout = new Holder<Boolean>(valueSets[i][1]);
+            Holder<Boolean> out = new Holder<Boolean>();
+
+            boolean ret = client.testBoolean(in, inout, out);
+            
+            assertEquals("testBoolean(): Incorrect value for out param", inoutOrig.value, out.value);
+            assertEquals("testBoolean(): Incorrect value for inout param", Boolean.valueOf(in), inout.value);
+            assertEquals("testBoolean(): Incorrect return value", in, ret);
+        }
+    }
+
+    public void testOctet() throws Exception {
+        short valueSets[][] = {
+            {0, 0},                   
+            {0, 1},
+            {-1, 0},
+            {Short.MIN_VALUE, Short.MAX_VALUE},
+            {Short.MAX_VALUE, Short.MIN_VALUE}
+        };
+
+        for (int i = 0; i < valueSets.length; i++) {
+            short in = valueSets[i][0];
+            Holder<Short> inoutOrig = new Holder<Short>(valueSets[i][1]);
+            Holder<Short> inout = new Holder<Short>(valueSets[i][1]);
+            Holder<Short> out = new Holder<Short>();
+
+            short ret = client.testOctet(in, inout, out);
+            
+            assertEquals("testOctet(): Incorrect value for out param", inoutOrig.value, out.value);
+            assertEquals("testOctet(): Incorrect value for inout param", Short.valueOf(in), inout.value);
+            assertEquals("testOctet(): Incorrect return value", in, ret);
+        }
+    }
+
+    public void testAny() throws Exception {
+
+    }
+
+    ////
+    // template_type_spec
+
+    public void testSeqLong() {
+        IdltowsdlTypeTestSeqLong emptySeqLong = new IdltowsdlTypeTestSeqLong();
+        IdltowsdlTypeTestSeqLong zeroSeqLong = new IdltowsdlTypeTestSeqLong();
+        zeroSeqLong.getItem().add(0);
+        IdltowsdlTypeTestSeqLong singleSeqLong = new IdltowsdlTypeTestSeqLong();
+        singleSeqLong.getItem().add(Integer.MAX_VALUE);
+        IdltowsdlTypeTestSeqLong doubleSeqLong = new IdltowsdlTypeTestSeqLong();
+        doubleSeqLong.getItem().add(Integer.MAX_VALUE);
+        doubleSeqLong.getItem().add(Integer.MIN_VALUE);
+        IdltowsdlTypeTestSeqLong tripleSeqLong = new IdltowsdlTypeTestSeqLong();
+        tripleSeqLong.getItem().add(Integer.MIN_VALUE);
+        tripleSeqLong.getItem().add(0);
+        tripleSeqLong.getItem().add(Integer.MAX_VALUE);
+        IdltowsdlTypeTestSeqLong bigSeqLong = new IdltowsdlTypeTestSeqLong();
+        final int BIG_SEQ_LONG_SIZE = 1000;
+        for (int i = 0; i < BIG_SEQ_LONG_SIZE; i++) {
+            bigSeqLong.getItem().add(i);
+        }
+        
+        
+        assertTrue(emptySeqLong.equals(emptySeqLong));
+        IdltowsdlTypeTestSeqLong anotherEmptySeqLong = new IdltowsdlTypeTestSeqLong();
+        assertTrue(emptySeqLong.getItem().equals(anotherEmptySeqLong.getItem()));
+        
+        IdltowsdlTypeTestSeqLong valueSets[][] = {
+            {emptySeqLong, emptySeqLong},
+            {emptySeqLong, zeroSeqLong},
+            {zeroSeqLong, singleSeqLong},
+            {singleSeqLong, doubleSeqLong},
+            {doubleSeqLong, tripleSeqLong},
+            {tripleSeqLong, bigSeqLong},
+            {bigSeqLong, emptySeqLong}
+        };
+
+        for (int i = 0; i < valueSets.length; i++) {
+            IdltowsdlTypeTestSeqLong in = valueSets[i][0];
+            Holder<IdltowsdlTypeTestSeqLong> inoutOrig = new Holder<IdltowsdlTypeTestSeqLong>(valueSets[i][1]);
+            Holder<IdltowsdlTypeTestSeqLong> inout = new Holder<IdltowsdlTypeTestSeqLong>(valueSets[i][1]);
+            Holder<IdltowsdlTypeTestSeqLong> out = new Holder<IdltowsdlTypeTestSeqLong>();
+
+            IdltowsdlTypeTestSeqLong ret = client.testSeqLong(in, inout, out);
+
+            assertTrue("testSeqLong(): Incorrect value for out param", inoutOrig.value.getItem().equals(out.value.getItem()));
+            assertTrue("testSeqLong(): Incorrect value for inout param", in.getItem().equals(inout.value.getItem()));
+            assertTrue("testSeqLong(): Incorrect return value", in.getItem().equals(ret.getItem()));
+        }
+    }
+
+    public void testString() {
+        String empty = new String("");
+        String foo = new String("foo");
+        String bar = new String("bar");
+        String foobar = new String("foobar");
+        StringBuffer strBuf = new StringBuffer();
+        for (int i = 0; i < 1024; i++) {
+            strBuf.append(i);
+        }
+        String bigString = strBuf.toString();
+        
+        String valueSets[][] = {
+            {empty, empty},
+            {empty, foo},
+            {foo, bar},
+            {bar, foobar},
+            {foobar, foobar},
+            {foobar, bigString},
+            {bigString, bigString}
+        };
+        
+        for (int i = 0; i < valueSets.length; i++) {
+            String in = valueSets[i][0];
+            Holder<String> inoutOrig = new Holder<String>(valueSets[i][1]);
+            Holder<String> inout = new Holder<String>(valueSets[i][1]);
+            Holder<String> out = new Holder<String>();
+
+            String ret = client.testString(in, inout, out);
+
+            assertTrue("testString(): Incorrect value for out param", inoutOrig.value.equals(out.value));
+            assertTrue("testString(): Incorrect value for inout param", in.equals(inout.value));
+            assertTrue("testString(): Incorrect return value", in.equals(ret));
+        }        
+    }
+
+    public void testWstring() {
+        String empty = new String("");
+        String foo = new String("foo");
+        String bar = new String("bar");
+        String foobar = new String("foobar");
+        StringBuffer strBuf = new StringBuffer();
+        for (int i = 0; i < 1024; i++) {
+            strBuf.append(i);
+        }
+        String bigString = strBuf.toString();
+        
+        String valueSets[][] = {
+            {empty, empty},
+            {empty, foo},
+            {foo, bar},
+            {bar, foobar},
+            {foobar, foobar},
+            {foobar, bigString},
+            {bigString, bigString}
+        };
+        
+        for (int i = 0; i < valueSets.length; i++) {
+            String in = valueSets[i][0];
+            Holder<String> inoutOrig = new Holder<String>(valueSets[i][1]);
+            Holder<String> inout = new Holder<String>(valueSets[i][1]);
+            Holder<String> out = new Holder<String>();
+
+            String ret = client.testWstring(in, inout, out);
+
+            assertTrue("testWstring(): Incorrect value for out param", inoutOrig.value.equals(out.value));
+            assertTrue("testWstring(): Incorrect value for inout param", in.equals(inout.value));
+            assertTrue("testWstring(): Incorrect return value", in.equals(ret));
+        }                
+    }
+
+    public void testFixedPt() {
+        double d0 = 0.01;
+        double d1 = 1.01;
+        double d2 = 123.12;
+        double d3 = 1234567890.12;
+        java.math.BigDecimal valueSets[][] = {
+            {java.math.BigDecimal.valueOf(d0), java.math.BigDecimal.valueOf(d0)},
+            {java.math.BigDecimal.valueOf(d1), java.math.BigDecimal.valueOf(d0)},
+            {java.math.BigDecimal.valueOf(d1), java.math.BigDecimal.valueOf(d2)},
+            {java.math.BigDecimal.valueOf(d2), java.math.BigDecimal.valueOf(d1)},
+            {java.math.BigDecimal.valueOf(d2), java.math.BigDecimal.valueOf(d3)}
+        };
+        
+        for (int i = 0; i < valueSets.length; i++) {
+            java.math.BigDecimal in = valueSets[i][0];
+            Holder<java.math.BigDecimal> inoutOrig = new Holder<java.math.BigDecimal>(valueSets[i][1]);
+            Holder<java.math.BigDecimal> inout = new Holder<java.math.BigDecimal>(valueSets[i][1]);
+            Holder<java.math.BigDecimal> out = new Holder<java.math.BigDecimal>();
+
+            java.math.BigDecimal ret = client.testFixedPt(in, inout, out);
+
+            assertTrue("testFixedPt(): Incorrect value for out param", inoutOrig.value.equals(out.value));
+            assertTrue("testFixedPt(): Incorrect value for inout param", in.equals(inout.value));
+            assertTrue("testFixedPt(): Incorrect return value", in.equals(ret));
+        }                
+    }
+
+    ////
+    // constr_type_spec
+
+    public void testStruct() {
+        IdltowsdlTypeTestStruct1 s0 = new IdltowsdlTypeTestStruct1();
+        s0.setStruct1Long(0);
+        s0.setStruct1Short((short) 0);
+        IdltowsdlTypeTestStruct1 s1 = new IdltowsdlTypeTestStruct1();
+        s1.setStruct1Long(1);
+        s1.setStruct1Short((short) 1);
+        IdltowsdlTypeTestStruct1 s2 = new IdltowsdlTypeTestStruct1();
+        s2.setStruct1Long(Integer.MAX_VALUE);
+        s2.setStruct1Short(Short.MAX_VALUE);
+        
+        IdltowsdlTypeTestStruct1 valueSets[][] = {
+            {s0, s0},
+            {s0, s1},
+            {s1, s0},
+            {s1, s2},
+            {s2, s2}
+        };
+        
+        for (int i = 0; i < valueSets.length; i++) {
+            IdltowsdlTypeTestStruct1 in = valueSets[i][0];
+            Holder<IdltowsdlTypeTestStruct1> inoutOrig = new Holder<IdltowsdlTypeTestStruct1>(valueSets[i][1]);
+            Holder<IdltowsdlTypeTestStruct1> inout = new Holder<IdltowsdlTypeTestStruct1>(valueSets[i][1]);
+            Holder<IdltowsdlTypeTestStruct1> out = new Holder<IdltowsdlTypeTestStruct1>();
+
+            IdltowsdlTypeTestStruct1 ret = client.testStruct(in, inout, out);
+
+            assertEquals("testStruct(): Incorrect value for out param", inoutOrig.value.getStruct1Long(), out.value.getStruct1Long());
+            assertEquals("testStruct(): Incorrect value for out param", inoutOrig.value.getStruct1Short(), out.value.getStruct1Short());
+            assertEquals("testStruct(): Incorrect value for inout param", in.getStruct1Long() ,inout.value.getStruct1Long());
+            assertEquals("testStruct(): Incorrect value for inout param", in.getStruct1Short() ,inout.value.getStruct1Short());
+            assertEquals("testStruct(): Incorrect return value", in.getStruct1Long(), ret.getStruct1Long());
+            assertEquals("testStruct(): Incorrect return value", in.getStruct1Short(), ret.getStruct1Short());
+        }                        
+    }
+
+    public void testUnion() {
+        IdltowsdlTypeTestUnion1 u0 = new IdltowsdlTypeTestUnion1();
+        u0.setDiscriminator(IdltowsdlTypeTestEnum1.E_1_1);
+        u0.setU11(Integer.MAX_VALUE);
+        IdltowsdlTypeTestUnion1 u1 = new IdltowsdlTypeTestUnion1();
+        u1.setDiscriminator(IdltowsdlTypeTestEnum1.E_1_2);
+        u1.setU12(new String("foo"));
+        IdltowsdlTypeTestUnion1 u2 = new IdltowsdlTypeTestUnion1();
+        u2.setDiscriminator(IdltowsdlTypeTestEnum1.E_1_3);
+        u2.setU12(new String("bar"));
+        IdltowsdlTypeTestUnion1 u3 = new IdltowsdlTypeTestUnion1();
+        u3.setU13(Short.MAX_VALUE);
+        
+        IdltowsdlTypeTestUnion1 valueSets[][] = {
+            {u0, u0},
+            {u0, u1},
+            {u1, u2},
+            {u2, u3}
+        };
+        
+        for (int i = 0; i < valueSets.length; i++) {
+            IdltowsdlTypeTestUnion1 in = valueSets[i][0];
+            Holder<IdltowsdlTypeTestUnion1> inoutOrig = new Holder<IdltowsdlTypeTestUnion1>(valueSets[i][1]);
+            Holder<IdltowsdlTypeTestUnion1> inout = new Holder<IdltowsdlTypeTestUnion1>(valueSets[i][1]);
+            Holder<IdltowsdlTypeTestUnion1> out = new Holder<IdltowsdlTypeTestUnion1>();
+
+            IdltowsdlTypeTestUnion1 ret = client.testUnion(in, inout, out);
+
+            assertTrue("testStruct(): Incorrect value for out param", compareUnion(inoutOrig.value, out.value));
+            assertTrue("testStruct(): Incorrect value for inout param", compareUnion(in,inout.value));
+            assertTrue("testStruct(): Incorrect return value", compareUnion(in, ret));
+        }                        
+    }
+
+    private boolean compareUnion(IdltowsdlTypeTestUnion1 left, IdltowsdlTypeTestUnion1 right) {
+        boolean result = true;
+        if (left.getDiscriminator().equals(right.getDiscriminator())) {
+            IdltowsdlTypeTestEnum1 discriminator = left.getDiscriminator();
+            if (discriminator.equals(IdltowsdlTypeTestEnum1.E_1_1)) {
+                result = left.getU11().equals(right.getU11());
+            } else if (discriminator.equals(IdltowsdlTypeTestEnum1.E_1_2)
+                || discriminator.equals(IdltowsdlTypeTestEnum1.E_1_3) ) {
+                result = left.getU12().equals(right.getU12());
+            } else {
+                result = left.getU13().equals(right.getU13());
+            }
+        } else {
+            result = false;
+        }
+        return result;
+    }
+    
+    public void testEnum() {
+        IdltowsdlTypeTestEnum1 valueSets[][] = {
+            {IdltowsdlTypeTestEnum1.E_1_1, IdltowsdlTypeTestEnum1.E_1_1},
+            {IdltowsdlTypeTestEnum1.E_1_1, IdltowsdlTypeTestEnum1.E_1_2},
+            {IdltowsdlTypeTestEnum1.E_1_2, IdltowsdlTypeTestEnum1.E_1_3},
+            {IdltowsdlTypeTestEnum1.E_1_3, IdltowsdlTypeTestEnum1.E_1_3},            
+        };
+        
+        for (int i = 0; i < valueSets.length; i++) {
+            IdltowsdlTypeTestEnum1 in = valueSets[i][0];
+            Holder<IdltowsdlTypeTestEnum1> inoutOrig = new Holder<IdltowsdlTypeTestEnum1>(valueSets[i][1]);
+            Holder<IdltowsdlTypeTestEnum1> inout = new Holder<IdltowsdlTypeTestEnum1>(valueSets[i][1]);
+            Holder<IdltowsdlTypeTestEnum1> out = new Holder<IdltowsdlTypeTestEnum1>();
+
+            IdltowsdlTypeTestEnum1 ret = client.testEnum(in, inout, out);
+
+            assertEquals("testEnum(): Incorrect value for out param", inoutOrig.value, out.value);
+            assertEquals("testEnum(): Incorrect value for inout param", in,inout.value);
+            assertEquals("testEnum(): Incorrect return value", in, ret);
+        }
+    }
+}

Propchange: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTest.java?view=auto&rev=504945
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTest.java (added)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTest.java Thu Feb  8 08:34:22 2007
@@ -0,0 +1,126 @@
+/**
+ * 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.
+ */
+
+package org.apache.yoko.bindings.corba;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTestSeqLong;
+import org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTestStruct1;
+import org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTestUnion1;
+import org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTestEnum1;
+
+public class IdlToWsdlTypeTest extends AbstractIdlToWsdlTypeTestClient {
+    protected static final String WSDL_PATH = "/wsdl/type_test/idltowsdl_type_test.wsdl";
+    protected static final QName SERVICE_NAME = new QName("http://schemas.apache.org/yoko/idl/idltowsdl_type_test", "idltowsdlTypeTestCORBAService");
+    protected static final QName PORT_NAME = new QName("http://schemas.apache.org/yoko/idl/idltowsdl_type_test", "idltowsdlTypeTestCORBAPort");
+    
+    static boolean serverStarted = false;
+    
+    public IdlToWsdlTypeTest(String name) {
+        super(name);
+    }
+
+    public static Test suite() throws Exception {
+        TestSuite suite = new TestSuite(IdlToWsdlTypeTest.class);
+        return new IdlToWsdlTypeTestSetup(suite) {
+                public void setUp() throws Exception {
+                    super.setUp();
+                    initClient(IdlToWsdlTypeTest.class, SERVICE_NAME, PORT_NAME, WSDL_PATH);
+                }
+            };
+    }
+
+    public static void main(String[] args) throws Exception {
+        initClient(IdlToWsdlTypeTest.class, SERVICE_NAME, PORT_NAME, WSDL_PATH);
+        junit.textui.TestRunner.run(IdlToWsdlTypeTest.class);       
+    }
+
+    public static void initClient(Class clz, QName serviceName, QName portName, String wsdlPath) 
+    throws Exception {       
+        URL wsdlLocation = clz.getResource(wsdlPath);
+        org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTestCORBAService service =
+            new org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTestCORBAService(wsdlLocation, serviceName);
+        client = service.getPort(portName, org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTest.class);
+        assertNotNull("Could not create corba client", client);
+    }
+    
+    static abstract class IdlToWsdlTypeTestSetup extends TestSetup {
+
+        ServerLauncher sl = null;
+
+        public IdlToWsdlTypeTestSetup(Test tester) {
+            super(tester);
+            boolean startServer = !Boolean.getBoolean("NO_SERVER_START");
+            if (startServer) {
+                java.util.Map<String, String> properties = new java.util.HashMap<String, String>();
+                properties.put("java.endorsed.dirs", System.getProperty("java.endorsed.dirs"));
+                sl = new ServerLauncher(IdlToWsdlTypeTestServer.class.getName(), properties, null);
+            }
+        }
+
+        public void setUp() throws Exception {
+            if (sl != null) {
+                boolean ok = sl.launchServer();
+                assertTrue("failed to launch server", ok);
+            }
+        }
+
+        public void tearDown() throws Exception {
+            boolean passed = true;
+            if (sl != null) {
+                try { 
+                    sl.signalStop();
+                } catch (IOException ex) {
+                    ex.printStackTrace();
+                }
+
+                try { 
+                    passed = passed && sl.stopServer(); 
+                } catch (IOException ex) {
+                    ex.printStackTrace();
+                }
+            }
+            System.gc();
+            assertTrue("server failed", passed);
+        }
+    }
+    
+    
+    // following empty methods override real implementation until test failures are resolved
+    public void testUnsignedShort() { }
+    public void testUnsignedLong() { }
+    public void testChar() { }
+    public void testWchar() { }
+    public void testOctet () { }
+    //public void testAny () { }
+    public void testString() { }
+    public void testWstring() { }
+    public void testStruct() { }
+    public void testUnion() { }
+    public void testEnum() { }
+    
+}

Propchange: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestImpl.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestImpl.java?view=auto&rev=504945
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestImpl.java (added)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestImpl.java Thu Feb  8 08:34:22 2007
@@ -0,0 +1,212 @@
+/**
+ * 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.
+ */
+
+package org.apache.yoko.bindings.corba;
+
+import javax.jws.WebService;
+
+import org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTest;
+import org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTestEnum1;
+import org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTestSeqLong;
+import org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTestStruct1;
+import org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTestUnion1;
+
+@WebService(serviceName = "idltowsdlTypeTestCORBAService", portName = "idltowsdlTypeTestCORBAPort",
+            endpointInterface = "org.apache.schemas.yoko.idl.idltowsdl_type_test.IdltowsdlTypeTest",
+            targetNamespace = "http://schemas.apache.org/yoko/idl/idltowsdl_type_test")
+class IdlToWsdlTypeTestImpl implements IdltowsdlTypeTest {
+    
+    public java.lang.String greetMe(java.lang.String name) {
+        return new String("Hallo there " + name);
+    }
+
+    // base
+    
+    public float testFloat(float inFloat,
+                           javax.xml.ws.Holder<java.lang.Float> inoutFloat,
+                           javax.xml.ws.Holder<java.lang.Float> outFloat) {
+        outFloat.value = inoutFloat.value;
+        inoutFloat.value = inFloat;
+        return inFloat;
+    }
+
+    public double testDouble(double inDouble,
+                             javax.xml.ws.Holder<java.lang.Double> inoutDouble,
+                             javax.xml.ws.Holder<java.lang.Double> outDouble) {
+        outDouble.value = inoutDouble.value;
+        inoutDouble.value = inDouble;
+        return inDouble;
+    }
+
+    public short testShort(short inShort,
+                           javax.xml.ws.Holder<java.lang.Short> inoutShort,
+                           javax.xml.ws.Holder<java.lang.Short> outShort) {
+        outShort.value = inoutShort.value;
+        inoutShort.value = inShort;
+        return inShort;
+    }
+
+
+    public int testLong(int inLong,
+                        javax.xml.ws.Holder<java.lang.Integer> inoutLong,
+                        javax.xml.ws.Holder<java.lang.Integer> outLong) {
+        outLong.value = inoutLong.value;
+        inoutLong.value = inLong;
+        return inLong;
+    }
+
+    
+    public long testLongLong(long inLongLong,
+                             javax.xml.ws.Holder<java.lang.Long> inoutLongLong,
+                             javax.xml.ws.Holder<java.lang.Long> outLongLong) {
+        outLongLong.value = inoutLongLong.value;
+        inoutLongLong.value = inLongLong;
+        return inLongLong;            
+    }
+
+    public int testUnsignedShort(int inUnsignedShort,
+                                 javax.xml.ws.Holder<java.lang.Integer> inoutUnsignedShort,
+                                 javax.xml.ws.Holder<java.lang.Integer> outUnsignedShort) {
+        outUnsignedShort.value = inoutUnsignedShort.value;
+        inoutUnsignedShort.value = inUnsignedShort;
+        return inUnsignedShort;
+    }
+
+    public long testUnsignedLong(long inUnsignedLong,
+                                 javax.xml.ws.Holder<java.lang.Long> inoutUnsignedLong,
+                                 javax.xml.ws.Holder<java.lang.Long> outUnsignedLong) {
+        outUnsignedLong.value = inoutUnsignedLong.value;
+        inoutUnsignedLong.value = inUnsignedLong;
+        return inUnsignedLong;
+    }
+
+    public java.math.BigInteger testUnsignedLongLong(java.math.BigInteger inUnsignedLongLong,
+                                                     javax.xml.ws.Holder<java.math.BigInteger> inoutUnsignedLongLong,
+                                                     javax.xml.ws.Holder<java.math.BigInteger> outUnsignedLongLong) {
+        outUnsignedLongLong.value = inoutUnsignedLongLong.value;
+        inoutUnsignedLongLong.value = inUnsignedLongLong;
+        return inUnsignedLongLong;
+    }
+
+    public byte testChar(byte inChar,
+                         javax.xml.ws.Holder<java.lang.Byte> inoutChar,
+                         javax.xml.ws.Holder<java.lang.Byte> outChar) {
+        outChar.value = inoutChar.value;
+        inoutChar.value = inChar;
+        return inChar;
+    }
+
+    public java.lang.String testWchar(java.lang.String inWchar,
+                                      javax.xml.ws.Holder<java.lang.String> inoutWchar,
+                                      javax.xml.ws.Holder<java.lang.String> outWchar) {
+        outWchar.value = inoutWchar.value;
+        inoutWchar.value = inWchar;
+        return inWchar;
+    }
+
+    public boolean testBoolean(boolean inBoolean,
+                               javax.xml.ws.Holder<java.lang.Boolean> inoutBoolean,
+                               javax.xml.ws.Holder<java.lang.Boolean> outBoolean) {
+        outBoolean.value = inoutBoolean.value;
+        inoutBoolean.value = inBoolean;
+        return inBoolean;
+    }
+
+
+    public short testOctet(short inOctet,
+                           javax.xml.ws.Holder<java.lang.Short> inoutOctet,
+                           javax.xml.ws.Holder<java.lang.Short> outOctet) {
+        outOctet.value = inoutOctet.value;
+        inoutOctet.value = inOctet;
+        return inOctet;
+    }
+
+
+    public java.lang.Object testAny(java.lang.Object inAny,
+                                    javax.xml.ws.Holder<java.lang.Object> inoutAny,
+                                    javax.xml.ws.Holder<java.lang.Object> outAny) {
+        outAny.value = inoutAny.value;
+        inoutAny.value = inAny;
+        return inAny;
+    }
+
+    
+    
+    // template
+    
+    public IdltowsdlTypeTestSeqLong testSeqLong(IdltowsdlTypeTestSeqLong inSeqLong,
+                                                javax.xml.ws.Holder<IdltowsdlTypeTestSeqLong> inoutSeqLong,
+                                                javax.xml.ws.Holder<IdltowsdlTypeTestSeqLong> outSeqLong) {
+        outSeqLong.value = inoutSeqLong.value;
+        inoutSeqLong.value = inSeqLong;  
+        return inSeqLong;
+    }
+
+    public java.lang.String testString(java.lang.String inString,
+                                       javax.xml.ws.Holder<java.lang.String> inoutString,
+                                       javax.xml.ws.Holder<java.lang.String> outString) {
+        outString.value = inoutString.value;
+        inoutString.value = inString;
+        return inString;
+    }
+
+    public java.lang.String testWstring(java.lang.String inWstring,
+                                        javax.xml.ws.Holder<java.lang.String> inoutWstring,
+                                        javax.xml.ws.Holder<java.lang.String> outWstring) {
+        outWstring.value = inoutWstring.value;
+        inoutWstring.value = inWstring;
+        return inWstring;
+    }
+
+    public java.math.BigDecimal testFixedPt(java.math.BigDecimal inFixedPt,
+                                            javax.xml.ws.Holder<java.math.BigDecimal> inoutFixedPt,
+                                            javax.xml.ws.Holder<java.math.BigDecimal> outFixedPt) {
+        outFixedPt.value = inoutFixedPt.value;
+        inoutFixedPt.value = inFixedPt;
+        return inFixedPt;
+    }
+
+    
+    // constr
+    
+    public IdltowsdlTypeTestStruct1 testStruct(IdltowsdlTypeTestStruct1 inStruct1,
+                                               javax.xml.ws.Holder<IdltowsdlTypeTestStruct1> inoutStruct1,
+                                               javax.xml.ws.Holder<IdltowsdlTypeTestStruct1> outStruct1) {
+        outStruct1.value = inoutStruct1.value;
+        inoutStruct1.value = inStruct1;
+        return inStruct1;
+    }
+
+    public IdltowsdlTypeTestUnion1 testUnion(IdltowsdlTypeTestUnion1 inUnion1,
+                                             javax.xml.ws.Holder<IdltowsdlTypeTestUnion1> inoutUnion1,
+                                             javax.xml.ws.Holder<IdltowsdlTypeTestUnion1> outUnion1) {
+        outUnion1.value = inoutUnion1.value;
+        inoutUnion1.value = inUnion1;
+        return inUnion1;
+    }
+
+    public IdltowsdlTypeTestEnum1 testEnum(IdltowsdlTypeTestEnum1 inEnum1,
+                                           javax.xml.ws.Holder<IdltowsdlTypeTestEnum1> inoutEnum1,
+                                           javax.xml.ws.Holder<IdltowsdlTypeTestEnum1> outEnum1) {
+        outEnum1.value = inoutEnum1.value;
+        inoutEnum1.value = inEnum1;
+        return inEnum1;
+    }
+
+}

Propchange: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestServer.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestServer.java?view=auto&rev=504945
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestServer.java (added)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestServer.java Thu Feb  8 08:34:22 2007
@@ -0,0 +1,68 @@
+/**
+ * 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.
+ */
+
+package org.apache.yoko.bindings.corba;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.WebParam.Mode;
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+import org.apache.schemas.yoko.idl.idltowsdl_type_test.*;
+
+public class IdlToWsdlTypeTestServer {
+
+    boolean serverReady = false;
+
+    public void _start() {
+        Object implementor = new IdlToWsdlTypeTestImpl();
+        String address = "corbaloc::localhost:40012/type_test";
+        Endpoint.publish(address, implementor);
+        serverReady = true;
+    }
+
+    public static void main(String[] args) {
+        try {
+            IdlToWsdlTypeTestServer s = new IdlToWsdlTypeTestServer();
+            s._start();
+            System.out.println("server ready...");
+            // wait for a key press then shut 
+            // down the server
+            //
+            System.in.read();
+            System.out.println("server passed...");
+            System.out.println("server stopped..."); 
+            System.exit(0);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            System.exit(-1);
+        } finally { 
+            System.out.println("done!");
+        }
+    }
+
+    public boolean isServerReady() {
+        return serverReady;
+    }
+
+}

Propchange: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestServer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/yoko/trunk/bindings/src/test/resources/idl/type_test/idltowsdl_type_test.idl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/resources/idl/type_test/idltowsdl_type_test.idl?view=auto&rev=504945
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/resources/idl/type_test/idltowsdl_type_test.idl (added)
+++ incubator/yoko/trunk/bindings/src/test/resources/idl/type_test/idltowsdl_type_test.idl Thu Feb  8 08:34:22 2007
@@ -0,0 +1,151 @@
+/* 
+ * 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.
+ */ 
+
+interface idltowsdlTypeTest {
+
+    string greetMe(in string name);
+
+    ////
+    // base_type_spec
+
+    // floating point types
+    float testFloat(in float inFloat,
+                    inout float inoutFloat,
+                    out float outFloat);
+    double testDouble(in double inDouble,
+                      inout double inoutDouble,
+                      out double outDouble);
+    // long double primitive type not supported?
+    //long double testLongDouble(in long double inLongDouble,
+    //                           out long double outLongDouble,
+    //                           inout long double inoutLongDouble);
+
+    // signed integers
+    short testShort(in short inShort,
+                    inout short inoutShort,
+                    out short outShort);
+    long testLong(in long inLong,
+                  inout long inoutLong,
+                  out long outLong);
+    long long testLongLong(in long long inLongLong,
+                           inout long long inoutLongLong,
+                           out long long outLongLong);
+
+    // unsigned integers
+    unsigned short testUnsignedShort(in unsigned short inUnsignedShort,
+                                     inout unsigned short inoutUnsignedShort,
+                                     out unsigned short outUnsignedShort);
+    unsigned long testUnsignedLong(in unsigned long inUnsignedLong,
+                                   inout unsigned long inoutUnsignedLong,
+                                   out unsigned long outUnsignedLong);
+    unsigned long long testUnsignedLongLong(in unsigned long long inUnsignedLongLong,
+                                            inout unsigned long long inoutUnsignedLongLong,
+                                            out unsigned long long outUnsignedLongLong);
+
+    // chars
+    char testChar(in char inChar,
+                  inout char inoutChar,
+                  out char outChar);
+    wchar testWchar(in wchar inWchar,
+                    inout wchar inoutWchar,
+                    out wchar outWchar);
+
+    // boolean
+    boolean testBoolean(in boolean inBoolean,
+                        inout boolean inoutBoolean,
+                        out boolean outBoolean);
+
+    // octet
+    octet testOctet(in octet inOctet,
+                    inout octet inoutOctet,
+                    out octet outOctet);
+
+    // any
+    any testAny(in any inAny,
+                inout any inoutAny,
+                out any outAny);
+
+
+    ////
+    // template_type_spec
+
+    // sequence
+    typedef sequence< long > seqLong;
+    seqLong testSeqLong(in seqLong inSeqLong,
+                        inout seqLong inoutSeqLong,
+                        out seqLong outSeqLong);
+
+    // string
+    string testString(in string inString,
+                      inout string inoutString,
+                      out string outString);
+
+    // wide string
+    wstring testWstring(in wstring inWstring,
+                        inout wstring inoutWstring,
+                        out wstring outWstring);
+
+    // fixed point
+    typedef fixed<31, 2> fixedPt;
+    fixedPt testFixedPt(in fixedPt inFixedPt,
+                        inout fixedPt inoutFixedPt,
+                        out fixedPt outFixedPt);    
+
+
+    ////
+    // constr_type_spec
+
+    // struct
+    struct struct1 {
+        long struct1long;
+        short struct1short;
+    };
+    struct1 testStruct(in struct1 inStruct1,
+                       inout struct1 inoutStruct1,
+                       out struct1 outStruct1);
+
+    // union
+    enum enum1 {e1_1,e1_2,e1_3,e1_4};
+    union union1 switch (enum1) {
+      case e1_1:
+	long u1_1;
+      case e1_2:
+      case e1_3:
+	string u1_2;
+      default:
+        short u1_3;
+    };
+    union1 testUnion(in union1 inUnion1,
+                     inout union1 inoutUnion1,
+                     out union1 outUnion1);
+
+    // enum
+    enum1 testEnum(in enum1 inEnum1,
+                   inout enum1 inoutEnum1,
+                   out enum1 outEnum1);
+
+
+    ////
+    // const_type
+//     const wchar wcharConst = L'x';
+//     wcharConst testConst(in wcharConst inWcharConst,
+//                          inout wcharConst inoutWcharConst,
+//                          out wcharConst outWcharConst);
+
+};



Mime
View raw message