You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2017/08/11 20:41:13 UTC

[1/3] cxf git commit: Look at some XXX comments and remove them

Repository: cxf
Updated Branches:
  refs/heads/master 38c08dde6 -> 214695957


Look at some XXX comments and remove them


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

Branch: refs/heads/master
Commit: 5f71733592e1b590fa53c98d86f8ccec2a7b2bcd
Parents: 74e2b09
Author: Daniel Kulp <dk...@apache.org>
Authored: Fri Aug 11 15:01:10 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Aug 11 16:41:02 2017 -0400

----------------------------------------------------------------------
 .../service/factory/ReflectionServiceFactoryBean.java   |  3 +--
 .../java/org/apache/cxf/wsdl11/WSDLManagerImpl.java     | 12 ------------
 .../internal/annotator/WebParamAnnotatorTest.java       |  9 ---------
 3 files changed, 1 insertion(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/5f717335/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
----------------------------------------------------------------------
diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
index 643efce..ce73343 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
@@ -2010,8 +2010,7 @@ public class ReflectionServiceFactoryBean extends org.apache.cxf.service.factory
     }
 
     protected boolean isMatchOperation(String methodNameInClass, String methodNameInWsdl) {
-        // TODO: This seems wrong and not sure who put it here. Will revisit -
-        // DBD
+        // checks to make sure the operation names match ignoring the case of the first character
         boolean ret = false;
         String initOfMethodInClass = methodNameInClass.substring(0, 1);
         String initOfMethodInWsdl = methodNameInWsdl.substring(0, 1);

http://git-wip-us.apache.org/repos/asf/cxf/blob/5f717335/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
----------------------------------------------------------------------
diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
index bb57d4e..fbb47f5 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
@@ -151,22 +151,10 @@ public class WSDLManagerImpl implements WSDLManager {
         return bus;
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * XXX - getExtensionRegistry()
-     *
-     * @see org.apache.cxf.wsdl.WSDLManager#getExtenstionRegistry()
-     */
     public ExtensionRegistry getExtensionRegistry() {
         return registry;
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.apache.cxf.wsdl.WSDLManager#getDefinition(java.lang.String)
-     */
     public Definition getDefinition(String url) throws WSDLException {
         synchronized (definitionsMap) {
             if (definitionsMap.containsKey(url)) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/5f717335/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebParamAnnotatorTest.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebParamAnnotatorTest.java b/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebParamAnnotatorTest.java
index ff304fd..f28d05c 100644
--- a/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebParamAnnotatorTest.java
+++ b/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebParamAnnotatorTest.java
@@ -66,10 +66,6 @@ public class WebParamAnnotatorTest extends Assert {
         assertEquals(2, elements.size());
         assertEquals("http://apache.org/cxf", elements.get(1).getValue());
         assertEquals("x", elements.get(0).getValue());
-        // XXX - order that attributes are appended to the string
-        //       differs with the ibmjdk...
-        //assertEquals("@WebParam(targetNamespace = \"http://apache.org/cxf\", name = \"x\")",
-        //             annotation.toString());
     }
 
     @Test
@@ -84,11 +80,6 @@ public class WebParamAnnotatorTest extends Assert {
                          annotation.toString());
         List<JAnnotationElement> elements = annotation.getElements();
         assertEquals(3, elements.size());
-        // XXX - order that attributes are appended to the string
-        //       differs with the ibmjdk...
-        //assertEquals(
-        //"@WebParam(targetNamespace = \"http://apache.org/cxf\", partName = \"y\", name = \"x\")",
-        //             annotation.toString());
     }
 
     @Test


[3/3] cxf git commit: Update type-test to enable some types that have been disabled for a long time

Posted by dk...@apache.org.
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 <dk...@apache.org>
Authored: Fri Aug 11 15:34:33 2017 -0400
Committer: Daniel Kulp <dk...@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>


[2/3] cxf git commit: [CXF-7469] Update DocLiteralInInterceptor to make sure @SchemaValidation on the operation level can be used

Posted by dk...@apache.org.
[CXF-7469] Update DocLiteralInInterceptor to make sure @SchemaValidation on the operation level can be used


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

Branch: refs/heads/master
Commit: 74e2b090c612b4b83e17c3122dbe8b5bd3383785
Parents: 38c08dd
Author: Daniel Kulp <dk...@apache.org>
Authored: Fri Aug 11 15:00:04 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Aug 11 16:41:02 2017 -0400

----------------------------------------------------------------------
 .../validation/DefaultSchemaValidationTypeProvider.java |  6 +++++-
 .../main/java/org/apache/cxf/helpers/ServiceUtils.java  | 12 ++++++++++--
 .../java/org/apache/cxf/service/model/SchemaInfo.java   |  2 +-
 .../cxf/wsdl/interceptors/DocLiteralInInterceptor.java  |  2 +-
 .../schemavalidation/JavaFirstSchemaValidationTest.java | 11 +++++++++--
 5 files changed, 26 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/74e2b090/core/src/main/java/org/apache/cxf/feature/validation/DefaultSchemaValidationTypeProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/feature/validation/DefaultSchemaValidationTypeProvider.java b/core/src/main/java/org/apache/cxf/feature/validation/DefaultSchemaValidationTypeProvider.java
index 8490c56..7f8a157 100644
--- a/core/src/main/java/org/apache/cxf/feature/validation/DefaultSchemaValidationTypeProvider.java
+++ b/core/src/main/java/org/apache/cxf/feature/validation/DefaultSchemaValidationTypeProvider.java
@@ -39,6 +39,10 @@ public class DefaultSchemaValidationTypeProvider implements SchemaValidationType
 
     @Override
     public SchemaValidationType getSchemaValidationType(OperationInfo info) {
-        return operationMap.get(info.getName().getLocalPart());
+        SchemaValidationType t = operationMap.get(info.getName().getLocalPart());
+        if (t == null) {
+            t = operationMap.get("*");
+        }
+        return t;
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/74e2b090/core/src/main/java/org/apache/cxf/helpers/ServiceUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/helpers/ServiceUtils.java b/core/src/main/java/org/apache/cxf/helpers/ServiceUtils.java
index 1946082..a4537a2 100644
--- a/core/src/main/java/org/apache/cxf/helpers/ServiceUtils.java
+++ b/core/src/main/java/org/apache/cxf/helpers/ServiceUtils.java
@@ -81,7 +81,12 @@ public final class ServiceUtils {
         if (validationType == null) {
             validationType = getSchemaValidationTypeFromModel(message);
         }
-
+        if (validationType == null) {
+            Object obj = message.getContextualProperty(Message.SCHEMA_VALIDATION_ENABLED);
+            if (obj != null) {
+                validationType = getSchemaValidationType(obj);
+            }
+        }
         if (validationType == null) {
             validationType = SchemaValidationType.NONE;
         }
@@ -90,7 +95,10 @@ public final class ServiceUtils {
     }
 
     private static SchemaValidationType getOverrideSchemaValidationType(Message message) {
-        Object obj = message.getContextualProperty(Message.SCHEMA_VALIDATION_ENABLED);
+        Object obj = message.get(Message.SCHEMA_VALIDATION_ENABLED);
+        if (obj == null && message.getExchange() != null) {
+            obj = message.getExchange().get(Message.SCHEMA_VALIDATION_ENABLED);
+        }
         if (obj != null) {
             // this method will transform the legacy enabled as well
             return getSchemaValidationType(obj);

http://git-wip-us.apache.org/repos/asf/cxf/blob/74e2b090/core/src/main/java/org/apache/cxf/service/model/SchemaInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/service/model/SchemaInfo.java b/core/src/main/java/org/apache/cxf/service/model/SchemaInfo.java
index d67ab8d..7d604bf 100644
--- a/core/src/main/java/org/apache/cxf/service/model/SchemaInfo.java
+++ b/core/src/main/java/org/apache/cxf/service/model/SchemaInfo.java
@@ -112,7 +112,7 @@ public final class SchemaInfo extends AbstractPropertiesHolder {
             element = serializedSchema.getDocumentElement();
             cachedElement = new SoftReference<Element>(element);
         }
-        // XXX A problem can occur with the ibm jdk when the XmlSchema
+        // A problem can occur with the ibm jdk when the XmlSchema
         // object is serialized. The xmlns declaration gets incorrectly
         // set to the same value as the targetNamespace attribute.
         // The aegis databinding tests demonstrate this particularly.

http://git-wip-us.apache.org/repos/asf/cxf/blob/74e2b090/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/DocLiteralInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/DocLiteralInInterceptor.java b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/DocLiteralInInterceptor.java
index 60f406f..1df918d 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/DocLiteralInInterceptor.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/DocLiteralInInterceptor.java
@@ -69,7 +69,6 @@ public class DocLiteralInInterceptor extends AbstractInDatabindingInterceptor {
         }
 
         DepthXMLStreamReader xmlReader = getXMLStreamReader(message);
-        DataReader<XMLStreamReader> dr = getDataReader(message);
         MessageContentsList parameters = new MessageContentsList();
 
         Exchange exchange = message.getExchange();
@@ -90,6 +89,7 @@ public class DocLiteralInInterceptor extends AbstractInDatabindingInterceptor {
         if (bop != null && bop.getBinding() != null) {
             forceDocLitBare = Boolean.TRUE.equals(bop.getBinding().getService().getProperty("soap.force.doclit.bare"));
         }
+        DataReader<XMLStreamReader> dr = getDataReader(message);
 
         try {
             if (!forceDocLitBare && bop != null && bop.isUnwrappedCapable()) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/74e2b090/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/schemavalidation/JavaFirstSchemaValidationTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/schemavalidation/JavaFirstSchemaValidationTest.java b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/schemavalidation/JavaFirstSchemaValidationTest.java
index b2bfd96..84394e6 100644
--- a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/schemavalidation/JavaFirstSchemaValidationTest.java
+++ b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/schemavalidation/JavaFirstSchemaValidationTest.java
@@ -66,7 +66,8 @@ public class JavaFirstSchemaValidationTest extends Assert {
         createServer(PORT, PersonService.class, new PersonServiceImpl(), null, createSchemaValidationFeature());
 
         createServer(PORT2, PersonServiceWithRequestResponseAnns.class,
-                new PersonServiceWithRequestResponseAnnsImpl(), SchemaValidationType.NONE);
+                new PersonServiceWithRequestResponseAnnsImpl(), SchemaValidationType.NONE,
+                    createNoSchemaValidationFeature());
 
         createServer(PORT, PersonServiceAnnotated.class, new PersonServiceAnnotatedImpl(), null);
 
@@ -94,6 +95,12 @@ public class JavaFirstSchemaValidationTest extends Assert {
         DefaultSchemaValidationTypeProvider provider = new DefaultSchemaValidationTypeProvider(operationMap);
         return new SchemaValidationFeature(provider);
     }
+    private static SchemaValidationFeature createNoSchemaValidationFeature() {
+        Map<String, SchemaValidationType> operationMap = new HashMap<>();
+        operationMap.put("*", SchemaValidationType.NONE);
+        DefaultSchemaValidationTypeProvider provider = new DefaultSchemaValidationTypeProvider(operationMap);
+        return new SchemaValidationFeature(provider);
+    }
 
     @AfterClass
     public static void cleanup() throws Exception {
@@ -319,7 +326,7 @@ public class JavaFirstSchemaValidationTest extends Assert {
             noValidationServerClient.saveValidateIn(person);
             fail("Expected exception");
         } catch (SOAPFaultException e) {
-            assertTrue(e.getMessage().contains("Unmarshalling Error"));
+            assertTrue(e.getMessage(), e.getMessage().contains("Unmarshalling Error"));
         }
 
         person.setFirstName(""); // empty string is valid