cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r451169 [6/6] - in /incubator/cxf/trunk: common/common/src/main/java/org/apache/cxf/jaxb/ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/frontend/jaxws/src/main/java/org/apach...
Date Fri, 29 Sep 2006 08:49:34 GMT
Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient5.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient5.java?view=auto&rev=451169
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient5.java
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient5.java
Fri Sep 29 01:49:33 2006
@@ -0,0 +1,278 @@
+/**
+ * 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.cxf.systest.type_test;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Holder;
+
+import org.apache.type_test.types1.ComplexRestriction;
+import org.apache.type_test.types1.ComplexRestriction2;
+import org.apache.type_test.types1.ComplexRestriction3;
+import org.apache.type_test.types1.ComplexRestriction4;
+import org.apache.type_test.types1.ComplexRestriction5;
+
+public abstract class AbstractTypeTestClient5 extends AbstractTypeTestClient4 {
+
+    public AbstractTypeTestClient5(String name, QName theServicename,
+            QName thePort, String theWsdlPath) {
+        super(name, theServicename, thePort, theWsdlPath);
+    }
+
+    //org.apache.type_test.types1.ComplexRestriction
+
+    public void testComplexRestriction() throws Exception {
+        // normal case, maxLength=10
+        ComplexRestriction x = new ComplexRestriction();
+        x.setValue("str_x");
+        ComplexRestriction yOrig = new ComplexRestriction();
+        yOrig.setValue("string_yyy");
+        Holder<ComplexRestriction> y = new Holder<ComplexRestriction>(yOrig);
+        Holder<ComplexRestriction> z = new Holder<ComplexRestriction>();
+
+        ComplexRestriction ret;
+        if (testDocLiteral) {
+            ret = docClient.testComplexRestriction(x, y, z);
+        } else {
+            ret = rpcClient.testComplexRestriction(x, y, z);
+        }
+        if (!perfTestOnly) {
+            assertEquals("testComplexRestriction(): Incorrect value for inout param",
+                         x.getValue(), y.value.getValue());
+            assertEquals("testComplexRestriction(): Incorrect value for out param",
+                         yOrig.getValue(), z.value.getValue());
+            assertEquals("testComplexRestriction(): Incorrect return value",
+                         x.getValue(), ret.getValue());
+        }
+
+        // abnormal case
+        if (testDocLiteral) {
+            try {
+                x = new ComplexRestriction();
+                x.setValue("string_x");
+                yOrig = new ComplexRestriction();
+                yOrig.setValue("string_yyyyyy");
+                y = new Holder<ComplexRestriction>(yOrig);
+                z = new Holder<ComplexRestriction>();
+
+                ret = docClient.testComplexRestriction(x, y, z);
+                //fail("maxLength=10 restriction is violated.");
+            } catch (Exception ex) {
+                //ex.printStackTrace();
+            }
+        }
+    }
+
+    //org.apache.type_test.types1.ComplexRestriction2
+
+    public void testComplexRestriction2() throws Exception {
+        // normal case, length=10
+        ComplexRestriction2 x = new ComplexRestriction2();
+        x.setValue("string_xxx");
+        ComplexRestriction2 yOrig = new ComplexRestriction2();
+        yOrig.setValue("string_yyy");
+        Holder<ComplexRestriction2> y = new Holder<ComplexRestriction2>(yOrig);
+        Holder<ComplexRestriction2> z = new Holder<ComplexRestriction2>();
+
+        ComplexRestriction2 ret;
+        if (testDocLiteral) {
+            ret = docClient.testComplexRestriction2(x, y, z);
+        } else {
+            ret = rpcClient.testComplexRestriction2(x, y, z);
+        }
+        if (!perfTestOnly) {
+            assertEquals("testComplexRestriction2(): Incorrect value for inout param",
+                         x.getValue(), y.value.getValue());
+            assertEquals("testComplexRestriction2(): Incorrect value for out param",
+                         yOrig.getValue(), z.value.getValue());
+            assertEquals("testComplexRestriction2(): Incorrect return value",
+                         x.getValue(), ret.getValue());
+        }
+
+        // abnormal case
+        if (testDocLiteral) {
+            try {
+                x = new ComplexRestriction2();
+                x.setValue("str_x");
+                yOrig = new ComplexRestriction2();
+                yOrig.setValue("string_yyy");
+                y = new Holder<ComplexRestriction2>(yOrig);
+                z = new Holder<ComplexRestriction2>();
+
+                ret = docClient.testComplexRestriction2(x, y, z);
+                //fail("length=10 restriction is violated.");
+            } catch (Exception ex) {
+                //ex.printStackTrace();
+            }
+        }
+    }
+
+    //org.apache.type_test.types1.ComplexRestriction3
+
+    public void testComplexRestriction3() throws Exception {
+        // normal case, maxLength=10 for ComplexRestriction
+        // && minLength=5 for ComplexRestriction3
+        ComplexRestriction3 x = new ComplexRestriction3();
+        x.setValue("str_x");
+        ComplexRestriction3 yOrig = new ComplexRestriction3();
+        yOrig.setValue("string_yyy");
+        Holder<ComplexRestriction3> y = new Holder<ComplexRestriction3>(yOrig);
+        Holder<ComplexRestriction3> z = new Holder<ComplexRestriction3>();
+
+        ComplexRestriction3 ret;
+        if (testDocLiteral) {
+            ret = docClient.testComplexRestriction3(x, y, z);
+        } else {
+            ret = rpcClient.testComplexRestriction3(x, y, z);
+        }
+        if (!perfTestOnly) {
+            assertEquals("testComplexRestriction3(): Incorrect value for inout param",
+                         x.getValue(), y.value.getValue());
+            assertEquals("testComplexRestriction3(): Incorrect value for out param",
+                         yOrig.getValue(), z.value.getValue());
+            assertEquals("testComplexRestriction3(): Incorrect return value",
+                         x.getValue(), ret.getValue());
+        }
+
+        // abnormal cases
+        if (testDocLiteral) {
+            try {
+                x = new ComplexRestriction3();
+                x.setValue("str");
+                y = new Holder<ComplexRestriction3>(yOrig);
+                z = new Holder<ComplexRestriction3>();
+                ret = docClient.testComplexRestriction3(x, y, z);
+                //fail("maxLength=10 && minLength=5 restriction is violated.");
+            } catch (Exception ex) {
+                //ex.printStackTrace();
+            }
+
+            try {
+                x = new ComplexRestriction3();
+                x.setValue("string_x");
+                yOrig = new ComplexRestriction3();
+                yOrig.setValue("string_yyyyyy");
+                y = new Holder<ComplexRestriction3>(yOrig);
+                z = new Holder<ComplexRestriction3>();
+
+                ret = docClient.testComplexRestriction3(x, y, z);
+                //fail("maxLength=10 && minLength=5 restriction is violated.");
+            } catch (Exception ex) {
+                //ex.printStackTrace();
+            }
+        }
+    }
+
+    //org.apache.type_test.types1.ComplexRestriction4
+
+    public void testComplexRestriction4() throws Exception {
+        // normal case, maxLength=10 for ComplexRestriction
+        // && maxLength=5 for ComplexRestriction4
+        ComplexRestriction4 x = new ComplexRestriction4();
+        x.setValue("str_x");
+        ComplexRestriction4 yOrig = new ComplexRestriction4();
+        yOrig.setValue("y");
+        Holder<ComplexRestriction4> y = new Holder<ComplexRestriction4>(yOrig);
+        Holder<ComplexRestriction4> z = new Holder<ComplexRestriction4>();
+
+        ComplexRestriction4 ret;
+        if (testDocLiteral) {
+            ret = docClient.testComplexRestriction4(x, y, z);
+        } else {
+            ret = rpcClient.testComplexRestriction4(x, y, z);
+        }
+        if (!perfTestOnly) {
+            assertEquals("testComplexRestriction4(): Incorrect value for inout param",
+                         x.getValue(), y.value.getValue());
+            assertEquals("testComplexRestriction4(): Incorrect value for out param",
+                         yOrig.getValue(), z.value.getValue());
+            assertEquals("testComplexRestriction4(): Incorrect return value",
+                         x.getValue(), ret.getValue());
+        }
+
+        // abnormal case
+        if (testDocLiteral) {
+            try {
+                x = new ComplexRestriction4();
+                x.setValue("str_xxx");
+                y = new Holder<ComplexRestriction4>(yOrig);
+                z = new Holder<ComplexRestriction4>();
+
+                ret = docClient.testComplexRestriction4(x, y, z);
+                //fail("maxLength=5 restriction is violated.");
+            } catch (Exception ex) {
+                //ex.printStackTrace();
+            }
+        }
+    }
+
+    //org.apache.type_test.types1.ComplexRestriction5
+
+    public void testComplexRestriction5() throws Exception {
+        // normal case, maxLength=50 && minLength=5 for ComplexRestriction5
+        ComplexRestriction5 x = new ComplexRestriction5();
+        x.setValue("http://www.iona.com");
+        ComplexRestriction5 yOrig = new ComplexRestriction5();
+        yOrig.setValue("http://www.iona.com/info/services/oss/");
+        Holder<ComplexRestriction5> y = new Holder<ComplexRestriction5>(yOrig);
+        Holder<ComplexRestriction5> z = new Holder<ComplexRestriction5>();
+
+        ComplexRestriction5 ret;
+        if (testDocLiteral) {
+            ret = docClient.testComplexRestriction5(x, y, z);
+        } else {
+            ret = rpcClient.testComplexRestriction5(x, y, z);
+        }
+        if (!perfTestOnly) {
+            assertEquals("testComplexRestriction5(): Incorrect value for inout param",
+                         x.getValue(), y.value.getValue());
+            assertEquals("testComplexRestriction5(): Incorrect value for out param",
+                         yOrig.getValue(), z.value.getValue());
+            assertEquals("testComplexRestriction5(): Incorrect return value",
+                         x.getValue(), ret.getValue());
+        }
+
+        // abnormal cases
+        if (testDocLiteral) {
+            try {
+                x = new ComplexRestriction5();
+                x.setValue("uri");
+                y = new Holder<ComplexRestriction5>(yOrig);
+                z = new Holder<ComplexRestriction5>();
+                ret = docClient.testComplexRestriction5(x, y, z);
+                //fail("maxLength=50 && minLength=5 restriction is violated.");
+            } catch (Exception ex) {
+                //ex.printStackTrace();
+            }
+
+            try {
+                x = new ComplexRestriction5();
+                x.setValue("http://www.iona.com");
+                yOrig = new ComplexRestriction5();
+                yOrig.setValue("http://www.iona.com/info/services/oss/info_services_oss_train.html");
+                y = new Holder<ComplexRestriction5>(yOrig);
+                z = new Holder<ComplexRestriction5>();
+                ret = docClient.testComplexRestriction5(x, y, z);
+                //fail("maxLength=50 && minLength=5 restriction is violated.");
+            } catch (Exception ex) {
+                //ex.printStackTrace();
+            }
+        }
+    }
+
+}

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient5.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient5.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/I18NStrings.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/I18NStrings.java?view=auto&rev=451169
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/I18NStrings.java
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/I18NStrings.java
Fri Sep 29 01:49:33 2006
@@ -0,0 +1,178 @@
+/**
+ * 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.cxf.systest.type_test;
+
+public class I18NStrings {
+
+    public static final String JAP_SIMPLE_STRING;
+    public static final String CHINESE_COMPLEX_STRING;
+
+    static {
+        String tmp;
+        try {
+            // GoogleSearchPreferences with Search and Preferences in japanese :)
+            tmp =  new String(new byte[] {
+                (byte)0xfe, (byte)0xff, (byte)0x0, (byte)0x47, (byte)0x0, (byte)0x6f,
+                (byte)0x0, (byte)0x6f, (byte)0x0, (byte)0x67, (byte)0x0, (byte)0x6c,
+                (byte)0x0, (byte)0x65, (byte)0x69, (byte)0x1c, (byte)0x7d, (byte)0x22, 
+                (byte)0x69, (byte)0x1c, (byte)0x7d, (byte)0x22, (byte)0x30, (byte)0xaa,
+                (byte)0x30, (byte)0xd7, (byte)0x30, (byte)0xb7, (byte)0x30, (byte)0xe7,
+                (byte)0x30, (byte)0xf3, }, "utf-16");
+        } catch (Exception ex) {
+            tmp = null;
+        }
+        JAP_SIMPLE_STRING = tmp;
+
+        try {
+            tmp = new String(new byte[] {
+                (byte)0xfe, (byte)0xff, (byte)0xff, (byte)0x4f, (byte)0xff, (byte)0x50,
+                (byte)0xff, (byte)0x51, (byte)0xff, (byte)0x52, (byte)0xff, (byte)0x53,
+                (byte)0xff, (byte)0x54, (byte)0xff, (byte)0x55, (byte)0xff, (byte)0x56,
+                (byte)0xff, (byte)0x57, (byte)0xff, (byte)0x58, (byte)0xff, (byte)0x59,
+                (byte)0xff, (byte)0x5a, (byte)0x0, (byte)0xa, (byte)0xff, (byte)0x21,
+                (byte)0xff, (byte)0x22, (byte)0xff, (byte)0x23, (byte)0xff, (byte)0x24,
+                (byte)0xff, (byte)0x25, (byte)0xff, (byte)0x26, (byte)0xff, (byte)0x27,
+                (byte)0xff, (byte)0x28, (byte)0xff, (byte)0x29, (byte)0xff, (byte)0x2a,
+                (byte)0xff, (byte)0x2b, (byte)0xff, (byte)0x2c, (byte)0xff, (byte)0x2d,
+                (byte)0xff, (byte)0x2e, (byte)0x0, (byte)0xa, (byte)0xff, (byte)0x2f,
+                (byte)0xff, (byte)0x30, (byte)0xff, (byte)0x31, (byte)0xff, (byte)0x32,
+                (byte)0xff, (byte)0x33, (byte)0xff, (byte)0x34, (byte)0xff, (byte)0x35,
+                (byte)0xff, (byte)0x36, (byte)0xff, (byte)0x37, (byte)0xff, (byte)0x38,
+                (byte)0xff, (byte)0x39, (byte)0xff, (byte)0x3a, (byte)0x0, (byte)0xa,
+                (byte)0xff, (byte)0x1, (byte)0x0, (byte)0xb7, (byte)0xff, (byte)0x3,
+                (byte)0xff, (byte)0xe5, (byte)0xff, (byte)0x5, (byte)0x20, (byte)0x26,
+                (byte)0x20, (byte)0x26, (byte)0x20, (byte)0x14, (byte)0xff, (byte)0xa,
+                (byte)0x20, (byte)0x26, (byte)0xff, (byte)0x8, (byte)0xff, (byte)0x9,
+                (byte)0x30, (byte)0x0, (byte)0xff, (byte)0x3b, (byte)0xff, (byte)0x3d,
+                (byte)0xff, (byte)0x5b, (byte)0xff, (byte)0x5d, (byte)0xff, (byte)0xb,
+                (byte)0xff, (byte)0xd, (byte)0xff, (byte)0x1d, (byte)0x20, (byte)0x14,
+                (byte)0xff, (byte)0x1b, (byte)0xff, (byte)0x1a, (byte)0x20, (byte)0x18,
+                (byte)0x20, (byte)0x19, (byte)0x20, (byte)0x1c, (byte)0x20, (byte)0x1d,
+                (byte)0x30, (byte)0x1, (byte)0x30, (byte)0xa, (byte)0x30, (byte)0xb,
+                (byte)0xff, (byte)0xc, (byte)0x30, (byte)0x2, (byte)0xff, (byte)0x1f,
+                (byte)0xff, (byte)0xf, (byte)0x0, (byte)0xa, (byte)0x59, (byte)0x82,
+                (byte)0x68, (byte)0xa6, (byte)0x4e, (byte)0xe4, (byte)0x30, (byte)0x0,
+                (byte)0x5f, (byte)0x97, (byte)0x5e, (byte)0xa6, (byte)0x0, (byte)0xa,
+                (byte)0x84, (byte)0x3d, (byte)0x51, (byte)0x65, (byte)0x51, (byte)0xe1,
+                (byte)0x95, (byte)0xf4, (byte)0x6d, (byte)0xf1, (byte)0x59, (byte)0x4,
+                (byte)0xff, (byte)0xc, (byte)0x0, (byte)0xa, (byte)0x8f, (byte)0xf7,
+                (byte)0x59, (byte)0x31, (byte)0x4e, (byte)0xd, (byte)0x77, (byte)0xe5,
+                (byte)0x5f, (byte)0x52, (byte)0x8d, (byte)0xef, (byte)0x30, (byte)0x2,
+                (byte)0x0, (byte)0xa, (byte)0x8f, (byte)0x97, (byte)0x8f, (byte)0x6c,
+                (byte)0x53, (byte)0x43, (byte)0x76, (byte)0x7e, (byte)0x5e, (byte)0x74,
+                (byte)0xff, (byte)0xc, (byte)0x0, (byte)0xa, (byte)0x5e, (byte)0x78,
+                (byte)0x90, (byte)0x47, (byte)0x5e, (byte)0x8, (byte)0x5c, (byte)0xa,
+                (byte)0x66, (byte)0x6e, (byte)0x5e, (byte)0xa6, (byte)0x30, (byte)0x2,
+                (byte)0x0, (byte)0xa, (byte)0x5f, (byte)0x97, (byte)0x5e, (byte)0xa6,
+                (byte)0xff, (byte)0xc, (byte)0x5f, (byte)0x97, (byte)0x5e, (byte)0xa6,
+                (byte)0xff, (byte)0xc, (byte)0x0, (byte)0xa, (byte)0x52, (byte)0x7,
+                (byte)0x83, (byte)0xab, (byte)0x67, (byte)0x3a, (byte)0x7f, (byte)0x18,
+                (byte)0x51, (byte)0x8d, (byte)0x8b, (byte)0xef, (byte)0x30, (byte)0x2,
+                (byte)0x0, (byte)0xa, (byte)0x6e, (byte)0xe1, (byte)0x6c, (byte)0x5f,
+                (byte)0x7e, (byte)0xa2, (byte)0x30, (byte)0x0, (byte)0x5c, (byte)0xb3,
+                (byte)0x98, (byte)0xde, (byte)0x0, (byte)0xa, (byte)0x60, (byte)0x12,
+                (byte)0x53, (byte)0xd1, (byte)0x51, (byte)0xb2, (byte)0x51, (byte)0xa0,
+                (byte)0xff, (byte)0xc, (byte)0x51, (byte)0xed, (byte)0x96, (byte)0x11,
+                (byte)0x59, (byte)0x4, (byte)0xff, (byte)0xc, (byte)0x6f, (byte)0x47,
+                (byte)0x6f, (byte)0x47, (byte)0x96, (byte)0xe8, (byte)0x6b, (byte)0x47,
+                (byte)0x30, (byte)0x2, (byte)0x0, (byte)0xa, (byte)0x62, (byte)0xac,
+                (byte)0x67, (byte)0x1b, (byte)0x77, (byte)0x3c, (byte)0xff, (byte)0xc,
+                (byte)0x4e, (byte)0xf0, (byte)0x59, (byte)0x29, (byte)0x95, (byte)0x7f,
+                (byte)0x55, (byte)0x78, (byte)0xff, (byte)0xc, (byte)0x58, (byte)0xee,
+                (byte)0x60, (byte)0x0, (byte)0x6f, (byte)0xc0, (byte)0x70, (byte)0xc8,
+                (byte)0x30, (byte)0x2, (byte)0x0, (byte)0xa, (byte)0x4e, (byte)0x9,
+                (byte)0x53, (byte)0x41, (byte)0x52, (byte)0x9f, (byte)0x54, (byte)0xd,
+                (byte)0x5c, (byte)0x18, (byte)0x4e, (byte)0xe, (byte)0x57, (byte)0x1f,
+                (byte)0xff, (byte)0xc, (byte)0x51, (byte)0x6b, (byte)0x53, (byte)0x43,
+                (byte)0x91, (byte)0xcc, (byte)0x8d, (byte)0xef, (byte)0x4e, (byte)0x91,
+                (byte)0x54, (byte)0x8c, (byte)0x67, (byte)0x8, (byte)0x30, (byte)0x2,
+                (byte)0x0, (byte)0xa, (byte)0x83, (byte)0xab, (byte)0x7b, (byte)0x49,
+                (byte)0x95, (byte)0xf2, (byte)0x76, (byte)0x7d, (byte)0x4e, (byte)0x86,
+                (byte)0x5c, (byte)0x11, (byte)0x5e, (byte)0x74, (byte)0x59, (byte)0x34,
+                (byte)0xff, (byte)0xc, (byte)0x7a, (byte)0x7a, (byte)0x60, (byte)0xb2,
+                (byte)0x52, (byte)0x7, (byte)0x30, (byte)0x2, (byte)0x0, (byte)0xa,
+                (byte)0x97, (byte)0x56, (byte)0x5e, (byte)0xb7, (byte)0x80, (byte)0x3b,
+                (byte)0xff, (byte)0xc, (byte)0x72, (byte)0xb9, (byte)0x67, (byte)0x2a,
+                (byte)0x96, (byte)0xea, (byte)0x30, (byte)0x2, (byte)0x0, (byte)0xa,
+                (byte)0x81, (byte)0xe3, (byte)0x5b, (byte)0x50, (byte)0x61, (byte)0xbe,
+                (byte)0xff, (byte)0xc, (byte)0x4f, (byte)0x55, (byte)0x65, (byte)0xf6,
+                (byte)0x70, (byte)0x6d, (byte)0xff, (byte)0x1f, (byte)0x0, (byte)0xa,
+                (byte)0x9a, (byte)0x7e, (byte)0x95, (byte)0x7f, (byte)0x8f, (byte)0x66,
+                (byte)0x8e, (byte)0xf, (byte)0x78, (byte)0x34, (byte)0xff, (byte)0xc,
+                (byte)0x8d, (byte)0x3a, (byte)0x51, (byte)0x70, (byte)0x5c, (byte)0x71,
+                (byte)0x7f, (byte)0x3a, (byte)0x30, (byte)0x2, (byte)0x0, (byte)0xa,
+                (byte)0x58, (byte)0xee, (byte)0x5f, (byte)0xd7, (byte)0x99, (byte)0x65,
+                (byte)0x99, (byte)0x10, (byte)0x80, (byte)0xe1, (byte)0x86, (byte)0x4f,
+                (byte)0x80, (byte)0x89, (byte)0xff, (byte)0xc, (byte)0x7b, (byte)0x11,
+                (byte)0x8c, (byte)0x8, (byte)0x6e, (byte)0x34, (byte)0x99, (byte)0x6e,
+                (byte)0x53, (byte)0x8, (byte)0x59, (byte)0x74, (byte)0x88, (byte)0x40,
+                (byte)0x30, (byte)0x2, (byte)0x0, (byte)0xa, (byte)0x5f, (byte)0x85,
+                (byte)0x4e, (byte)0xce, (byte)0x59, (byte)0x34, (byte)0x65, (byte)0x36,
+                (byte)0x62, (byte)0xfe, (byte)0x65, (byte)0xe7, (byte)0x5c, (byte)0x71,
+                (byte)0x6c, (byte)0xb3, (byte)0xff, (byte)0xc, (byte)0x67, (byte)0x1d,
+                (byte)0x59, (byte)0x29, (byte)0x96, (byte)0x19, (byte)0x30, (byte)0x2,
+                (byte)0x0, (byte)0xa, (byte)0x0, (byte)0x31, (byte)0x0, (byte)0x32,
+                (byte)0x0, (byte)0x33, (byte)0x0, (byte)0x34, (byte)0x0, (byte)0x35,
+                (byte)0x0, (byte)0x36, (byte)0x0, (byte)0x37, (byte)0x0, (byte)0x38,
+                (byte)0x0, (byte)0x39, (byte)0x0, (byte)0x30, (byte)0x0, (byte)0xa,
+                (byte)0x0, (byte)0x61, (byte)0x0, (byte)0x62, (byte)0x0, (byte)0x63,
+                (byte)0x0, (byte)0x64, (byte)0x0, (byte)0x65, (byte)0x0, (byte)0x66,
+                (byte)0x0, (byte)0x67, (byte)0x0, (byte)0x68, (byte)0x0, (byte)0x69,
+                (byte)0x0, (byte)0x6a, (byte)0x0, (byte)0x6b, (byte)0x0, (byte)0x6c,
+                (byte)0x0, (byte)0x6d, (byte)0x0, (byte)0x6e, (byte)0x0, (byte)0x6f,
+                (byte)0x0, (byte)0x70, (byte)0x0, (byte)0x71, (byte)0x0, (byte)0x72,
+                (byte)0x0, (byte)0x73, (byte)0x0, (byte)0x74, (byte)0x0, (byte)0x75,
+                (byte)0x0, (byte)0x76, (byte)0x0, (byte)0x77, (byte)0x0, (byte)0x78,
+                (byte)0x0, (byte)0x79, (byte)0x0, (byte)0x7a, (byte)0x0, (byte)0xa,
+                (byte)0x0, (byte)0x41, (byte)0x0, (byte)0x42, (byte)0x0, (byte)0x43,
+                (byte)0x0, (byte)0x44, (byte)0x0, (byte)0x45, (byte)0x0, (byte)0x46,
+                (byte)0x0, (byte)0x47, (byte)0x0, (byte)0x48, (byte)0x0, (byte)0x49,
+                (byte)0x0, (byte)0x4a, (byte)0x0, (byte)0x4b, (byte)0x0, (byte)0x4c,
+                (byte)0x0, (byte)0x4d, (byte)0x0, (byte)0x4e, (byte)0x0, (byte)0x4f,
+                (byte)0x0, (byte)0x50, (byte)0x0, (byte)0x51, (byte)0x0, (byte)0x52,
+                (byte)0x0, (byte)0x53, (byte)0x0, (byte)0x54, (byte)0x0, (byte)0x55,
+                (byte)0x0, (byte)0x56, (byte)0x0, (byte)0x57, (byte)0x0, (byte)0x58,
+                (byte)0x0, (byte)0x59, (byte)0x0, (byte)0x5a, (byte)0x0, (byte)0xa,
+                (byte)0x0, (byte)0x21, (byte)0x0, (byte)0x40, (byte)0x0, (byte)0x23,
+                (byte)0x0, (byte)0x24, (byte)0x0, (byte)0x25, (byte)0x0, (byte)0x5e,
+                (byte)0x0, (byte)0x26, (byte)0x0, (byte)0x2a, (byte)0x0, (byte)0x28,
+                (byte)0x0, (byte)0x29, (byte)0x0, (byte)0x5f, (byte)0x0, (byte)0x2b,
+                (byte)0x0, (byte)0x2d, (byte)0x0, (byte)0x3d, (byte)0x0, (byte)0x7b,
+                (byte)0x0, (byte)0x7d, (byte)0x0, (byte)0x5b, (byte)0x0, (byte)0x5d,
+                (byte)0x0, (byte)0x3a, (byte)0x0, (byte)0x22, (byte)0x0, (byte)0x7c,
+                (byte)0x0, (byte)0x3b, (byte)0x0, (byte)0x27, (byte)0x0, (byte)0x5c,
+                (byte)0x0, (byte)0x3c, (byte)0x0, (byte)0x3e, (byte)0x0, (byte)0x3f,
+                (byte)0x0, (byte)0x2c, (byte)0x0, (byte)0x2e, (byte)0x0, (byte)0x2f,
+                (byte)0x0, (byte)0xa, (byte)0xff, (byte)0x11, (byte)0xff, (byte)0x12,
+                (byte)0xff, (byte)0x13, (byte)0xff, (byte)0x14, (byte)0xff, (byte)0x15,
+                (byte)0xff, (byte)0x16, (byte)0xff, (byte)0x17, (byte)0xff, (byte)0x18,
+                (byte)0xff, (byte)0x19, (byte)0xff, (byte)0x10, (byte)0x0, (byte)0xa,
+                (byte)0xff, (byte)0x41, (byte)0xff, (byte)0x42, (byte)0xff, (byte)0x43,
+                (byte)0xff, (byte)0x44, (byte)0xff, (byte)0x45, (byte)0xff, (byte)0x46,
+                (byte)0xff, (byte)0x47, (byte)0xff, (byte)0x48, (byte)0xff, (byte)0x49,
+                (byte)0xff, (byte)0x4a, (byte)0xff, (byte)0x4b, (byte)0xff, (byte)0x4c,
+                (byte)0xff, (byte)0x4d, (byte)0xff, (byte)0x4e}, "utf-16");
+        } catch (Exception ex) {
+            tmp = null;
+        }
+        CHINESE_COMPLEX_STRING = tmp;
+    }
+
+}
+

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/I18NStrings.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/I18NStrings.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java?view=auto&rev=451169
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java
Fri Sep 29 01:49:33 2006
@@ -0,0 +1,243 @@
+/**
+ * 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.cxf.systest.type_test.soap;
+
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.ws.Holder;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.apache.cxf.systest.common.ClientServerSetupBase;
+import org.apache.cxf.systest.type_test.AbstractTypeTestClient5;
+import org.apache.type_test.types2.StructWithAnyArrayLax;
+import org.apache.type_test.types2.StructWithAnyStrict;
+
+public class SOAPDocLitClientTypeTest extends AbstractTypeTestClient5 {
+    static final String WSDL_PATH = "/wsdl/type_test/type_test_doclit_soap.wsdl";
+    static final QName SERVICE_NAME = new QName("http://apache.org/type_test/doc", "SOAPService");
+    static final QName PORT_NAME = new QName("http://apache.org/type_test/doc", "SOAPPort");
+
+    public SOAPDocLitClientTypeTest(String name) {
+        super(name, SERVICE_NAME, PORT_NAME, WSDL_PATH);
+    }
+    
+    public static Test suite() throws Exception {
+        TestSuite suite = new TestSuite(SOAPDocLitClientTypeTest.class);
+        return new ClientServerSetupBase(suite) {
+            public void startServers() throws Exception {
+                boolean ok = launchServer(SOAPDocLitServerImpl.class);
+                assertTrue("failed to launch server", ok);
+            }
+
+            public void setUp() throws Exception {
+                // set up configuration to enable schema validation
+                // URL url = getClass().getResource("../cxf-config.xml");
+                // assertNotNull("cannot find test resource", url);
+                // configFileName = url.toString();
+                configFileName = null;
+                super.setUp();
+            }
+        };
+    }  
+
+    public void testStructWithAnyStrict() throws Exception {
+        SOAPFactory factory = SOAPFactory.newInstance();
+        SOAPElement elem = factory.createElement("StringElementQualified",
+            "x1", "http://apache.org/type_test/types1");
+        elem.addNamespaceDeclaration("x1", "http://apache.org/type_test/types1");
+        elem.addTextNode("This is the text of the node");
+
+        StructWithAnyStrict x = new StructWithAnyStrict();
+        x.setName("Name x");
+        x.setAddress("Some Address x");
+        x.setAny(elem);
+        
+        elem = factory.createElement("StringElementQualified",
+            "x1", "http://apache.org/type_test/types1");
+        elem.addNamespaceDeclaration("x1", "http://apache.org/type_test/types1");
+        elem.addTextNode("This is the text of the second node");
+                                
+        StructWithAnyStrict yOrig = new StructWithAnyStrict();
+        yOrig.setName("Name y");
+        yOrig.setAddress("Some Address y");
+        yOrig.setAny(elem);
+
+        Holder<StructWithAnyStrict> y = new Holder<StructWithAnyStrict>(yOrig);
+        Holder<StructWithAnyStrict> z = new Holder<StructWithAnyStrict>();
+        StructWithAnyStrict ret = docClient.testStructWithAnyStrict(x, y, z);
+        if (!perfTestOnly) {
+            assertEqualsStructWithAnyStrict(x, y.value);
+            assertEqualsStructWithAnyStrict(yOrig, z.value);
+            assertEqualsStructWithAnyStrict(x, ret);
+        }
+    }
+   
+    public void testStructWithAnyStrictComplex() throws Exception {
+        SOAPFactory factory = SOAPFactory.newInstance();
+        SOAPElement elem = factory.createElement("AnonTypeElementQualified",
+            "x1", "http://apache.org/type_test/types1");
+        elem.addNamespaceDeclaration("x1", "http://apache.org/type_test/types1");
+        SOAPElement floatElem = factory.createElement("varFloat", "x1",
+            "http://apache.org/type_test/types1");
+        floatElem.addTextNode("12.5");
+        elem.addChildElement(floatElem);
+        SOAPElement intElem = factory.createElement("varInt", "x1",
+            "http://apache.org/type_test/types1");
+        intElem.addTextNode("34");
+        elem.addChildElement(intElem);
+        SOAPElement stringElem = factory.createElement("varString", "x1",
+            "http://apache.org/type_test/types1");
+        stringElem.addTextNode("test string within any");
+        elem.addChildElement(stringElem);
+                                 
+        StructWithAnyStrict x = new StructWithAnyStrict();
+        x.setName("Name x");
+        x.setAddress("Some Address x");
+        x.setAny(elem);
+        
+        elem = factory.createElement("AnonTypeElementQualified", "x1",
+            "http://apache.org/type_test/types1");
+        elem.addNamespaceDeclaration("x1", "http://apache.org/type_test/types1");
+        floatElem = factory.createElement("varFloat", "x1",
+            "http://apache.org/type_test/types1");
+        floatElem.addTextNode("12.76");
+        elem.addChildElement(floatElem);
+        intElem = factory.createElement("varInt", "x1",
+            "http://apache.org/type_test/types1");
+        intElem.addTextNode("56");
+        elem.addChildElement(intElem);
+        stringElem = factory.createElement("varString", "x1",
+            "http://apache.org/type_test/types1");
+        stringElem.addTextNode("test string");
+        elem.addChildElement(stringElem);
+        
+        StructWithAnyStrict yOrig = new StructWithAnyStrict();
+        yOrig.setName("Name y");
+        yOrig.setAddress("Some Address y");
+        yOrig.setAny(elem);
+
+        Holder<StructWithAnyStrict> y = new Holder<StructWithAnyStrict>(yOrig);
+        Holder<StructWithAnyStrict> z = new Holder<StructWithAnyStrict>();
+        StructWithAnyStrict ret = docClient.testStructWithAnyStrict(x, y, z);
+        if (!perfTestOnly) {
+            assertEqualsStructWithAnyStrict(x, y.value);
+            assertEqualsStructWithAnyStrict(yOrig, z.value);
+            assertEqualsStructWithAnyStrict(x, ret);
+        }
+    }
+
+    public void testStructWithAnyArrayLax() throws Exception {
+        SOAPFactory factory = SOAPFactory.newInstance();
+        SOAPElement elem = factory.createElement("StringElementQualified", 
+            "x1", "http://apache.org/type_test/types1");
+        elem.addNamespaceDeclaration("x1", "http://apache.org/type_test/types1");
+        elem.addTextNode("This is the text of the node");
+
+        StructWithAnyArrayLax x = new StructWithAnyArrayLax();
+        x.setName("Name x");
+        x.setAddress("Some Address x");
+        x.getAny().add(elem);
+
+        elem = factory.createElement("StringElementQualified", "x1",
+            "http://apache.org/type_test/types1");
+        elem.addNamespaceDeclaration("x1", "http://apache.org/type_test/types1");
+        elem.addTextNode("This is the text of the node for the second struct");
+
+        StructWithAnyArrayLax yOrig = new StructWithAnyArrayLax();
+        yOrig.setName("Name y");
+        yOrig.setAddress("Some Other Address y");
+        yOrig.getAny().add(elem);
+
+        Holder<StructWithAnyArrayLax> y = new Holder<StructWithAnyArrayLax>(yOrig);
+        Holder<StructWithAnyArrayLax> z = new Holder<StructWithAnyArrayLax>();
+        StructWithAnyArrayLax ret = docClient.testStructWithAnyArrayLax(x, y, z);
+        if (!perfTestOnly) {
+            assertEqualsStructWithAnyArrayLax(x, y.value);
+            assertEqualsStructWithAnyArrayLax(yOrig, z.value);
+            assertEqualsStructWithAnyArrayLax(x, ret);
+        }
+    }
+    
+    public void testStructWithAnyArrayLaxComplex() throws Exception {
+        SOAPFactory factory = SOAPFactory.newInstance();
+        SOAPElement elem = factory.createElement("AnonTypeElementQualified", "x1",
+            "http://apache.org/type_test/types1");
+        elem.addNamespaceDeclaration("x1", "http://apache.org/type_test/types1");
+        SOAPElement floatElem = factory.createElement("varFloat", "x1",
+            "http://apache.org/type_test/types1");
+        floatElem.addTextNode("12.76");
+        elem.addChildElement(floatElem);
+        SOAPElement intElem = factory.createElement("varInt", "x1",
+            "http://apache.org/type_test/types1");
+        intElem.addTextNode("56");
+        elem.addChildElement(intElem);
+        SOAPElement stringElem = factory.createElement("varString", "x1",
+            "http://apache.org/type_test/types1");
+        stringElem.addTextNode("test string");
+        elem.addChildElement(stringElem);
+
+        StructWithAnyArrayLax x = new StructWithAnyArrayLax();
+        x.setName("Name x");
+        x.setAddress("Some Address x");
+        x.getAny().add(elem);
+        StructWithAnyArrayLax yOrig = new StructWithAnyArrayLax();
+        yOrig.setName("Name y");
+        yOrig.setAddress("Some Other Address y");
+        yOrig.getAny().add(elem);
+
+        Holder<StructWithAnyArrayLax> y = new Holder<StructWithAnyArrayLax>(yOrig);
+        Holder<StructWithAnyArrayLax> z = new Holder<StructWithAnyArrayLax>();
+        StructWithAnyArrayLax ret = docClient.testStructWithAnyArrayLax(x, y, z);
+        if (!perfTestOnly) {
+            assertEqualsStructWithAnyArrayLax(x, y.value);
+            assertEqualsStructWithAnyArrayLax(yOrig, z.value);
+            assertEqualsStructWithAnyArrayLax(x, ret);
+        }
+    }
+    
+    public void assertEqualsStructWithAnyStrict(StructWithAnyStrict a,
+            StructWithAnyStrict b) throws Exception {
+        assertEquals("StructWithAnyStrict names don't match", a.getName(), b.getName());
+        assertEquals("StructWithAnyStrict addresses don't match", a.getAddress(), b.getAddress());
+        if (a.getAny() instanceof SOAPElement && b.getAny() instanceof SOAPElement)
{
+            assertEquals((SOAPElement)a.getAny(), (SOAPElement)b.getAny());
+        }
+    }
+
+    public void assertEqualsStructWithAnyArrayLax(StructWithAnyArrayLax a,
+            StructWithAnyArrayLax b) throws Exception {
+        assertEquals("StructWithAnyArrayLax names don't match", a.getName(), b.getName());
+        assertEquals("StructWithAnyArrayLax addresses don't match", a.getAddress(), b.getAddress());
+
+        List<Object> ae = a.getAny();
+        List<Object> be = b.getAny();
+        assertEquals("StructWithAnyArrayLax soap element lengths don't match", ae.size(),
be.size());
+        for (int i = 0; i < ae.size(); i++) {
+            if (ae.get(i) instanceof SOAPElement && be.get(i) instanceof SOAPElement)
{
+                assertEquals(ae.get(i), be.get(i));
+            }
+        }
+    }
+    
+}

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java?view=auto&rev=451169
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java
Fri Sep 29 01:49:33 2006
@@ -0,0 +1,57 @@
+/**
+ * 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.cxf.systest.type_test.soap;
+
+
+import javax.jws.WebService;
+import javax.xml.ws.Endpoint;
+
+
+import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.systest.type_test.TypeTestImpl;
+import org.apache.type_test.doc.TypeTestPortType;
+
+public class SOAPDocLitServerImpl extends TestServerBase {
+    
+
+    public void run()  {
+
+        Object implementor = new SOAPTypeTestImpl();
+        String address = "http://localhost:9007/SOAPService/SOAPPort/";
+        Endpoint.publish(address, implementor);              
+    }
+
+    public static void main(String args[]) {
+        try {
+            SOAPDocLitServerImpl s = new SOAPDocLitServerImpl();
+            s.start();
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            System.exit(-1);
+        } finally { 
+            System.out.println("done!");
+        }
+    }
+    
+    @WebService(serviceName = "SOAPService", portName = "SOAPPort",
+                endpointInterface = "org.apache.type_test.doc.TypeTestPortType",
+                targetNamespace = "http://apache.org/type_test/doc")
+    class SOAPTypeTestImpl extends TypeTestImpl implements TypeTestPortType {
+    }
+}

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/testutils/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/pom.xml?view=diff&rev=451169&r1=451168&r2=451169
==============================================================================
--- incubator/cxf/trunk/testutils/pom.xml (original)
+++ incubator/cxf/trunk/testutils/pom.xml Fri Sep 29 01:49:33 2006
@@ -100,7 +100,7 @@
                                 <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_doclit.wsdl">
-                                    <param name="inc_xsd_path" expression="${generated.resources.test}/wsdl/type_test"/>
+                                    <param name="inc_xsd_path" expression="."/>
                                     <param name="use_style" expression="document"/>
                                 </xslt>
                                 <xslt style="${test.resources.dir}/wsdl/type_test/type_test_xml_wsdl.xsl"



Mime
View raw message