Use new plugin to fix the generated code so the tests don't have to be disabled/skipped
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a6a84446 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a6a84446 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a6a84446 Branch: refs/heads/3.0.x-fixes Commit: a6a844461cfa3e611359b02ef6b35880243f2ee1 Parents: 9899ab7 Author: Daniel Kulp <dk...@apache.org> Authored: Fri Sep 12 13:18:41 2014 -0400 Committer: Daniel Kulp <dk...@apache.org> Committed: Fri Sep 12 14:00:08 2014 -0400 ---------------------------------------------------------------------- .../systest/type_test/AbstractTypeTestClient.java | 17 +---------------- .../systest/type_test/AbstractTypeTestClient3.java | 7 ------- testutils/pom.xml | 10 ++++++++++ 3 files changed, 11 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/a6a84446/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 76b902b..4b213fc 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 @@ -25,7 +25,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.datatype.DatatypeConstants; import javax.xml.datatype.Duration; import javax.xml.datatype.XMLGregorianCalendar; @@ -35,8 +34,6 @@ import javax.xml.ws.soap.SOAPFaultException; import org.apache.cxf.helpers.IOUtils; import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase; -import org.apache.type_test.doc.TestNumberList; -import org.apache.type_test.doc.TestQNameList; import org.apache.type_test.doc.TypeTestPortType; import org.apache.type_test.rpc.SOAPService; import org.apache.type_test.types1.AnyURIEnum; @@ -2089,11 +2086,6 @@ public abstract class AbstractTypeTestClient return; } if (testDocLiteral || testXMLBinding) { - if (TestNumberList.class.getDeclaredField("x").getAnnotation(XmlSchemaType.class) != null) { - //Bug in JAXB 2.2.10 where this annotation is being generated incorrectly for some - //lists - return; - } List<Integer> x = Arrays.asList(1, 2, 3); List<Integer> yOrig = Arrays.asList(10, 100, 1000); Holder<List<Integer>> y = new Holder<List<Integer>>(yOrig); @@ -2132,14 +2124,7 @@ public abstract class AbstractTypeTestClient if (!shouldRunTest("QNameList")) { return; } - if (testDocLiteral || testXMLBinding) { - if (TestQNameList.class.getDeclaredField("x").getAnnotation(XmlSchemaType.class) != null) { - //Bug in JAXB 2.2.10 where this annotation is being generated incorrectly for some - //lists - return; - } - - + if (testDocLiteral || testXMLBinding) { List<QName> x = Arrays.asList(new QName("http://schemas.iona.com/type_test", "testqname1"), new QName("http://schemas.iona.com/type_test", "testqname2"), new QName("http://schemas.iona.com/type_test", "testqname3")); http://git-wip-us.apache.org/repos/asf/cxf/blob/a6a84446/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 0e5e469..e66865e 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 @@ -25,7 +25,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.namespace.QName; import javax.xml.soap.Name; import javax.xml.soap.SOAPElement; @@ -34,7 +33,6 @@ import javax.xml.ws.Holder; import org.w3c.dom.Element; -import org.apache.type_test.doc.TestAnonEnumList; import org.apache.type_test.types1.DerivedChoiceBaseArray; import org.apache.type_test.types1.DerivedChoiceBaseChoice; import org.apache.type_test.types1.DerivedChoiceBaseStruct; @@ -2258,11 +2256,6 @@ public abstract class AbstractTypeTestClient3 extends AbstractTypeTestClient2 { return; } if (testDocLiteral || testXMLBinding) { - if (TestAnonEnumList.class.getDeclaredField("x").getAnnotation(XmlSchemaType.class) != null) { - //Bug in JAXB 2.2.10 where this annotation is being generated incorrectly for some - //lists - return; - } List<Short> x = Arrays.asList((short)10, (short)100); List<Short> yOrig = Arrays.asList((short)1000, (short)10); http://git-wip-us.apache.org/repos/asf/cxf/blob/a6a84446/testutils/pom.xml ---------------------------------------------------------------------- diff --git a/testutils/pom.xml b/testutils/pom.xml index 66860c8..4009102 100644 --- a/testutils/pom.xml +++ b/testutils/pom.xml @@ -158,6 +158,13 @@ <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>${project.version}</version> + <dependencies> + <dependency> + <groupId>org.apache.cxf.xjcplugins</groupId> + <artifactId>cxf-xjc-bug986</artifactId> + <version>${cxf.xjc-utils.version}</version> + </dependency> + </dependencies> <executions> <execution> <id>generate-sources</id> @@ -171,6 +178,9 @@ <include>rt-javascript/*.wsdl</include> </includes> <defaultOptions> + <xjcargs> + <xjcarg>-Xbug986</xjcarg> + </xjcargs> <!--extraargs> <extraarg>-verbose</extraarg> </extraargs-->