cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [3/3] cxf git commit: Update type-test to enable some types that have been disabled for a long time
Date Fri, 11 Aug 2017 20:41:15 GMT
Update type-test to enable some types that have been disabled for a long time


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/21469595
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/21469595
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/21469595

Branch: refs/heads/master
Commit: 214695957bb1ef6db665a316f4001ce7deeb2974
Parents: 5f71733
Author: Daniel Kulp <dkulp@apache.org>
Authored: Fri Aug 11 15:34:33 2017 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Aug 11 16:41:03 2017 -0400

----------------------------------------------------------------------
 .../type_test/AbstractTypeTestClient.java       |  18 +--
 .../type_test/AbstractTypeTestClient2.java      |   2 +-
 .../type_test/AbstractTypeTestClient3.java      |   5 -
 .../type_test/AbstractTypeTestClient4.java      | 153 ++++++++++---------
 .../corba/CORBADocLitClientTypeTest.java        |   8 +
 .../test/resources/META-INF/jax-ws-catalog.xml  |   4 +
 testutils/pom.xml                               |   1 +
 .../type_test/inc_type_test_java_signature.xsl  |   3 +
 .../main/resources/wsdl/type_test/type_test.xsd |  27 ++--
 .../wsdl/type_test/type_test_ID_xsd.xsl         |   3 +
 .../resources/wsdl/type_test/validation.xsl     |  81 ++++++++++
 11 files changed, 201 insertions(+), 104 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/21469595/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
----------------------------------------------------------------------
diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
index 1521e1e..c63b7f5 100644
--- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
+++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
@@ -1028,26 +1028,16 @@ public abstract class AbstractTypeTestClient
         if (!shouldRunTest("NMTOKENS")) {
             return;
         }
-        //
-        // XXX - The jaxb ri code generation produces different method
+
+        // The jaxb ri code generation produces different method
         // signatures for the NMTOKENS type between using rpc literal
         // and doc literal styles.
-        //
-        if (testDocLiteral) {
-            List<String> x = Arrays.asList("123:abc");
-            List<String> yOrig = Arrays.asList("abc.-_:", "a");
-            Holder<List<String>> y = new Holder<List<String>>(yOrig);
-            Holder<List<String>> z = new Holder<List<String>>();
-            List<String> ret = docClient.testNMTOKENS(x, y, z);
-            assertTrue("testNMTOKENS(): Incorrect value for inout param", x.equals(y.value));
-            assertTrue("testNMTOKENS(): Incorrect value for out param", yOrig.equals(z.value));
-            assertTrue("testNMTOKENS(): Incorrect return value", x.equals(ret));
-        } else if (testXMLBinding) {
+        if (testDocLiteral || testXMLBinding) {
             List<String> x = Arrays.asList("123:abc");
             List<String> yOrig = Arrays.asList("abc.-_:", "a");
             Holder<List<String>> y = new Holder<List<String>>(yOrig);
             Holder<List<String>> z = new Holder<List<String>>();
-            List<String> ret = xmlClient.testNMTOKENS(x, y, z);
+            List<String> ret = testXMLBinding ? xmlClient.testNMTOKENS(x, y, z) : docClient.testNMTOKENS(x,
y, z);
             assertTrue("testNMTOKENS(): Incorrect value for inout param", x.equals(y.value));
             assertTrue("testNMTOKENS(): Incorrect value for out param", yOrig.equals(z.value));
             assertTrue("testNMTOKENS(): Incorrect return value", x.equals(ret));

http://git-wip-us.apache.org/repos/asf/cxf/blob/21469595/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient2.java
----------------------------------------------------------------------
diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient2.java
b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient2.java
index 7a70a05..65b47b4 100644
--- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient2.java
+++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient2.java
@@ -232,7 +232,7 @@ public abstract class AbstractTypeTestClient2 extends AbstractTypeTestClient
{
     }
 
     //org.apache.type_test.types1.AnonymousStruct
-    // XXX - generated code flattens nested struct into top-level class.
+    //generated code flattens nested struct into top-level class.
     protected boolean equals(AnonymousStruct x, AnonymousStruct y) {
         return (x.getVarFloat() == y.getVarFloat())
             && (x.getVarInt() == y.getVarInt())

http://git-wip-us.apache.org/repos/asf/cxf/blob/21469595/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java
----------------------------------------------------------------------
diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java
b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java
index 7c5f47f..b0caa40 100644
--- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java
+++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java
@@ -1130,7 +1130,6 @@ public abstract class AbstractTypeTestClient3 extends AbstractTypeTestClient2
{
     }
 
     // StructWithInvalidAny
-    // XXX - no exception thrown
     @Test
     public void testStructWithInvalidAny() throws Exception {
         if (!shouldRunTest("StructWithInvalidAny")) {
@@ -1230,7 +1229,6 @@ public abstract class AbstractTypeTestClient3 extends AbstractTypeTestClient2
{
     }
 
     // StructWithInvalidAnyArray
-    // XXX - no exception thrown
     @Test
     public void testStructWithInvalidAnyArray() throws Exception {
         if (!shouldRunTest("StructWithInvalidAnyArray")) {
@@ -1481,7 +1479,6 @@ public abstract class AbstractTypeTestClient3 extends AbstractTypeTestClient2
{
         return false;
     }
 
-    // XXX - Generated code flattens nested choice
     @Test
     public void testChoiceWithGroupChoice() throws Exception {
         if (!shouldRunTest("ChoiceWithGroupChoice")) {
@@ -1539,7 +1536,6 @@ public abstract class AbstractTypeTestClient3 extends AbstractTypeTestClient2
{
         return false;
     }
 
-    // XXX - Generated code flattens nested structs
     @Test
     public void testChoiceWithGroupSeq() throws Exception {
         if (!shouldRunTest("ChoiceWithGroupSeq")) {
@@ -1596,7 +1592,6 @@ public abstract class AbstractTypeTestClient3 extends AbstractTypeTestClient2
{
         return false;
     }
 
-    // XXX - Generated code flattens nested structs
     @Test
     public void testChoiceWithGroups() throws Exception {
         if (!shouldRunTest("ChoiceWithGroups")) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/21469595/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java
----------------------------------------------------------------------
diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java
b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java
index e49cb47..d25feaf 100644
--- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java
+++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java
@@ -24,22 +24,23 @@ import java.math.BigInteger;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
+import java.util.function.Supplier;
 
 import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Holder;
 
 import org.apache.type_test.types1.AnonymousType;
-//importorg.apache.type_test.types1.ComplexArray;
-//importorg.apache.type_test.types1.ComplexChoice;
-//importorg.apache.type_test.types1.ComplexStruct;
-//importorg.apache.type_test.types1.DerivedAllBaseAll;
-//importorg.apache.type_test.types1.DerivedAllBaseChoice;
-//importorg.apache.type_test.types1.DerivedAllBaseStruct;
-//importorg.apache.type_test.types1.DerivedChoiceBaseAll;
+import org.apache.type_test.types1.ComplexArray;
+import org.apache.type_test.types1.ComplexChoice;
+import org.apache.type_test.types1.ComplexStruct;
+import org.apache.type_test.types1.DerivedAllBaseAll;
+import org.apache.type_test.types1.DerivedAllBaseChoice;
+import org.apache.type_test.types1.DerivedAllBaseStruct;
+import org.apache.type_test.types1.DerivedChoiceBaseAll;
 import org.apache.type_test.types1.DerivedChoiceBaseArray;
-//importorg.apache.type_test.types1.DerivedChoiceBaseComplex;
+import org.apache.type_test.types1.DerivedChoiceBaseComplex;
 import org.apache.type_test.types1.DerivedEmptyBaseEmptyAll;
-//importorg.apache.type_test.types1.DerivedStructBaseAll;
 import org.apache.type_test.types1.DerivedStructBaseChoice;
 import org.apache.type_test.types1.DerivedStructBaseStruct;
 import org.apache.type_test.types1.EmptyAll;
@@ -49,7 +50,7 @@ import org.apache.type_test.types1.OccuringAll;
 import org.apache.type_test.types1.RecSeqB6918;
 import org.apache.type_test.types1.RestrictedAllBaseAll;
 import org.apache.type_test.types1.RestrictedStructBaseStruct;
-//importorg.apache.type_test.types1.SimpleAll;
+import org.apache.type_test.types1.SimpleAll;
 import org.apache.type_test.types1.SimpleChoice;
 import org.apache.type_test.types1.SimpleStruct;
 import org.apache.type_test.types1.UnboundedArray;
@@ -1133,7 +1134,7 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
      *  {min occurs} = {max occurs} = 1, and that particle must be part of a
      *  pair which constitutes the {content type} of a complex type definition.
      *
-
+*/
     //org.apache.type_test.types1.ComplexArray
 
     protected boolean equals(ComplexArray x, ComplexArray y) {
@@ -1151,12 +1152,11 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
     }
 
     @Test
-    @Ignore
     public void testComplexArray() throws Exception {
         if (!shouldRunTest("ComplexArray")) {
             return;
         }
-        DerivedChoiceBaseStruct xx = new DerivedChoiceBaseStruct();
+        DerivedAllBaseStruct xx = new DerivedAllBaseStruct();
         //Base
         xx.setVarFloat(3.14f);
         xx.setVarInt(new BigInteger("42"));
@@ -1187,12 +1187,12 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
 
         Holder<ComplexArray> y = new Holder<ComplexArray>(yOrig);
         Holder<ComplexArray> z = new Holder<ComplexArray>();
-        ComplexArray ret;
-        if (testDocLiteral) {
-            ret = docClient.testComplexArray(x, y, z);
-        } else {
-            ret = rpcClient.testComplexArray(x, y, z);
-        }
+        ComplexArray ret = runWithoutValidation((BindingProvider)docClient, () -> {
+            if (testDocLiteral) {
+                return docClient.testComplexArray(x, y, z);
+            }
+            return rpcClient.testComplexArray(x, y, z); 
+        });
 
         if (!perfTestOnly) {
             assertTrue("testComplexArray(): Incorrect value for inout param",
@@ -1204,7 +1204,6 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
     }
 
     //org.apache.type_test.types1.ComplexChoice
-
     protected boolean equals(ComplexChoice x, ComplexChoice y) {
         DerivedChoiceBaseComplex xx = x.getVarDerivedStruct();
         DerivedChoiceBaseComplex yy = y.getVarDerivedStruct();
@@ -1213,6 +1212,19 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
                 && x.getVarFloat().compareTo(y.getVarFloat()) == 0);
     }
 
+    <T> T runWithoutValidation(BindingProvider bp, Supplier<T> r) {
+        Object o = bp.getRequestContext().put("schema-validation-enabled", Boolean.FALSE);
+        try {
+            return r.get();
+        } finally {
+            if (o != null) {
+                bp.getRequestContext().put("schema-validation-enabled", o);
+            } else {
+                bp.getRequestContext().remove("schema-validation-enabled");
+            }
+        }
+    }
+    @Test
     public void testComplexChoice() throws Exception {
         if (!shouldRunTest("ComplexChoice")) {
             return;
@@ -1239,12 +1251,12 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
 
         Holder<ComplexChoice> y = new Holder<ComplexChoice>(yOrig);
         Holder<ComplexChoice> z = new Holder<ComplexChoice>();
-        ComplexChoice ret;
-        if (testDocLiteral) {
-            ret = docClient.testComplexChoice(x, y, z);
-        } else {
-            ret = rpcClient.testComplexChoice(x, y, z);
-        }
+        ComplexChoice ret = runWithoutValidation((BindingProvider)docClient, () -> {
+            if (testDocLiteral) {
+                return docClient.testComplexChoice(x, y, z);
+            }
+            return rpcClient.testComplexChoice(x, y, z); 
+        });
 
         if (!perfTestOnly) {
             assertTrue("testComplexChoice(): Incorrect value for inout param",
@@ -1256,12 +1268,11 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
     }
 
     //org.apache.type_test.types1.ComplexStruct
-
     protected boolean equals(ComplexStruct x, ComplexStruct y) {
         return equals(x.getVarDerivedStruct(), y.getVarDerivedStruct())
             && Float.compare(x.getVarFloat(), y.getVarFloat()) == 0;
     }
-
+    @Test
     public void testComplexStruct() throws Exception {
         if (!shouldRunTest("ComplexStruct")) {
             return;
@@ -1304,12 +1315,12 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
 
         Holder<ComplexStruct> y = new Holder<ComplexStruct>(yOrig);
         Holder<ComplexStruct> z = new Holder<ComplexStruct>();
-        ComplexStruct ret;
-        if (testDocLiteral) {
-            ret = docClient.testComplexStruct(x, y, z);
-        } else {
-            ret = rpcClient.testComplexStruct(x, y, z);
-        }
+        ComplexStruct ret = runWithoutValidation((BindingProvider)docClient, () -> {
+            if (testDocLiteral) {
+                return docClient.testComplexStruct(x, y, z);
+            }
+            return rpcClient.testComplexStruct(x, y, z); 
+        });
 
         if (!perfTestOnly) {
             assertTrue("testComplexStruct(): Incorrect value for inout param",
@@ -1329,7 +1340,7 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
             || (x.getVarFloatExtExt() != null && y.getVarFloatExtExt() != null
                  && x.getVarFloatExtExt().compareTo(y.getVarFloatExtExt()) == 0));
     }
-
+    @Test
     public void testDerivedChoiceBaseComplex() throws Exception {
         if (!shouldRunTest("DerivedChoiceBaseComplex")) {
             return;
@@ -1364,12 +1375,12 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
 
         Holder<DerivedChoiceBaseComplex> y = new Holder<DerivedChoiceBaseComplex>(yOrig);
         Holder<DerivedChoiceBaseComplex> z = new Holder<DerivedChoiceBaseComplex>();
-        DerivedChoiceBaseComplex ret;
-        if (testDocLiteral) {
-            ret = docClient.testDerivedChoiceBaseComplex(x, y, z);
-        } else {
-            ret = rpcClient.testDerivedChoiceBaseComplex(x, y, z);
-        }
+        DerivedChoiceBaseComplex ret = runWithoutValidation((BindingProvider)docClient, ()
-> {
+            if (testDocLiteral) {
+                return docClient.testDerivedChoiceBaseComplex(x, y, z);
+            }
+            return rpcClient.testDerivedChoiceBaseComplex(x, y, z); 
+        });
 
         if (!perfTestOnly) {
             assertTrue("testDerivedChoiceBaseComplex(): Incorrect value for inout param",
@@ -1388,7 +1399,7 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
             && (x.getVarStringExt().equals(y.getVarStringExt()))
             && (x.getAttrString().equals(y.getAttrString()));
     }
-
+    @Test
     public void testDerivedAllBaseAll() throws Exception {
         if (!shouldRunTest("DerivedAllBaseAll")) {
             return;
@@ -1418,12 +1429,12 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
         Holder<DerivedAllBaseAll> y = new Holder<DerivedAllBaseAll>(yOrig);
         Holder<DerivedAllBaseAll> z = new Holder<DerivedAllBaseAll>();
 
-        DerivedAllBaseAll ret;
-        if (testDocLiteral) {
-            ret = docClient.testDerivedAllBaseAll(x, y, z);
-        } else {
-            ret = rpcClient.testDerivedAllBaseAll(x, y, z);
-        }
+        DerivedAllBaseAll ret = runWithoutValidation((BindingProvider)docClient, () ->
{
+            if (testDocLiteral) {
+                return docClient.testDerivedAllBaseAll(x, y, z);
+            }
+            return rpcClient.testDerivedAllBaseAll(x, y, z); 
+        });
         if (!perfTestOnly) {
             assertTrue("testDerivedAllBaseAll(): Incorrect value for inout param",
                        equals(x, y.value));
@@ -1441,7 +1452,7 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
             && x.getVarStringExt().equals(y.getVarStringExt())
             && x.getAttrString().equals(y.getAttrString());
     }
-
+    @Test
     public void testDerivedAllBaseChoice() throws Exception {
         if (!shouldRunTest("DerivedAllBaseChoice")) {
             return;
@@ -1465,12 +1476,12 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
         Holder<DerivedAllBaseChoice> y = new Holder<DerivedAllBaseChoice>(yOrig);
         Holder<DerivedAllBaseChoice> z = new Holder<DerivedAllBaseChoice>();
 
-        DerivedAllBaseChoice ret;
-        if (testDocLiteral) {
-            ret = docClient.testDerivedAllBaseChoice(x, y, z);
-        } else {
-            ret = rpcClient.testDerivedAllBaseChoice(x, y, z);
-        }
+        DerivedAllBaseChoice ret = runWithoutValidation((BindingProvider)docClient, () ->
{
+            if (testDocLiteral) {
+                return docClient.testDerivedAllBaseChoice(x, y, z);
+            }
+            return rpcClient.testDerivedAllBaseChoice(x, y, z); 
+        });
         if (!perfTestOnly) {
             assertTrue("testDerivedAllBaseChoice(): Incorrect value for inout param",
                        equals(x, y.value));
@@ -1488,7 +1499,7 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
             && (x.getVarStringExt().equals(y.getVarStringExt()))
             && (x.getAttrString().equals(y.getAttrString()));
     }
-
+    @Test       
     public void testDerivedAllBaseStruct() throws Exception {
         if (!shouldRunTest("DerivedAllBaseStruct")) {
             return;
@@ -1518,12 +1529,12 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
         Holder<DerivedAllBaseStruct> y = new Holder<DerivedAllBaseStruct>(yOrig);
         Holder<DerivedAllBaseStruct> z = new Holder<DerivedAllBaseStruct>();
 
-        DerivedAllBaseStruct ret;
-        if (testDocLiteral) {
-            ret = docClient.testDerivedAllBaseStruct(x, y, z);
-        } else {
-            ret = rpcClient.testDerivedAllBaseStruct(x, y, z);
-        }
+        DerivedAllBaseStruct ret = runWithoutValidation((BindingProvider)docClient, () ->
{
+            if (testDocLiteral) {
+                return docClient.testDerivedAllBaseStruct(x, y, z);
+            }
+            return rpcClient.testDerivedAllBaseStruct(x, y, z); 
+        });
         if (!perfTestOnly) {
             assertTrue("testDerivedAllBaseStruct(): Incorrect value for inout param",
                        equals(x, y.value));
@@ -1547,7 +1558,7 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
         return equals((SimpleAll)x, (SimpleAll)y)
             && x.getAttrString().equals(y.getAttrString());
     }
-
+    @Test
     public void testDerivedChoiceBaseAll() throws Exception {
         if (!shouldRunTest("DerivedChoiceBaseAll")) {
             return;
@@ -1575,12 +1586,12 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
         Holder<DerivedChoiceBaseAll> y = new Holder<DerivedChoiceBaseAll>(yOrig);
         Holder<DerivedChoiceBaseAll> z = new Holder<DerivedChoiceBaseAll>();
 
-        DerivedChoiceBaseAll ret;
-        if (testDocLiteral) {
-            ret = docClient.testDerivedChoiceBaseAll(x, y, z);
-        } else {
-            ret = rpcClient.testDerivedChoiceBaseAll(x, y, z);
-        }
+        DerivedChoiceBaseAll ret = runWithoutValidation((BindingProvider)docClient, () ->
{
+            if (testDocLiteral) {
+                return docClient.testDerivedChoiceBaseAll(x, y, z);
+            }
+            return rpcClient.testDerivedChoiceBaseAll(x, y, z); 
+        });
         if (!perfTestOnly) {
             assertTrue("testDerivedChoiceBaseAll(): Incorrect value for inout param",
                        equals(x, y.value));
@@ -1590,8 +1601,9 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
         }
     }
 
+    
+    /*
     //org.apache.type_test.types1.DerivedStructBaseAll
-
     protected boolean equals(DerivedStructBaseAll x, DerivedStructBaseAll y) {
         return equals((SimpleAll)x, (SimpleAll)y)
             && (Float.compare(x.getVarFloatExt(), y.getVarFloatExt()) == 0)
@@ -1694,7 +1706,6 @@ public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3
{
     */
 
     //org.apache.type_test.types1.RestrictedStructBaseStruct;
-
     protected boolean equals(RestrictedStructBaseStruct x, RestrictedStructBaseStruct y)
{
         return (x.getVarFloat() == y.getVarFloat())
             && (x.getVarInt().equals(y.getVarInt()))

http://git-wip-us.apache.org/repos/asf/cxf/blob/21469595/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java
----------------------------------------------------------------------
diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java
b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java
index 4faf82c..e202d44 100644
--- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java
+++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java
@@ -60,6 +60,9 @@ public class CORBADocLitClientTypeTest extends AbstractTypeTestClient5 {
             "ChoiceWithSubstitutionGroup",
             "ChoiceWithSubstitutionGroupAbstract",
             "ChoiceWithSubstitutionGroupNil",
+            "ComplexArray",
+            "ComplexChoice",
+            "ComplexStruct",
             "ComplexRestriction",
             "ComplexRestriction2",
             "ComplexRestriction3",
@@ -69,8 +72,13 @@ public class CORBADocLitClientTypeTest extends AbstractTypeTestClient5
{
             "ComplexTypeWithAttributeGroup1",
             "ComplexTypeWithAttributes",
             "DateTime",
+            "DerivedAllBaseAll",
+            "DerivedAllBaseChoice",
+            "DerivedAllBaseStruct",
+            "DerivedChoiceBaseAll",
             "DerivedChoiceBaseArray",
             "DerivedChoiceBaseChoice",
+            "DerivedChoiceBaseComplex",
             "DerivedChoiceBaseStruct",
             "DerivedNoContent",
             "DerivedStructBaseChoice",

http://git-wip-us.apache.org/repos/asf/cxf/blob/21469595/systests/uncategorized/src/test/resources/META-INF/jax-ws-catalog.xml
----------------------------------------------------------------------
diff --git a/systests/uncategorized/src/test/resources/META-INF/jax-ws-catalog.xml b/systests/uncategorized/src/test/resources/META-INF/jax-ws-catalog.xml
index b8a5625..f72c248 100644
--- a/systests/uncategorized/src/test/resources/META-INF/jax-ws-catalog.xml
+++ b/systests/uncategorized/src/test/resources/META-INF/jax-ws-catalog.xml
@@ -21,4 +21,8 @@
     <rewriteSystem systemIdStartString="http://www.w3.org/2006/03/addressing" rewritePrefix="classpath:/schemas/wsdl"/>
     <rewriteSystem systemIdStartString="http://www.w3.org/2005/08/addressing" rewritePrefix="classpath:/schemas/wsdl"/>
     <rewriteURI rewritePrefix="../wsdl_systest/envelope.xsd" uriStartString="http://schemas.xmlsoap.org/soap/envelope/"/>
+
+    <system systemId="./type_test_1.xsd" uri="classpath:/wsdl/type_test/type_test_1_validation.xsd"/>
+    <uri name="./type_test_1.xsd" uri="classpath:/wsdl/type_test/type_test_1_validation.xsd"/>
+    
 </catalog>

http://git-wip-us.apache.org/repos/asf/cxf/blob/21469595/testutils/pom.xml
----------------------------------------------------------------------
diff --git a/testutils/pom.xml b/testutils/pom.xml
index 2452618..debc9e8 100644
--- a/testutils/pom.xml
+++ b/testutils/pom.xml
@@ -133,6 +133,7 @@
                                 <mkdir dir="${generated.src.test}/org/apache/cxf/systest/type_test"
/>
                                 <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/cxf/systest/type_test/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/cxf/systest/type_test/TypeTestTester.java"
/>
+                                <xslt style="${test.resources.dir}/wsdl/type_test/validation.xsl"
in="${generated.resources.test}/wsdl/type_test/type_test_1.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_1_validation.xsd"
/>
                             </tasks>
                         </configuration>
                         <goals>

http://git-wip-us.apache.org/repos/asf/cxf/blob/21469595/testutils/src/main/resources/wsdl/type_test/inc_type_test_java_signature.xsl
----------------------------------------------------------------------
diff --git a/testutils/src/main/resources/wsdl/type_test/inc_type_test_java_signature.xsl
b/testutils/src/main/resources/wsdl/type_test/inc_type_test_java_signature.xsl
index 624c672..c4371f4 100644
--- a/testutils/src/main/resources/wsdl/type_test/inc_type_test_java_signature.xsl
+++ b/testutils/src/main/resources/wsdl/type_test/inc_type_test_java_signature.xsl
@@ -43,6 +43,9 @@
         <xsl:variable name="class_name">
             <xsl:value-of select="concat('Test', $the_name)"/>
         </xsl:variable>
+        <xsl:if test="@itst:noValidation='1'">
+            <xsl:text>&#10;    @org.apache.cxf.annotations.SchemaValidation(type
= org.apache.cxf.annotations.SchemaValidation.SchemaValidationType.NONE) </xsl:text>
+        </xsl:if>
         <xsl:text>&#10;    public </xsl:text>
         <xsl:apply-templates select="." mode="javaType"/>
         <xsl:text> </xsl:text>

http://git-wip-us.apache.org/repos/asf/cxf/blob/21469595/testutils/src/main/resources/wsdl/type_test/type_test.xsd
----------------------------------------------------------------------
diff --git a/testutils/src/main/resources/wsdl/type_test/type_test.xsd b/testutils/src/main/resources/wsdl/type_test/type_test.xsd
index 6fa0bc3..e1fc688 100644
--- a/testutils/src/main/resources/wsdl/type_test/type_test.xsd
+++ b/testutils/src/main/resources/wsdl/type_test/type_test.xsd
@@ -944,11 +944,11 @@
             </extension>
         </complexContent>
     </complexType>
-    <!-- XXX cos-all-limited.1.2: An 'all' model group must appear in a
+    <!-- cos-all-limited.1.2: An 'all' model group must appear in a
     particle with {min occurs} = {max occurs} = 1, and that particle must be
     part of a pair which constitutes the {content type} of a complex type
-    definition.
-    <complexType name="DerivedChoiceBaseAll">
+    definition.  -->
+    <complexType name="DerivedChoiceBaseAll" itst:noValidation="1">
         <complexContent mixed="false">
             <extension base="x1:SimpleAll">
                 <choice>
@@ -959,7 +959,7 @@
             </extension>
         </complexContent>
     </complexType>
-    <complexType name="DerivedAllBaseStruct">
+    <complexType name="DerivedAllBaseStruct" itst:noValidation="1">
         <complexContent mixed="false">
             <extension base="x1:SimpleStruct">
                 <all>
@@ -970,7 +970,7 @@
             </extension>
         </complexContent>
     </complexType>
-    <complexType name="DerivedAllBaseChoice">
+    <complexType name="DerivedAllBaseChoice" itst:noValidation="1">
         <complexContent mixed="false">
             <extension base="x1:SimpleChoice">
                 <all>
@@ -981,7 +981,7 @@
             </extension>
         </complexContent>
     </complexType>
-    <complexType name="DerivedAllBaseAll">
+    <complexType name="DerivedAllBaseAll" itst:noValidation="1">
         <complexContent mixed="false">
             <extension base="x1:SimpleAll">
                 <all>
@@ -992,7 +992,7 @@
             </extension>
         </complexContent>
     </complexType>
-    <complexType name="DerivedChoiceBaseComplex">
+    <complexType name="DerivedChoiceBaseComplex" itst:noValidation="1">
         <complexContent mixed="false">
             <extension base="x1:DerivedAllBaseStruct">
                 <choice>
@@ -1003,7 +1003,7 @@
             </extension>
         </complexContent>
     </complexType>
-    -->
+
     <complexType name="DerivedChoiceBaseArray">
         <complexContent mixed="false">
             <extension base="x1:UnboundedArray">
@@ -1061,25 +1061,26 @@
             </extension>
         </complexContent>
     </complexType>
-    <!-- XXX - TODO - DerivedChoiceBaseComplex issue 
-    <complexType name="ComplexStruct">
+    <complexType name="ComplexStruct" itst:noValidation="1">
         <sequence>
             <element name="varFloat" type="float"/>
             <element name="varDerivedStruct" type="x1:DerivedChoiceBaseComplex"/>
         </sequence>
+        <anyAttribute/>
     </complexType>
-    <complexType name="ComplexChoice">
+    <complexType name="ComplexChoice" itst:noValidation="1">
         <choice>
             <element name="varFloat" type="float"/>
             <element name="varDerivedStruct" type="x1:DerivedChoiceBaseComplex"/>
         </choice>
+        <anyAttribute/>
     </complexType>
-    <complexType name="ComplexArray">
+    <complexType name="ComplexArray" itst:noValidation="1">
         <sequence>
             <element name="varDerivedItem" nillable="true" minOccurs="2" maxOccurs="2"
type="x1:DerivedAllBaseStruct"/>
         </sequence>
+        <anyAttribute/>
     </complexType>
-    -->
 
     <!-- ComplexContentRestriction types -->
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/21469595/testutils/src/main/resources/wsdl/type_test/type_test_ID_xsd.xsl
----------------------------------------------------------------------
diff --git a/testutils/src/main/resources/wsdl/type_test/type_test_ID_xsd.xsl b/testutils/src/main/resources/wsdl/type_test/type_test_ID_xsd.xsl
index 276170d..50fbab9 100644
--- a/testutils/src/main/resources/wsdl/type_test/type_test_ID_xsd.xsl
+++ b/testutils/src/main/resources/wsdl/type_test/type_test_ID_xsd.xsl
@@ -35,6 +35,9 @@
   <!-- group selection parameter -->  
   <xsl:param name="groupID"/>
 
+
+  <xsl:template match="@itst:noValidation" mode="attribute_copy"/>
+
   <!-- copy attributes from any node -->
   <xsl:template match="@*" mode="attribute_copy">
     <xsl:attribute name="{name(.)}">

http://git-wip-us.apache.org/repos/asf/cxf/blob/21469595/testutils/src/main/resources/wsdl/type_test/validation.xsl
----------------------------------------------------------------------
diff --git a/testutils/src/main/resources/wsdl/type_test/validation.xsl b/testutils/src/main/resources/wsdl/type_test/validation.xsl
new file mode 100644
index 0000000..079b88d
--- /dev/null
+++ b/testutils/src/main/resources/wsdl/type_test/validation.xsl
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<!--
+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.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns="http://www.w3.org/2001/XMLSchema"
+    xmlns:xalan="http://xml.apache.org/xslt"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:x1="http://apache.org/type_test/types1"
+    >
+    
+    <xsl:output method="xml" indent="yes" xalan:indent-amount="4"/>
+    <xsl:strip-space elements="*"/>
+
+
+    <!-- These types fail validation so we just map them to a generic schema -->
+    <xsl:template match="xsd:complexType[@name='DerivedChoiceBaseAll']">
+        <complexType name="DerivedChoiceBaseAll">
+            <sequence>
+                <any/>
+            </sequence>
+            <anyAttribute/>
+        </complexType>
+    </xsl:template>
+    <xsl:template match="xsd:complexType[@name='DerivedAllBaseStruct']">
+        <complexType name="DerivedAllBaseStruct">
+            <sequence>
+                <any/>
+            </sequence>
+            <anyAttribute/>
+        </complexType>
+    </xsl:template>
+    <xsl:template match="xsd:complexType[@name='DerivedAllBaseChoice']">
+        <complexType name="DerivedAllBaseChoice">
+            <sequence>
+                <any/>
+            </sequence>
+            <anyAttribute/>
+        </complexType>
+    </xsl:template>
+    <xsl:template match="xsd:complexType[@name='DerivedAllBaseAll']">
+        <complexType name="DerivedAllBaseAll">
+            <sequence>
+                <any/>
+            </sequence>
+            <anyAttribute/>
+        </complexType>
+    </xsl:template>
+    <xsl:template match="xsd:complexType[@name='DerivedChoiceBaseComplex']">
+        <complexType name="DerivedChoiceBaseComplex">
+            <sequence>
+                <any/>
+            </sequence>
+            <anyAttribute/>
+        </complexType>
+    </xsl:template>
+
+
+    <!-- Idiomatic Copy Transformation -->
+    <xsl:template match="@*|node()">
+        <xsl:copy>
+            <xsl:apply-templates select="@*|node()" />
+        </xsl:copy>
+    </xsl:template>
+
+</xsl:stylesheet>


Mime
View raw message