cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r639519 [2/3] - in /incubator/cxf/trunk: ./ api/src/main/java/org/apache/cxf/wsdl/ common/common/src/main/java/org/apache/cxf/common/classloader/ common/common/src/main/java/org/apache/cxf/common/xmlschema/ distribution/src/main/release/bin...
Date Fri, 21 Mar 2008 02:28:50 GMT
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient2.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient2.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient2.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient2.java Thu Mar 20 19:28:42 2008
@@ -100,6 +100,9 @@
     //org.apache.type_test.types1.EmptyStruct
     @Test
     public void testEmptyStruct() throws Exception {
+        if (!shouldRunTest("EmptyStruct")) {
+            return;
+        }
         EmptyStruct x = new EmptyStruct();
         EmptyStruct yOrig = new EmptyStruct();
         Holder<EmptyStruct> y = new Holder<EmptyStruct>(yOrig);
@@ -158,6 +161,9 @@
     }
     @Test
     public void testSimpleStruct() throws Exception {
+        if (!shouldRunTest("SimpleStruct")) {
+            return;
+        }
         SimpleStruct x = new SimpleStruct();
         x.setVarFloat(3.14f);
         x.setVarInt(new BigInteger("42"));
@@ -197,6 +203,9 @@
     }
     @Test
     public void testStructWithNillables() throws Exception {
+        if (!shouldRunTest("StructWithNillables")) {
+            return;
+        }
         StructWithNillables x = new StructWithNillables();
         StructWithNillables yOrig = new StructWithNillables();
         yOrig.setVarFloat(new Float(1.414f));
@@ -231,6 +240,9 @@
     }
     @Test
     public void testAnonymousStruct() throws Exception {
+        if (!shouldRunTest("AnonymousStruct")) {
+            return;
+        }
         AnonymousStruct x = new AnonymousStruct();
         x.setVarInt(100);
         x.setVarString("hello");
@@ -288,6 +300,9 @@
     }
     @Test
     public void testNestedStruct() throws Exception {
+        if (!shouldRunTest("NestedStruct")) {
+            return;
+        }
         SimpleStruct xs = new SimpleStruct();
         xs.setVarFloat(30.14);
         xs.setVarInt(new BigInteger("420"));
@@ -333,6 +348,9 @@
     //org.apache.type_test.types1.FixedArray
     @Test
     public void testFixedArray() throws Exception {
+        if (!shouldRunTest("FixedArray")) {
+            return;
+        }
         FixedArray x = new FixedArray();
         x.getItem().addAll(Arrays.asList(Integer.MIN_VALUE, 0, Integer.MAX_VALUE));
 
@@ -364,6 +382,9 @@
     //org.apache.type_test.types1.BoundedArray
     @Test
     public void testBoundedArray() throws Exception {
+        if (!shouldRunTest("BoundedArray")) {
+            return;
+        }
         BoundedArray x = new BoundedArray();
         x.getItem().addAll(Arrays.asList(-100.00f, 0f, 100.00f));
         BoundedArray yOrig = new BoundedArray();
@@ -416,6 +437,9 @@
     }
     @Test
     public void testUnboundedArray() throws Exception {
+        if (!shouldRunTest("UnboundedArray")) {
+            return;
+        }
         UnboundedArray x = new UnboundedArray();
         x.getItem().addAll(Arrays.asList("AAA", "BBB", "CCC"));
         UnboundedArray yOrig = new UnboundedArray();
@@ -448,6 +472,9 @@
     }
     @Test
     public void testCompoundArray() throws Exception {
+        if (!shouldRunTest("CompoundArray")) {
+            return;
+        }
         CompoundArray x = new CompoundArray();
         x.getArray1().addAll(Arrays.asList("AAA", "BBB", "CCC"));
         x.getArray2().addAll(Arrays.asList("aaa", "bbb", "ccc"));
@@ -478,6 +505,9 @@
     //org.apache.type_test.types1.NestedArray
     @Test
     public void testNestedArray() throws Exception {
+        if (!shouldRunTest("NestedArray")) {
+            return;
+        }
         String[][] xs = {{"AAA", "BBB", "CCC"}, {"aaa", "bbb", "ccc"}, {"a_a_a", "b_b_b", "c_c_c"}};
         String[][] ys = {{"XXX", "YYY", "ZZZ"}, {"xxx", "yyy", "zzz"}, {"x_x_x", "y_y_y", "z_z_z"}};
 
@@ -548,6 +578,9 @@
     }
     @Test
     public void testStructWithList() throws Exception {
+        if (!shouldRunTest("StructWithList")) {
+            return;
+        }
         StructWithList x = new StructWithList();
         x.getVarList().add("I");
         x.getVarList().add("am");
@@ -619,6 +652,9 @@
     }
     @Test
     public void testStructWithUnion() throws Exception {
+        if (!shouldRunTest("StructWithUnion")) {
+            return;
+        }
         StructWithUnion x = new StructWithUnion();
         x.setVarUnion("999");
         StructWithUnion yOrig = new StructWithUnion();
@@ -674,6 +710,9 @@
     //org.apache.type_test.types1.EmptyChoice
     @Test
     public void testEmptyChoice() throws Exception {
+        if (!shouldRunTest("EmptyChoice")) {
+            return;
+        }
         EmptyChoice x = new EmptyChoice();
         EmptyChoice yOrig = new EmptyChoice();
         Holder<EmptyChoice> y = new Holder<EmptyChoice>(yOrig);
@@ -710,6 +749,9 @@
     }
     @Test
     public void testSimpleChoice() throws Exception {
+        if (!shouldRunTest("SimpleChoice")) {
+            return;
+        }
         SimpleChoice x = new SimpleChoice();
         x.setVarFloat(-3.14f);
         SimpleChoice yOrig = new SimpleChoice();
@@ -738,6 +780,9 @@
     //org.apache.type_test.types1.EmptyAll
     @Test
     public void testEmptyAll() throws Exception {
+        if (!shouldRunTest("EmptyAll")) {
+            return;
+        }
         EmptyAll x = new EmptyAll();
         EmptyAll yOrig = new EmptyAll();
         Holder<EmptyAll> y = new Holder<EmptyAll>(yOrig);
@@ -769,6 +814,9 @@
     }
     @Test
     public void testSimpleAll() throws Exception {
+        if (!shouldRunTest("SimpleAll")) {
+            return;
+        }
         SimpleAll x = new SimpleAll();
         x.setVarFloat(3.14f);
         x.setVarInt(42);
@@ -811,6 +859,9 @@
     }
     @Test
     public void testStructWithOptionals() throws Exception {
+        if (!shouldRunTest("StructWithOptionals")) {
+            return;
+        }
         StructWithOptionals x = new StructWithOptionals();
         StructWithOptionals yOrig = new StructWithOptionals();
         yOrig.setVarFloat(new Float(1.414f));
@@ -847,6 +898,9 @@
     }
     @Test
     public void testRecursiveStruct() throws Exception {
+        if (!shouldRunTest("RecursiveStruct")) {
+            return;
+        }
         RecursiveStruct xtmp = new RecursiveStruct();
         xtmp.setVarFloat(0.14f);
         xtmp.setVarInt(4);
@@ -914,6 +968,9 @@
     }
     @Test
     public void testRecursiveStructArray() throws Exception {
+        if (!shouldRunTest("RecursiveStructArray")) {
+            return;
+        }
         RecursiveStruct xtmp = new RecursiveStruct();
         xtmp.setVarFloat(0.14f);
         xtmp.setVarInt(4);
@@ -965,6 +1022,9 @@
     }
     @Test
     public void testRecursiveUnion() throws Exception {
+        if (!shouldRunTest("RecursiveUnion")) {
+            return;
+        }
         RecursiveUnion tmp1 = new RecursiveUnion();
         tmp1.setVarString("RecusiveUnion-1");
         RecursiveUnion tmp2 = new RecursiveUnion();
@@ -1017,6 +1077,9 @@
     }
     @Test
     public void testRecursiveUnionData() throws Exception {
+        if (!shouldRunTest("RecursiveUnionData")) {
+            return;
+        }
         RecursiveUnion tmp1 = new RecursiveUnion();
         tmp1.setVarString("RecusiveUnion-1");
         RecursiveUnion tmp2 = new RecursiveUnion();
@@ -1075,6 +1138,9 @@
     }
     @Test
     public void testChoiceArray() throws Exception {
+        if (!shouldRunTest("ChoiceArray")) {
+            return;
+        }
         RecursiveUnion tmp1 = new RecursiveUnion();
         tmp1.setVarString("RecusiveUnion-1");
         RecursiveUnion tmp2 = new RecursiveUnion();
@@ -1110,6 +1176,9 @@
     //org.apache.type_test.types2.ExtendsSimpleType
     @Test
     public void testExtendsSimpleType() throws Exception {
+        if (!shouldRunTest("ExtendsSimpleType")) {
+            return;
+        }
         ExtendsSimpleType x = new ExtendsSimpleType();
         x.setValue("foo");
         ExtendsSimpleType yOriginal = new ExtendsSimpleType();
@@ -1134,6 +1203,9 @@
     //org.apache.type_test.types1.ExtendsSimpleContent
     @Test
     public void testExtendsSimpleContent() throws Exception {
+        if (!shouldRunTest("ExtendsSimpleContent")) {
+            return;
+        }
         ExtendsSimpleContent x = new ExtendsSimpleContent();
         x.setValue("foo");
 
@@ -1164,6 +1236,9 @@
     }
     @Test
     public void testDocument() throws Exception {
+        if (!shouldRunTest("Document")) {
+            return;
+        }
         Document x = new Document();
         x.setValue("content-x");
         x.setID("Hello There");
@@ -1222,6 +1297,9 @@
     }
     @Test
     public void testExtColourEnum() throws Exception {
+        if (!shouldRunTest("ExtColourEnum")) {
+            return;
+        }
         ExtColourEnum x = new ExtColourEnum();
         x.setAttrib1(new Integer(1));
         x.setAttrib2("Ax");
@@ -1256,6 +1334,9 @@
     }
     @Test
     public void testExtBase64Binary() throws Exception {
+        if (!shouldRunTest("ExtBase64Binary")) {
+            return;
+        }
         ExtBase64Binary x1 = new ExtBase64Binary();
         x1.setValue("base64a".getBytes());
         x1.setId(1);
@@ -1297,6 +1378,9 @@
     }
     @Test
     public void testStructWithSubstitutionGroup() throws Exception {
+        if (!shouldRunTest("StructWithSubstitutionGroup")) {
+            return;
+        }
         SgBaseTypeA baseA = new SgBaseTypeA();
         baseA.setVarInt(new BigInteger("1"));
 
@@ -1345,6 +1429,9 @@
     }
     @Test
     public void testStructWithSubstitutionGroupAbstract() throws Exception {
+        if (!shouldRunTest("StructWithSubstitutionGroupAbstract")) {
+            return;
+        }
         SgDerivedTypeB derivedB = new SgDerivedTypeB();
         derivedB.setVarInt(new BigInteger("32"));
         derivedB.setVarString("foo");
@@ -1398,6 +1485,9 @@
     }
     @Test
     public void testStructWithSubstitutionGroupNil() throws Exception {
+        if (!shouldRunTest("StructWithSubstitutionGroupNil")) {
+            return;
+        }
         StructWithSubstitutionGroupNil x = new StructWithSubstitutionGroupNil();
         ObjectFactory objectFactory = new ObjectFactory();
         JAXBElement<? extends SgBaseTypeA> element = objectFactory.createSg04NillableBaseElementA(null);
@@ -1465,6 +1555,9 @@
     }
     @Test
     public void testStructWithMultipleSubstitutionGroups() throws Exception {
+        if (!shouldRunTest("StructWithMultipleSubstitutionGroups")) {
+            return;
+        }
         SgBaseTypeA baseA = new SgBaseTypeA();
         baseA.setVarInt(new BigInteger("1"));
         
@@ -1533,6 +1626,9 @@
     }
     @Test
     public void testChoiceWithSubstitutionGroupAbstract() throws Exception {
+        if (!shouldRunTest("ChoiceWithSubstitutionGroupAbstract")) {
+            return;
+        }
         SgDerivedTypeB derivedB = new SgDerivedTypeB();
         derivedB.setVarInt(new BigInteger("32"));
         derivedB.setVarString("foo");
@@ -1609,6 +1705,9 @@
     }
     @Test
     public void testChoiceWithSubstitutionGroupNil() throws Exception {
+        if (!shouldRunTest("ChoiceWithSubstitutionGroupNil")) {
+            return;
+        }
         ObjectFactory objectFactory = new ObjectFactory();
         
         ChoiceWithSubstitutionGroupNil x = new ChoiceWithSubstitutionGroupNil();
@@ -1692,6 +1791,9 @@
     }
     @Test
     public void testChoiceWithSubstitutionGroup() throws Exception {
+        if (!shouldRunTest("ChoiceWithSubstitutionGroup")) {
+            return;
+        }
         SgBaseTypeA baseA = new SgBaseTypeA();
         baseA.setVarInt(new BigInteger("1"));
 
@@ -1755,6 +1857,9 @@
     }
     @Test
     public void testRecElType() throws Exception {
+        if (!shouldRunTest("RecElType")) {
+            return;
+        }
         RecElType x = new RecElType();
         RecElType y = new RecElType();
         RecElNextType xn = new RecElNextType();
@@ -1884,6 +1989,9 @@
     }
     @Test
     public void testRecOuterType() throws Exception {
+        if (!shouldRunTest("RecOuterType")) {
+            return;
+        }
         RecMostInnerType mitx = new RecMostInnerType();
         RecMostInnerType mity = new RecMostInnerType();
         RecMostInnerNextType mitxNext = new RecMostInnerNextType();
@@ -1947,6 +2055,9 @@
     }
     @Test
     public void testSimpleContent1() throws Exception {
+        if (!shouldRunTest("SimpleContent1")) {
+            return;
+        }
         SimpleContent1 x1 = new SimpleContent1();
         x1.setValue("foo");
         x1.setAttrib1A(new Byte((byte)1));
@@ -1981,6 +2092,9 @@
     }
     @Test
     public void testSimpleContent2() throws Exception {
+        if (!shouldRunTest("SimpleContent2")) {
+            return;
+        }
         SimpleContent2 x2 = new SimpleContent2();
         x2.setValue("foo");
         x2.setAttrib1A(new Byte((byte)1));
@@ -2019,6 +2133,9 @@
     }
     @Test
     public void testSimpleContent3() throws Exception {
+        if (!shouldRunTest("SimpleContent3")) {
+            return;
+        }
         SimpleContent3 x3 = new SimpleContent3();
         x3.setValue("foo");
         x3.setAttrib1A(new Byte((byte)1));
@@ -2061,6 +2178,9 @@
     }
     @Test
     public void testUnionSimpleContent() throws Exception {
+        if (!shouldRunTest("UnionSimpleContent")) {
+            return;
+        }
         UnionSimpleContent x = new UnionSimpleContent();
         x.setValue("5");
         UnionSimpleContent yOrig = new UnionSimpleContent();
@@ -2082,4 +2202,5 @@
             assertEquals("testUnionSimpleContent(): Incorrect return value", x, ret);
         }
     }
+    
 }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java Thu Mar 20 19:28:42 2008
@@ -98,6 +98,9 @@
 
     @Test
     public void testChoiceOfChoice() throws Exception {
+        if (!shouldRunTest("ChoiceOfChoice")) {
+            return;
+        }
         ChoiceOfChoice x = new ChoiceOfChoice();
         ChoiceOfChoice yOrig = new ChoiceOfChoice();
         x.setVarFloat(3.14f);
@@ -139,6 +142,9 @@
 
     @Test
     public void testChoiceOfSeq() throws Exception {
+        if (!shouldRunTest("ChoiceOfSeq")) {
+            return;
+        }
         ChoiceOfSeq x = new ChoiceOfSeq();
         x.setVarInt(123);
         x.setVarFloat(3.14f);
@@ -177,6 +183,9 @@
 
     @Test
     public void testDerivedStructBaseStruct() throws Exception {
+        if (!shouldRunTest("DerivedStructBaseStruct")) {
+            return;
+        }
         DerivedStructBaseStruct x = new DerivedStructBaseStruct();
         //Base
         x.setVarFloat(3.14f);
@@ -229,6 +238,9 @@
 
     @Test
     public void testDerivedStructBaseChoice() throws Exception {
+        if (!shouldRunTest("DerivedStructBaseChoice")) {
+            return;
+        }
         DerivedStructBaseChoice x = new DerivedStructBaseChoice();
         //Base
         x.setVarString("BaseChoice-x");
@@ -277,6 +289,9 @@
 
     @Test
     public void testDerivedChoiceBaseStruct() throws Exception {
+        if (!shouldRunTest("DerivedChoiceBaseStruct")) {
+            return;
+        }
         DerivedChoiceBaseStruct x = new DerivedChoiceBaseStruct();
         //Base
         x.setVarFloat(3.14f);
@@ -331,6 +346,9 @@
 
     @Test
     public void testDerivedChoiceBaseArray() throws Exception {
+        if (!shouldRunTest("DerivedChoiceBaseArray")) {
+            return;
+        }
         DerivedChoiceBaseArray x = new DerivedChoiceBaseArray();
         //Base
         x.getItem().addAll(Arrays.asList("AAA", "BBB", "CCC"));
@@ -380,6 +398,9 @@
 
     @Test
     public void testDerivedChoiceBaseChoice() throws Exception {
+        if (!shouldRunTest("DerivedChoiceBaseChoice")) {
+            return;
+        }
         DerivedChoiceBaseChoice x = new DerivedChoiceBaseChoice();
         //Base
         x.setVarString("BaseChoice-x");
@@ -422,6 +443,9 @@
 
     @Test
     public void testDerivedNoContent() throws Exception {
+        if (!shouldRunTest("DerivedNoContent")) {
+            return;
+        }
         DerivedNoContent x = new DerivedNoContent();
         x.setVarFloat(3.14f);
         x.setVarInt(new BigInteger("42"));
@@ -463,6 +487,9 @@
 
     @Test
     public void testDerivedStructBaseEmpty() throws Exception {
+        if (!shouldRunTest("DerivedStructBaseEmpty")) {
+            return;
+        }
         DerivedStructBaseEmpty x = new DerivedStructBaseEmpty();
         //Derived
         x.setVarFloatExt(-3.14f);
@@ -498,6 +525,9 @@
 
     @Test
     public void testDerivedEmptyBaseEmptyAll() throws Exception {
+        if (!shouldRunTest("DerivedEmptyBaseEmptyAll")) {
+            return;
+        }
         DerivedEmptyBaseEmptyAll x = new DerivedEmptyBaseEmptyAll();
         DerivedEmptyBaseEmptyAll yOrig = new DerivedEmptyBaseEmptyAll();
         Holder<DerivedEmptyBaseEmptyAll> y = new Holder<DerivedEmptyBaseEmptyAll>(yOrig);
@@ -520,6 +550,9 @@
 
     @Test
     public void testDerivedEmptyBaseEmptyChoice() throws Exception {
+        if (!shouldRunTest("DerivedEmptyBaseEmptyChoice")) {
+            return;
+        }
         DerivedEmptyBaseEmptyChoice x = new DerivedEmptyBaseEmptyChoice();
         DerivedEmptyBaseEmptyChoice yOrig = new DerivedEmptyBaseEmptyChoice();
         Holder<DerivedEmptyBaseEmptyChoice> y = new Holder<DerivedEmptyBaseEmptyChoice>(yOrig);
@@ -551,6 +584,9 @@
 
     @Test
     public void testRestrictedChoiceBaseChoice() throws Exception {
+        if (!shouldRunTest("RestrictedChoiceBaseChoice")) {
+            return;
+        }
         RestrictedChoiceBaseChoice x = new RestrictedChoiceBaseChoice();
         x.setVarInt(12);
 
@@ -588,6 +624,9 @@
 
     @Test
     public void testComplexTypeWithAttributeGroup() throws Exception {
+        if (!shouldRunTest("ComplexTypeWithAttributeGroup")) {
+            return;
+        }
         ComplexTypeWithAttributeGroup x = new ComplexTypeWithAttributeGroup();
         x.setAttrInt(new BigInteger("123"));
         x.setAttrString("x123");
@@ -625,6 +664,9 @@
 
     @Test
     public void testComplexTypeWithAttributeGroup1() throws Exception {
+        if (!shouldRunTest("ComplexTypeWithAttributeGroup1")) {
+            return;
+        }
         ComplexTypeWithAttributeGroup1 x = new ComplexTypeWithAttributeGroup1();
         x.setAttrInt(new BigInteger("123"));
         x.setAttrString("x123");
@@ -665,6 +707,9 @@
 
     @Test
     public void testSequenceWithGroupSeq() throws Exception {
+        if (!shouldRunTest("SequenceWithGroupSeq")) {
+            return;
+        }
         SequenceWithGroupSeq x = new SequenceWithGroupSeq();
         x.setVarInt(100);         
         x.setVarString("hello");
@@ -735,6 +780,9 @@
     }
     @Test
     public void testSequenceWithGroupChoice() throws Exception {
+        if (!shouldRunTest("SequenceWithGroupChoice")) {
+            return;
+        }
         SequenceWithGroupChoice x = new SequenceWithGroupChoice();
         x.setVarFloat(1.1f);
         x.setVarOtherString("world");
@@ -786,6 +834,9 @@
     }
     @Test
     public void testSequenceWithGroups() throws Exception {
+        if (!shouldRunTest("SequenceWithGroups")) {
+            return;
+        }
         SequenceWithGroups x = new SequenceWithGroups();
         x.setVarInt(100);
         x.setVarString("hello");
@@ -825,6 +876,9 @@
     }
     @Test
     public void testSequenceWithOccuringGroup() throws Exception {
+        if (!shouldRunTest("SequenceWithOccuringGroup")) {
+            return;
+        }
         SequenceWithOccuringGroup x = new SequenceWithOccuringGroup();
         x.getBatchElementsSeq().add(1.1f);
         x.getBatchElementsSeq().add(100);
@@ -865,6 +919,9 @@
     }
     @Test
     public void testGroupDirectlyInComplexType() throws Exception {
+        if (!shouldRunTest("GroupDirectlyInComplexType")) {
+            return;
+        }
         GroupDirectlyInComplexType x = new GroupDirectlyInComplexType();
         x.setVarInt(100);
         x.setVarString("hello");
@@ -905,6 +962,9 @@
 
     @Test
     public void testComplexTypeWithAttributes() throws Exception {
+        if (!shouldRunTest("ComplexTypeWithAttributes")) {
+            return;
+        }
         ComplexTypeWithAttributes x = new ComplexTypeWithAttributes();
         x.setAttrInt(new BigInteger("123"));
         x.setAttrString("x123");
@@ -969,6 +1029,9 @@
     }
     @Test
     public void testStructWithAny() throws Exception {
+        if (!shouldRunTest("StructWithAny")) {
+            return;
+        }
         StructWithAny swa = new StructWithAny();
         swa.setName("Name");
         swa.setAddress("Some Address");
@@ -1009,6 +1072,9 @@
 
     @Test
     public void testStructWithAnyXsi() throws Exception {
+        if (!shouldRunTest("StructWithAnyXsi")) {
+            return;
+        }
         StructWithAny swa = new StructWithAny();
         swa.setName("Name");
         swa.setAddress("Some Address");
@@ -1057,6 +1123,9 @@
     // XXX - no exception thrown
     @Test
     public void testStructWithInvalidAny() throws Exception {
+        if (!shouldRunTest("StructWithInvalidAny")) {
+            return;
+        }
         StructWithAny swa = new StructWithAny();
         swa.setName("Name");
         swa.setAddress("Some Address");
@@ -1109,6 +1178,9 @@
 
     @Test
     public void testStructWithAnyArray() throws Exception {
+        if (!shouldRunTest("StructWithAnyArray")) {
+            return;
+        }
         StructWithAnyArray swa = new StructWithAnyArray();
         swa.setName("Name");
         swa.setAddress("Some Address");
@@ -1151,6 +1223,9 @@
     // XXX - no exception thrown
     @Test
     public void testStructWithInvalidAnyArray() throws Exception {
+        if (!shouldRunTest("StructWithInvalidAnyArray")) {
+            return;
+        }
         StructWithAnyArray swa = new StructWithAnyArray();
         swa.setName("Name");
         swa.setAddress("Some Address");
@@ -1190,12 +1265,18 @@
     @Test
     @Ignore
     public void testStructWithAnyStrict() throws Exception {
+        if (!shouldRunTest("StructWithAnyStrict")) {
+            return;
+        }
         // XXX - only added to the soap typetest
     }
 
     @Test
     @Ignore
     public void testStructWithAnyArrayLax() throws Exception {
+        if (!shouldRunTest("StructWithAnyArrayLax")) {
+            return;
+        }
         // XXX - only added to the soap typetest
     }
 
@@ -1207,6 +1288,9 @@
 
     @Test
     public void testIDTypeAttribute() throws Exception {
+        if (!shouldRunTest("IDTypeAttribute")) {
+            return;
+        }
         // n.b. to be valid elements with an ID in the response message
         // must have a unique ID, so this test does not return x as the
         // return value (like the other tests).
@@ -1250,6 +1334,9 @@
 
     @Test
     public void testMultipleOccursSequenceInSequence() throws Exception {
+        if (!shouldRunTest("MultipleOccursSequenceInSequence")) {
+            return;
+        }
         MultipleOccursSequenceInSequence x = new MultipleOccursSequenceInSequence();
         x.getValue().add(new BigInteger("32"));
         MultipleOccursSequenceInSequence yOriginal = new MultipleOccursSequenceInSequence();
@@ -1286,6 +1373,9 @@
     }
     @Test
     public void testStructWithBinary() throws Exception {
+        if (!shouldRunTest("StructWithBinary")) {
+            return;
+        }
         StructWithBinary x = new StructWithBinary();
         x.setBase64("base64Binary_x".getBytes());
         x.setHex("hexBinary_x".getBytes());
@@ -1328,6 +1418,9 @@
 
     @Test
     public void testChoiceWithBinary() throws Exception {
+        if (!shouldRunTest("ChoiceWithBinary")) {
+            return;
+        }
         ChoiceWithBinary x = new ChoiceWithBinary();
         x.setBase64("base64Binary_x".getBytes());
 
@@ -1382,6 +1475,9 @@
     // XXX - Generated code flattens nested choice
     @Test
     public void testChoiceWithGroupChoice() throws Exception {
+        if (!shouldRunTest("ChoiceWithGroupChoice")) {
+            return;
+        }
         ChoiceWithGroupChoice x = new ChoiceWithGroupChoice();
         x.setVarFloat(1.1f);
         ChoiceWithGroupChoice yOrig = new ChoiceWithGroupChoice();
@@ -1437,6 +1533,9 @@
     // XXX - Generated code flattens nested structs
     @Test
     public void testChoiceWithGroupSeq() throws Exception {
+        if (!shouldRunTest("ChoiceWithGroupSeq")) {
+            return;
+        }
         ChoiceWithGroupSeq x = new ChoiceWithGroupSeq();
         x.setVarInt(100);
         x.setVarString("hello");
@@ -1495,6 +1594,9 @@
     // XXX - Generated code flattens nested structs
     @Test
     public void testChoiceWithGroups() throws Exception {
+        if (!shouldRunTest("ChoiceWithGroups")) {
+            return;
+        }
         ChoiceWithGroups x = new ChoiceWithGroups();
         x.setVarInt(100);
         x.setVarString("hello");
@@ -1531,6 +1633,9 @@
 
     @Test
     public void testExtBase64Binary() throws Exception {
+        if (!shouldRunTest("ExtBase64Binary")) {
+            return;
+        }
         ExtBase64Binary x1 = new ExtBase64Binary();
         x1.setValue("base64a".getBytes());
         x1.setId(1);
@@ -1602,6 +1707,9 @@
 
     @Test
     public void testStructWithAnyAttribute() throws Exception {
+        if (!shouldRunTest("StructWithAnyAttribute")) {
+            return;
+        }
         QName xAt1Name = new QName("http://schemas.iona.com/type_test", "at_one");
         QName xAt2Name = new QName("http://schemas.iona.com/type_test", "at_two");
         QName yAt3Name = new QName("http://apache.org/type_test", "at_thr");
@@ -1681,6 +1789,9 @@
 
     @Test
     public void testChoiceWithAnyAttribute() throws Exception {
+        if (!shouldRunTest("ChoiceWithAnyAttribute")) {
+            return;
+        }
         QName xAt1Name = new QName("http://schemas.iona.com/type_test", "at_one");
         QName xAt2Name = new QName("http://schemas.iona.com/type_test", "at_two");
         QName yAt3Name = new QName("http://apache.org/type_test", "at_thr");
@@ -1769,6 +1880,9 @@
     }
     @Test
     public void testOccuringStruct() throws Exception {
+        if (!shouldRunTest("OccuringStruct")) {
+            return;
+        }
         OccuringStruct x = new OccuringStruct();
         List<Serializable> theList = x.getVarFloatAndVarIntAndVarString(); 
         theList.add(1.14f);
@@ -1815,6 +1929,9 @@
     }
     @Test
     public void testOccuringStruct1() throws Exception {
+        if (!shouldRunTest("OccuringStruct1")) {
+            return;
+        }
         OccuringStruct1 x = new OccuringStruct1();
         List<Serializable> theList = x.getVarFloatAndVarIntAndVarString(); 
         theList.add(1.1f);
@@ -1882,6 +1999,9 @@
 
     @Test
     public void testOccuringStruct2() throws Exception {
+        if (!shouldRunTest("OccuringStruct2")) {
+            return;
+        }
         OccuringStruct2 x = new OccuringStruct2();
         x.setVarFloat(1.14f);
         List<Serializable> theList = x.getVarIntAndVarString();
@@ -1932,6 +2052,9 @@
     }
     @Test
     public void testOccuringChoice() throws Exception {
+        if (!shouldRunTest("OccuringChoice")) {
+            return;
+        }
         OccuringChoice x = new OccuringChoice();
         List<Serializable> theList = x.getVarFloatOrVarIntOrVarString();
         theList.add(0);
@@ -2020,6 +2143,9 @@
     }
     @Test
     public void testOccuringChoice1() throws Exception {
+        if (!shouldRunTest("OccuringChoice1")) {
+            return;
+        }
         OccuringChoice1 x = new OccuringChoice1();
         List<Comparable> theList = x.getVarFloatOrVarInt();
         theList.add(0);
@@ -2064,6 +2190,9 @@
 
     @Test
     public void testOccuringChoice2() throws Exception {
+        if (!shouldRunTest("OccuringChoice2")) {
+            return;
+        }
         OccuringChoice2 x = new OccuringChoice2();
         x.setVarString("x1");
         OccuringChoice2 yOriginal = new OccuringChoice2();
@@ -2110,4 +2239,71 @@
                        equals(x, ret));
         }
     }
+    @Test
+    public void testAnonEnumList() throws Exception {
+        if (!shouldRunTest("AnonEnumList")) {
+            return;
+        }
+        if (testDocLiteral || testXMLBinding) {
+            List<Short> x = Arrays.asList((short)10, (short)100);
+            List<Short> yOrig = Arrays.asList((short)1000, (short)10);
+
+            Holder<List<Short>> y = new Holder<List<Short>>(yOrig);
+            Holder<List<Short>> z = new Holder<List<Short>>();
+
+            List<Short> ret = testDocLiteral ? docClient.testAnonEnumList(x, y, z) : xmlClient
+                .testAnonEnumList(x, y, z);
+            if (!perfTestOnly) {
+                assertTrue("testAnonEnumList(): Incorrect value for inout param", x.equals(y.value));
+                assertTrue("testAnonEnumList(): Incorrect value for out param", yOrig.equals(z.value));
+                assertTrue("testAnonEnumList(): Incorrect return value", x.equals(ret));
+            }
+        } else {
+            Short[] x = {(short)10, (short)100};
+            Short[] yOrig = {(short)1000, (short)10};
+
+            Holder<Short[]> y = new Holder<Short[]>(yOrig);
+            Holder<Short[]> z = new Holder<Short[]>();
+
+            Short[] ret = rpcClient.testAnonEnumList(x, y, z);
+
+            assertTrue(y.value.length == 2);
+            assertTrue(z.value.length == 2);
+            assertTrue(ret.length == 2);
+            if (!perfTestOnly) {
+                for (int i = 0; i < 2; i++) {
+                    assertEquals("testAnonEnumList(): Incorrect value for inout param", x[i].shortValue(),
+                                 y.value[i].shortValue());
+                    assertEquals("testAnonEnumList(): Incorrect value for out param", yOrig[i].shortValue(),
+                                 z.value[i].shortValue());
+                    assertEquals("testAnonEnumList(): Incorrect return value", x[i].shortValue(), ret[i]
+                        .shortValue());
+                }
+            }
+        }
+    }
+
+    @Test
+    public void testUnionWithAnonEnum() throws Exception {
+        if (!shouldRunTest("UnionWithAnonEnum")) {
+            return;
+        }
+        String x = "5";
+        String yOrig = "n/a";
+
+        Holder<String> y = new Holder<String>(yOrig);
+        Holder<String> z = new Holder<String>();
+        String ret;
+        if (testDocLiteral) {
+            ret = docClient.testUnionWithAnonEnum(x, y, z);
+        } else if (testXMLBinding) {
+            ret = xmlClient.testUnionWithAnonEnum(x, y, z);
+        } else {
+            ret = rpcClient.testUnionWithAnonEnum(x, y, z);
+        }
+        assertEquals("testUnionWithAnonEnum(): Incorrect value for inout param", x, y.value);
+        assertEquals("testUnionWithAnonEnum(): Incorrect value for out param", yOrig, z.value);
+        assertEquals("testUnionWithAnonEnum(): Incorrect return value", x, ret);
+    }
+    
 }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java Thu Mar 20 19:28:42 2008
@@ -84,6 +84,9 @@
 
     @Test
     public void testSimpleContentExtWithAnyAttribute() throws Exception {
+        if (!shouldRunTest("SimpleContentExtWithAnyAttribute")) {
+            return;
+        }
         QName xAt1Name = new QName("http://apache.org/type_test", "at_one");
         QName xAt2Name = new QName("http://apache.org/type_test", "at_two");
         QName yAt3Name = new QName("http://apache.org/type_test", "at_thr");
@@ -139,6 +142,9 @@
 
     @Test
     public void testOccuringAll() throws Exception {
+        if (!shouldRunTest("OccuringAll")) {
+            return;
+        }
         OccuringAll x = new OccuringAll();
         x.setVarInt(new Integer(42));
         x.setVarAttrString("x_attr");
@@ -201,6 +207,9 @@
 
     @Test
     public void testOccuringStructWithAnyAttribute() throws Exception {
+        if (!shouldRunTest("OccuringStructWithAnyAttribute")) {
+            return;
+        }
         QName xAt1Name = new QName("http://apache.org/type_test", "at_one");
         QName xAt2Name = new QName("http://apache.org/type_test", "at_two");
         QName yAt3Name = new QName("http://apache.org/type_test", "at_thr");
@@ -269,6 +278,9 @@
 
     @Test
     public void testOccuringChoiceWithAnyAttribute() throws Exception {
+        if (!shouldRunTest("OccuringChoiceWithAnyAttribute")) {
+            return;
+        }
         QName xAt1Name = new QName("http://schemas.iona.com/type_test", "at_one");
         QName xAt2Name = new QName("http://schemas.iona.com/type_test", "at_two");
         QName yAt3Name = new QName("http://apache.org/type_test", "at_thr");
@@ -341,6 +353,9 @@
 
     @Test
     public void testMRecSeqA() throws Exception {
+        if (!shouldRunTest("MRecSeqA")) {
+            return;
+        }
         MRecSeqA xA = new MRecSeqA();
         MRecSeqA yA = new MRecSeqA();
         MRecSeqA zA = new MRecSeqA();
@@ -404,6 +419,9 @@
 
     @Test
     public void testMRecSeqC() throws Exception {
+        if (!shouldRunTest("MRecSeqC")) {
+            return;
+        }
         MRecSeqC xC = new MRecSeqC();
         MRecSeqC yC = new MRecSeqC();
         MRecSeqC zC = new MRecSeqC();
@@ -465,6 +483,9 @@
 
     @Test
     public void testStructWithNillableChoice() throws Exception {
+        if (!shouldRunTest("StructWithNillableChoice")) {
+            return;
+        }
         // Test 1
         //
         // x: non-nil choice
@@ -571,6 +592,9 @@
 
     @Test
     public void testStructWithOccuringChoice() throws Exception {
+        if (!shouldRunTest("StructWithOccuringChoice")) {
+            return;
+        }
         // Test 1
         //
         // x: choice occurs twice
@@ -717,6 +741,9 @@
 
     @Test
     public void testStructWithNillableStruct() throws Exception {
+        if (!shouldRunTest("StructWithNillableStruct")) {
+            return;
+        }
         // Test 1
         //
         // x: non-nil sequence
@@ -849,6 +876,9 @@
     
     @Test
     public void testStructWithOccuringStruct() throws Exception {
+        if (!shouldRunTest("StructWithOccuringStruct")) {
+            return;
+        }
         // Test 1
         //
         // x: sequence occurs twice
@@ -916,6 +946,9 @@
 
     @Test
     public void testStructWithOccuringStruct2() throws Exception {
+        if (!shouldRunTest("StructWithOccuringStruct2")) {
+            return;
+        }
         StructWithOccuringStruct x = new StructWithOccuringStruct();
         x.setVarInteger(100);
         x.getVarIntAndVarFloat().add(101);
@@ -996,6 +1029,9 @@
 
     @Test
     public void testAnonymousType() throws Exception {
+        if (!shouldRunTest("AnonymousType")) {
+            return;
+        }
         AnonymousType x = new AnonymousType();
         AnonymousType.Foo fx = new AnonymousType.Foo();
         fx.setFoo("hello");
@@ -1061,6 +1097,9 @@
 
     @Test
     public void testRecSeqB6918() throws Exception {
+        if (!shouldRunTest("RecSeqB6918")) {
+            return;
+        }
         RecSeqB6918 x = new RecSeqB6918();
         List<Object> theList = x.getNextSeqAndVarInt();
         theList.add(new Integer(6));
@@ -1116,6 +1155,9 @@
     @Test
     @Ignore
     public void testComplexArray() throws Exception {
+        if (!shouldRunTest("ComplexArray")) {
+            return;
+        }
         DerivedChoiceBaseStruct xx = new DerivedChoiceBaseStruct();
         //Base
         xx.setVarFloat(3.14f);
@@ -1174,6 +1216,9 @@
     }
 
     public void testComplexChoice() throws Exception {
+        if (!shouldRunTest("ComplexChoice")) {
+            return;
+        }
         DerivedChoiceBaseComplex xx = new DerivedChoiceBaseComplex();
         //Base (Sequence)
         xx.setVarFloat(3.14f);
@@ -1220,6 +1265,9 @@
     }
 
     public void testComplexStruct() throws Exception {
+        if (!shouldRunTest("ComplexStruct")) {
+            return;
+        }
         DerivedChoiceBaseComplex xx = new DerivedChoiceBaseComplex();
         //Base (Sequence)
         xx.setVarFloat(3.14f);
@@ -1285,6 +1333,9 @@
     }
 
     public void testDerivedChoiceBaseComplex() throws Exception {
+        if (!shouldRunTest("DerivedChoiceBaseComplex")) {
+            return;
+        }
         DerivedChoiceBaseComplex x = new DerivedChoiceBaseComplex();
         //Base (Sequence)
         x.setVarFloat(3.14f);
@@ -1341,6 +1392,9 @@
     }
 
     public void testDerivedAllBaseAll() throws Exception {
+        if (!shouldRunTest("DerivedAllBaseAll")) {
+            return;
+        }
         DerivedAllBaseAll x = new DerivedAllBaseAll();
         //Base
         x.setVarFloat(3.14f);
@@ -1391,6 +1445,9 @@
     }
 
     public void testDerivedAllBaseChoice() throws Exception {
+        if (!shouldRunTest("DerivedAllBaseChoice")) {
+            return;
+        }
         DerivedAllBaseChoice x = new DerivedAllBaseChoice();
         //Base
         x.setVarString("BaseChoice-x");
@@ -1435,6 +1492,9 @@
     }
 
     public void testDerivedAllBaseStruct() throws Exception {
+        if (!shouldRunTest("DerivedAllBaseStruct")) {
+            return;
+        }
         DerivedAllBaseStruct x = new DerivedAllBaseStruct();
         //Base
         x.setVarFloat(3.14f);
@@ -1491,6 +1551,9 @@
     }
 
     public void testDerivedChoiceBaseAll() throws Exception {
+        if (!shouldRunTest("DerivedChoiceBaseAll")) {
+            return;
+        }
         DerivedChoiceBaseAll x = new DerivedChoiceBaseAll();
         //Base
         x.setVarFloat(3.14f);
@@ -1539,6 +1602,9 @@
     }
 
     public void testDerivedStructBaseAll() throws Exception {
+        if (!shouldRunTest("DerivedStructBaseAll")) {
+            return;
+        }
         DerivedStructBaseAll x = new DerivedStructBaseAll();
         //Base
         x.setVarFloat(3.14f);
@@ -1593,6 +1659,9 @@
     }
 
     public void testDerivedChoiceBaseSimpleContent() throws Exception {
+        if (!shouldRunTest("DerivedChoiceBaseSimpleContent")) {
+            return;
+        }
         DerivedChoiceBaseSimpleContent x = new DerivedChoiceBaseSimpleContent();
         //Base
         x.setID("Base-x");
@@ -1636,6 +1705,9 @@
 
     @Test
     public void testRestrictedStructBaseStruct() throws Exception {
+        if (!shouldRunTest("RestrictedStructBaseStruct")) {
+            return;
+        }
         RestrictedStructBaseStruct x = new RestrictedStructBaseStruct();
         x.setVarFloat(3.14f);
         x.setVarInt(new BigInteger("42"));
@@ -1675,6 +1747,9 @@
 
     @Test
     public void testRestrictedAllBaseAll() throws Exception {
+        if (!shouldRunTest("RestrictedAllBaseAll")) {
+            return;
+        }
         RestrictedAllBaseAll x = new RestrictedAllBaseAll();
         x.setVarFloat(3.14f);
         x.setVarInt(42);
@@ -1708,6 +1783,9 @@
 
     @Test
     public void testUnionWithStringList() throws Exception {
+        if (!shouldRunTest("UnionWithStringList")) {
+            return;
+        }
         if (testDocLiteral || testXMLBinding) {
             List<String> x = Arrays.asList("5");
             List<String> yOrig = Arrays.asList("I", "am", "SimpleList");
@@ -1747,6 +1825,9 @@
 
     @Test
     public void testUnionWithStringListRestriction() throws Exception {
+        if (!shouldRunTest("UnionWithStringListRestriction")) {
+            return;
+        }
         if (testDocLiteral || testXMLBinding) {
             List<String> x = Arrays.asList("5");
             List<String> yOrig = Arrays.asList("I", "am", "SimpleList");
@@ -1786,6 +1867,9 @@
 
     @Test
     public void testUnionWithAnonList() throws Exception {
+        if (!shouldRunTest("UnionWithAnonList")) {
+            return;
+        }
         if (testDocLiteral || testXMLBinding) {
             List<String> x = Arrays.asList("5");
             // Need to specify valid floats according to schema lexical
@@ -1828,6 +1912,9 @@
 
     @Test
     public void testAnyURIRestriction() throws Exception {
+        if (!shouldRunTest("AnyURIRestriction")) {
+            return;
+        }
         // normal case, maxLength = 50 for anyURI
         String x = new String("http://cxf.apache.org/");
         String yOrig = new String("http://www.iona.com/info/services/oss/");
@@ -1868,6 +1955,9 @@
     // test internal inheritance
     @Test
     public void testInheritanceNestedStruct() throws Exception {
+        if (!shouldRunTest("InheritanceNestedStruct")) {
+            return;
+        }
         DerivedStructBaseStruct xs = new DerivedStructBaseStruct();
         //Base
         xs.setVarFloat(3.14f);
@@ -1928,6 +2018,9 @@
     // test first level inheritance (parameters)
     @Test
     public void testInheritanceSimpleStructDerivedStruct() throws Exception {
+        if (!shouldRunTest("InheritanceSimpleStructDerivedStruct")) {
+            return;
+        }
         DerivedStructBaseStruct x = new DerivedStructBaseStruct();
         //Base
         x.setVarFloat(3.14f);
@@ -1975,6 +2068,9 @@
 
     @Test
     public void testInheritanceSimpleChoiceDerivedStruct() throws Exception {
+        if (!shouldRunTest("InheritanceSimpleChoiceDerivedStruct")) {
+            return;
+        }
         DerivedStructBaseChoice x = new DerivedStructBaseChoice();
         //Base
         x.setVarString("BaseChoice-x");
@@ -2014,6 +2110,9 @@
 
     @Test
     public void testInheritanceUnboundedArrayDerivedChoice() throws Exception {
+        if (!shouldRunTest("InheritanceUnboundedArrayDerivedChoice")) {
+            return;
+        }
         DerivedChoiceBaseArray x = new DerivedChoiceBaseArray();
         //Base
         x.getItem().addAll(Arrays.asList("AAA", "BBB", "CCC"));
@@ -2050,6 +2149,9 @@
 
     @Test
     public void testInheritanceEmptyAllDerivedEmpty() throws Exception {
+        if (!shouldRunTest("InheritanceEmptyAllDerivedEmpty")) {
+            return;
+        }
         DerivedEmptyBaseEmptyAll x = new DerivedEmptyBaseEmptyAll();
         DerivedEmptyBaseEmptyAll yOrig = new DerivedEmptyBaseEmptyAll();
         Holder<EmptyAll> y = new Holder<EmptyAll>(yOrig);

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient5.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient5.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient5.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient5.java Thu Mar 20 19:28:42 2008
@@ -33,6 +33,9 @@
 
     @Test
     public void testComplexRestriction() throws Exception {
+        if (!shouldRunTest("ComplexRestriction")) {
+            return;
+        }
         // normal case, maxLength=10
         ComplexRestriction x = new ComplexRestriction();
         x.setValue("str_x");
@@ -81,6 +84,9 @@
 
     @Test
     public void testComplexRestriction2() throws Exception {
+        if (!shouldRunTest("ComplexRestriction2")) {
+            return;
+        }
         // normal case, length=10
         ComplexRestriction2 x = new ComplexRestriction2();
         x.setValue("string_xxx");
@@ -129,6 +135,9 @@
 
     @Test
     public void testComplexRestriction3() throws Exception {
+        if (!shouldRunTest("ComplexRestriction3")) {
+            return;
+        }
         // normal case, maxLength=10 for ComplexRestriction
         // && minLength=5 for ComplexRestriction3
         ComplexRestriction3 x = new ComplexRestriction3();
@@ -188,6 +197,9 @@
 
     @Test
     public void testComplexRestriction4() throws Exception {
+        if (!shouldRunTest("ComplexRestriction4")) {
+            return;
+        }
         // normal case, maxLength=10 for ComplexRestriction
         // && maxLength=5 for ComplexRestriction4
         ComplexRestriction4 x = new ComplexRestriction4();
@@ -233,6 +245,9 @@
     //org.apache.type_test.types1.ComplexRestriction5
     @Test
     public void testComplexRestriction5() throws Exception {
+        if (!shouldRunTest("ComplexRestriction5")) {
+            return;
+        }
         // normal case, maxLength=50 && minLength=5 for ComplexRestriction5
         ComplexRestriction5 x = new ComplexRestriction5();
         x.setValue("http://www.iona.com");

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java?rev=639519&view=auto
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java Thu Mar 20 19:28:42 2008
@@ -0,0 +1,105 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.type_test.corba;
+
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.systest.type_test.AbstractTypeTestClient5;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class CORBADocLitClientTypeTest extends AbstractTypeTestClient5 {
+    protected static final String WSDL_PATH 
+        = "/wsdl/type_test_corba/type_test_corba-corba.wsdl";
+    
+    
+    protected static final QName SERVICE_NAME = new QName("http://apache.org/type_test/doc",
+                                                          "TypeTestCORBAService");
+    protected static final QName PORT_NAME = new QName("http://apache.org/type_test/doc",
+                                                       "TypeTestCORBAPort");
+
+    private static final Set<String> WORKING_TESTS = new HashSet<String>();
+    private static final Set<String> NOT_RUN_TESTS = new HashSet<String>();
+    static {
+        String working[] = new String[] {
+            "InheritanceEmptyAllDerivedEmpty",
+            "DerivedEmptyBaseEmptyAll",
+            "DerivedEmptyBaseEmptyChoice",
+            "MultipleOccursSequenceInSequence",
+            "StructWithBinary",
+            "ChoiceWithBinary",
+            "SimpleChoice",
+            "UnboundedArray",
+            "EmptyAll",
+            "StructWithNillables",
+            "AnonymousStruct",
+            "FixedArray",
+            "BoundedArray",
+            "CompoundArray",
+            "NestedArray",
+            "EmptyChoice",
+            "Void",
+            "Oneway",
+            "Decimal",
+            "HexBinary",
+            "ColourEnum",
+            "NumberEnum",
+            "StringEnum",
+            "NMTokenEnum",
+            "AnyURIEnum",
+        };
+        WORKING_TESTS.addAll(Arrays.asList(working));
+    }
+    
+
+    @BeforeClass
+    public static void startServers() throws Exception {
+        boolean ok = launchServer(CORBADocLitServerImpl.class);
+        assertTrue("failed to launch server", ok);
+        initClient(AbstractTypeTestClient5.class, SERVICE_NAME, PORT_NAME, WSDL_PATH);
+    }
+    @AfterClass
+    public static void printNotRun() throws Exception {
+        File file = new File("./TypeTest.ref");
+        file.delete();
+        //for (String s : NOT_RUN_TESTS) {
+            //System.out.println(s);
+        //}
+    }
+
+    public boolean shouldRunTest(String name) {
+        if (!WORKING_TESTS.contains(name)) {
+            NOT_RUN_TESTS.add(name);
+            return false;
+        }
+        return true;
+    }
+    
+    
+    @Test
+    public void testA() throws Exception {
+    }    
+}

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

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

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitServerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitServerImpl.java?rev=639519&view=auto
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitServerImpl.java (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitServerImpl.java Thu Mar 20 19:28:42 2008
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.type_test.corba;
+
+
+import javax.jws.WebService;
+import javax.xml.ws.Endpoint;
+
+
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.type_test.TypeTestImpl;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.type_test.doc.TypeTestPortType;
+
+public class CORBADocLitServerImpl extends AbstractBusTestServerBase {
+
+    public void run()  {
+        SpringBusFactory sf = new SpringBusFactory();
+        BusFactory.setDefaultBus(null);
+        BusFactory.setDefaultBus(
+            sf.createBus("org/apache/cxf/systest/type_test/databinding-schema-validation.xml"));
+        Object implementor = new CORBATypeTestImpl();
+        String address = "file:./TypeTest.ref";
+        Endpoint.publish(address, implementor);              
+    }
+    
+    public static void main(String args[]) {
+        try {
+            CORBADocLitServerImpl s = new CORBADocLitServerImpl();
+            s.start();
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            System.exit(-1);
+        } finally { 
+            System.out.println("done!");
+        }
+    }    
+
+    @WebService(serviceName = "TypeTestCORBAService", portName = "TypeTestCORBAPort",
+                endpointInterface = "org.apache.type_test.doc.TypeTestPortType",
+                targetNamespace = "http://apache.org/type_test/doc",
+                wsdlLocation = "classpath:/wsdl/type_test_corba/type_test_corba-corba.wsdl")
+    class CORBATypeTestImpl extends TypeTestImpl implements TypeTestPortType {
+    }
+}

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

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

Added: incubator/cxf/trunk/systests/src/test/resources/wsdl/type_test_corba/type_test_corba.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/resources/wsdl/type_test_corba/type_test_corba.wsdl?rev=639519&view=auto
==============================================================================
--- incubator/cxf/trunk/systests/src/test/resources/wsdl/type_test_corba/type_test_corba.wsdl (added)
+++ incubator/cxf/trunk/systests/src/test/resources/wsdl/type_test_corba/type_test_corba.wsdl Thu Mar 20 19:28:42 2008
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:x3="http://apache.org/type_test/types3" xmlns:x2="http://apache.org/type_test/types2" xmlns:x1="http://apache.org/type_test/types1" xmlns:xalan="http://xml.apache.org/xslt" xmlns:http-conf="http://cxf.apache.org/transports/http/configuration" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:itst="http://tests.iona.com/ittests" xmlns:tns="http://apache.org/type_test/doc" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://apache.org/type_test/doc" name="type_test_soap">
+    <wsdl:import namespace="http://apache.org/type_test/doc" location="testutils/type_test/type_test_doclit.wsdl"/>
+</wsdl:definitions>

Propchange: incubator/cxf/trunk/systests/src/test/resources/wsdl/type_test_corba/type_test_corba.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/resources/wsdl/type_test_corba/type_test_corba.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/systests/src/test/resources/wsdl/type_test_corba/type_test_corba.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/WSDLUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/WSDLUtils.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/WSDLUtils.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/WSDLUtils.java Thu Mar 20 19:28:42 2008
@@ -23,7 +23,6 @@
 import java.io.Writer;
 
 import java.util.Iterator;
-import java.util.List;
 
 import javax.wsdl.Definition;
 import javax.wsdl.WSDLException;
@@ -31,6 +30,7 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.cxf.common.xmlschema.SchemaCollection;
 import org.apache.cxf.tools.util.FileWriterUtil;
 
 import org.apache.ws.commons.schema.XmlSchema;
@@ -43,13 +43,11 @@
         //complete
     }
 
-    public static boolean isElementFormQualified(List<XmlSchema> schemas, QName type) {
-        if (type != null) {     
-            for (int i = 0; i < schemas.size(); i++) {
-                XmlSchema schema = schemas.get(i);
-                if (isElementFormQualified(schema, type)) {
-                    return true;
-                }
+    public static boolean isElementFormQualified(SchemaCollection schemas, QName type) {
+        if (type != null) {   
+            XmlSchema sch = schemas.getSchemaByTargetNamespace(type.getNamespaceURI());
+            if (sch != null) {
+                return sch.getElementFormDefault().getValue().equals(XmlSchemaForm.QUALIFIED);
             }
         }
         return false;

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/toolspec/toolspecs/wsdl2idl.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/toolspec/toolspecs/wsdl2idl.xml?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/toolspec/toolspecs/wsdl2idl.xml (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/toolspec/toolspecs/wsdl2idl.xml Thu Mar 20 19:28:42 2008
@@ -116,14 +116,6 @@
          </associatedArgument>
     </option>
 
-    <option id="license" maxOccurs="1">
-        <annotation>Specify the license file</annotation>
-        <switch>L</switch>
-        <associatedArgument placement="afterSpace">
-          <annotation>license-file</annotation>
-        </associatedArgument>
-    </option>
-
     </optionGroup>
     <optionGroup id="common_options">
 		

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLParameter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLParameter.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLParameter.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLParameter.java Thu Mar 20 19:28:42 2008
@@ -36,6 +36,7 @@
 import org.apache.cxf.binding.corba.wsdl.CorbaTypeImpl;
 import org.apache.cxf.binding.corba.wsdl.ModeType;
 import org.apache.cxf.binding.corba.wsdl.ParamType;
+import org.apache.cxf.common.xmlschema.SchemaCollection;
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaAnnotation;
 import org.apache.ws.commons.schema.XmlSchemaAppInfo;
@@ -54,7 +55,7 @@
     static Definition definition;
 
     public void processParameters(WSDLToCorbaBinding wsdlToCorbaBinding,
-            Operation operation, Definition def, List<XmlSchema> xmlSchemaList,
+            Operation operation, Definition def, SchemaCollection xmlSchemaList,
             List<ParamType> params, List<ArgType> returns,
             boolean simpleOrdering) throws Exception {
 
@@ -87,7 +88,7 @@
 
     private void processWrappedInputParams(WSDLToCorbaBinding wsdlToCorbaBinding,
                                            Operation operation,
-                                           List<XmlSchema> xmlSchemaList,
+                                           SchemaCollection xmlSchemaList,
                                            List<ParamType> inputs)
         throws Exception {
         Input input = operation.getInput();
@@ -131,7 +132,7 @@
 
     private void processInputParams(WSDLToCorbaBinding wsdlToCorbaBinding,
                                     Operation operation,
-                                    List<XmlSchema> xmlSchemaList,
+                                    SchemaCollection xmlSchemaList,
                                     List<ParamType> inputs)
         throws Exception {
 
@@ -188,7 +189,7 @@
 
     private void processWrappedOutputParams(
             WSDLToCorbaBinding wsdlToCorbaBinding, Operation operation,
-            List<XmlSchema> xmlSchemaList, List<ParamType> inputs,
+            SchemaCollection xmlSchemaList, List<ParamType> inputs,
             List<ParamType> outputs) throws Exception {
 
         Output output = operation.getOutput();
@@ -259,7 +260,7 @@
     }
 
     private void processOutputParams(WSDLToCorbaBinding wsdlToCorbaBinding,
-            Operation operation, List<XmlSchema> xmlSchemaList,
+            Operation operation, SchemaCollection xmlSchemaList,
             List<ParamType> inputs, List<ParamType> outputs) throws Exception {
 
         Output output = operation.getOutput();
@@ -407,13 +408,11 @@
     }
 
     private static XmlSchemaType getType(Part part,
-                                         List<XmlSchema> xmlSchemaList)
+                                         SchemaCollection xmlSchemaList)
         throws Exception {
         XmlSchemaType schemaType = null;
 
-        Iterator i = xmlSchemaList.iterator();
-        while (i.hasNext()) {
-            XmlSchema xmlSchema = (XmlSchema) i.next();
+        for (XmlSchema xmlSchema : xmlSchemaList.getXmlSchemas()) {
             if (part.getTypeName() != null) {
                 schemaType = findSchemaType(xmlSchema, part.getTypeName());                
                 if (schemaType != null) {
@@ -467,13 +466,11 @@
     }
 
     private static XmlSchemaElement getElement(Part part,
-                                               List<XmlSchema> xmlSchemaList)
+                                               SchemaCollection xmlSchemaList)
         throws Exception {
         XmlSchemaElement schemaElement = null;
 
-        Iterator i = xmlSchemaList.iterator();        
-        while (i.hasNext()) {
-            XmlSchema xmlSchema = (XmlSchema) i.next();
+        for (XmlSchema xmlSchema : xmlSchemaList.getXmlSchemas()) {
             if (part.getElementName() != null) {
                 schemaElement = findElement(xmlSchema, part.getElementName()); 
                 if (schemaElement !=  null) {
@@ -564,11 +561,9 @@
     private static XmlSchemaObject getSchemaObject(
         WSDLToCorbaBinding wsdlToCorbaBinding, QName typeName) {
 
-        List<XmlSchema> schemaList = wsdlToCorbaBinding.getHelper().getXMLSchemaList();
-        Iterator<XmlSchema> schemaIterator = schemaList.iterator();
+        SchemaCollection schemaList = wsdlToCorbaBinding.getHelper().getXMLSchemaList();
         XmlSchemaObject schemaObj = null;
-        while (schemaIterator.hasNext()) {
-            XmlSchema s = schemaIterator.next();
+        for (XmlSchema s : schemaList.getXmlSchemas()) {
             XmlSchemaObjectTable schemaTable = s.getElements();
             schemaObj = schemaTable.getItem(typeName);
             if (schemaObj != null) {
@@ -614,7 +609,7 @@
         return paramtype;
     }
 
-    private boolean isWrappedOperation(Operation op, List<XmlSchema> xmlSchemaList)
+    private boolean isWrappedOperation(Operation op, SchemaCollection xmlSchemaList)
         throws Exception {
         Message inputMessage = op.getInput().getMessage();
         Message outputMessage = null;
@@ -742,11 +737,8 @@
         return false;
     }
 
-    private boolean isObjectReference(List<XmlSchema> schemaList, QName name) {
-        int length = schemaList.size();
-
-        for (int i = 0; i < length; ++i) {
-            XmlSchema schema = schemaList.get(i);
+    private boolean isObjectReference(SchemaCollection schemaList, QName name) {
+        for (XmlSchema schema : schemaList.getXmlSchemas()) {
             XmlSchemaElement element = schema.getElementByName(name);
             if (element != null) {
                 XmlSchemaAnnotation annotation = element.getAnnotation();

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaBinding.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaBinding.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaBinding.java Thu Mar 20 19:28:42 2008
@@ -23,7 +23,6 @@
 import java.io.File;
 import java.io.FileReader;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -62,7 +61,9 @@
 import org.apache.cxf.binding.corba.wsdl.ParamType;
 import org.apache.cxf.binding.corba.wsdl.RaisesType;
 import org.apache.cxf.binding.corba.wsdl.TypeMappingType;
+import org.apache.cxf.binding.corba.wsdl.W3CConstants;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.xmlschema.SchemaCollection;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.tools.common.ToolException;
 import org.apache.cxf.wsdl.JAXBExtensionHelper;
@@ -91,61 +92,28 @@
     TypeMappingType typeMappingType;
     ExtensionRegistry extReg;
 
-    List<Object> interfaceNames = new ArrayList<Object>();
+    List<String> interfaceNames = new ArrayList<String>();
     Map<Object, Object> bindingNameMap = new HashMap<Object, Object>();
     String bindingName;
     String address;
     String addressFile;
     WSDLParameter wsdlParameter;
     List<String> bindingNames;
-    List<XmlSchema> xmlSchemaList;
+    SchemaCollection xmlSchemaList;
     WSDLToTypeProcessor typeProcessor = new WSDLToTypeProcessor();
     private boolean allbindings;
         
     public WSDLToCorbaBinding() {            
     }
 
-    public void setXMLSchemaList(List<XmlSchema> list) {
-        xmlSchemaList = list;
-        helper.setXMLSchemaList(list);
-    }
-
-    public void setXMLSchema(XmlSchema schema) {
-        xmlSchemaType = schema;
-        helper.setXMLSchema(schema);
-    }
 
     public WSDLToCorbaHelper getHelper() {
         return helper;
     }
     
-    private void createXmlSchemaList(Collection<XmlSchema> list) {                
-        List<XmlSchema> schemaList = new ArrayList<XmlSchema>();        
-        Iterator s = list.iterator();
-            
-        while (s.hasNext()) {
-            XmlSchema xmlSchemaTypes = (XmlSchema)s.next();
-            schemaList.add(xmlSchemaTypes);
-                
-            Iterator schemas = xmlSchemaTypes.getIncludes().getIterator();
-            while (schemas.hasNext()) {
-                Object obj = schemas.next();                               
-                if (obj instanceof XmlSchemaExternal) {
-                    XmlSchemaExternal extSchema = (XmlSchemaExternal) obj;                    
-                    schemaList.add(extSchema.getSchema());
-                }
-            }
-        }
-        
-        setXMLSchemaList(schemaList);
-        
-    }
 
     public Definition generateCORBABinding() throws Exception {
         try {
-            extReg = new ExtensionRegistry(); 
-            addExtensions(extReg);
-            typeProcessor.setExtensionRegistry(extReg);            
             typeProcessor.parseWSDL(getWsdlFileName());           
             def = typeProcessor.getWSDLDefinition();
             generateCORBABinding(def);            
@@ -158,11 +126,6 @@
     public Binding[] generateCORBABinding(Definition definition) throws Exception {    
         def = definition;
         helper.setWsdlDefinition(def);
-        if (extReg == null) {
-            extReg = def.getExtensionRegistry();
-            addExtensions(extReg);
-            typeProcessor.setExtensionRegistry(extReg);
-        }
         typeProcessor.setWSDLDefinition(def);
         wsdlParameter = new WSDLParameter();
         if (idlNamespace == null) {
@@ -171,19 +134,17 @@
         generateNSPrefix(def, getIdlNamespace(), "ns");
 
         typeProcessor.process();
+        xmlSchemaList = typeProcessor.getXmlSchemaTypes();
+        helper.setXMLSchemaList(xmlSchemaList);
         
-        setXMLSchema(typeProcessor.getXmlSchemaType());
-        createXmlSchemaList(typeProcessor.getXmlSchemaTypes());
         List<PortType> intfs = null;
-
         if (interfaceNames.size() > 0) {
             intfs = new ArrayList<PortType>(interfaceNames.size());
 
-            for (int i = 0; i < interfaceNames.size(); i++) {
+            for (String interfaceName : interfaceNames) {
                 PortType portType = null;
-                String interfaceName = (String)interfaceNames.get(i);
 
-                Map portTypes = def.getPortTypes();
+                Map portTypes = def.getAllPortTypes();
                 if (portTypes != null) {
                     Iterator it2 = portTypes.keySet().iterator();
                     while (it2.hasNext()) {
@@ -218,7 +179,7 @@
     }
 
     private List<PortType> getPortTypeList() throws Exception {
-        Map portTypes = def .getPortTypes();
+        Map portTypes = def.getAllPortTypes();
         List<PortType> intfs = null;
 
         if (portTypes == null) {
@@ -336,7 +297,7 @@
             binding.setUndefined(false);
             definition.addBinding(binding);            
         } catch (Exception ex) {
-            ex.printStackTrace();
+            binding.setUndefined(true);
         }
 
         cleanUpTypeMap(typeMappingType);
@@ -412,32 +373,36 @@
         
         List<Operation> ops = CastUtils.cast(portType.getOperations());
         for (Operation op : ops) {
-            BindingOperation bindingOperation = definition.createBindingOperation();
-            addCorbaOperationExtElement(bindingOperation, op);
-            bindingOperation.setName(op.getName());
-            if (op.getInput() != null) {
-                BindingInput bindingInput = definition.createBindingInput();
-                bindingInput.setName(op.getInput().getName());
-                bindingOperation.setBindingInput(bindingInput);
-            }
-            if (op.getOutput() != null) {
-                BindingOutput bindingOutput = definition.createBindingOutput();
-                bindingOutput.setName(op.getOutput().getName());
-                bindingOperation.setBindingOutput(bindingOutput);
-            }
-            // add Faults
-            if (op.getFaults() != null && op.getFaults().size() > 0) {
-                Map faults = op.getFaults();
-                Iterator i = faults.values().iterator();               
-                while (i.hasNext()) {
-                    Fault fault = (Fault)i.next();
-                    BindingFault bindingFault = definition.createBindingFault();
-                    bindingFault.setName(fault.getName());                    
-                    bindingOperation.addBindingFault(bindingFault);
-                }               
+            try {
+                BindingOperation bindingOperation = definition.createBindingOperation();
+                addCorbaOperationExtElement(bindingOperation, op);
+                bindingOperation.setName(op.getName());
+                if (op.getInput() != null) {
+                    BindingInput bindingInput = definition.createBindingInput();
+                    bindingInput.setName(op.getInput().getName());
+                    bindingOperation.setBindingInput(bindingInput);
+                }
+                if (op.getOutput() != null) {
+                    BindingOutput bindingOutput = definition.createBindingOutput();
+                    bindingOutput.setName(op.getOutput().getName());
+                    bindingOperation.setBindingOutput(bindingOutput);
+                }
+                // add Faults
+                if (op.getFaults() != null && op.getFaults().size() > 0) {
+                    Map faults = op.getFaults();
+                    Iterator i = faults.values().iterator();               
+                    while (i.hasNext()) {
+                        Fault fault = (Fault)i.next();
+                        BindingFault bindingFault = definition.createBindingFault();
+                        bindingFault.setName(fault.getName());                    
+                        bindingOperation.addBindingFault(bindingFault);
+                    }               
+                }
+                bindingOperation.setOperation(op);
+                binding.addBindingOperation(bindingOperation);
+            } catch (Exception ex) {
+                LOG.warning("Operation " + op.getName() + " not mapped to CORBA binding.");
             }
-            bindingOperation.setOperation(op);
-            binding.addBindingOperation(bindingOperation);
         }
     }
 
@@ -526,11 +491,7 @@
     }
     
     private void addCorbaTypes(Definition definition) throws Exception {   
-        List<XmlSchema> xmlSchemaLst = xmlSchemaList;
-        Iterator s = xmlSchemaLst.iterator();
-            
-        while (s.hasNext()) {
-            XmlSchema xmlSchemaTypes = (XmlSchema)s.next();
+        for (XmlSchema xmlSchemaTypes : xmlSchemaList.getXmlSchemas()) {
                 
             Iterator schemas = xmlSchemaTypes.getIncludes().getIterator();
             while (schemas.hasNext()) {
@@ -548,9 +509,9 @@
                     //}
                 }
             }
-                
-            addCorbaTypes(xmlSchemaTypes);
-
+            if (!W3CConstants.NU_SCHEMA_XSD.equals(xmlSchemaTypes.getTargetNamespace())) {
+                addCorbaTypes(xmlSchemaTypes);
+            }
         }
     }              
     

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java Thu Mar 20 19:28:42 2008
@@ -21,6 +21,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -47,6 +48,8 @@
 import org.apache.cxf.binding.corba.wsdl.Unionbranch;
 import org.apache.cxf.binding.corba.wsdl.W3CConstants;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.common.xmlschema.SchemaCollection;
 import org.apache.cxf.tools.corba.common.CorbaPrimitiveMap;
 import org.apache.cxf.tools.corba.common.ReferenceConstants;
 import org.apache.cxf.tools.corba.common.WSDLUtils;
@@ -91,16 +94,11 @@
     protected static final CorbaPrimitiveMap CORBAPRIMITIVEMAP = new CorbaPrimitiveMap();
 
     String idlNamespace;
-    XmlSchema xmlSchemaType;
-    List<XmlSchema> xmlSchemaList;
+    SchemaCollection xmlSchemaList;
     TypeMappingType typeMappingType;
     Definition def;
     Map<QName, CorbaTypeImpl> recursionMap = new HashMap<QName, CorbaTypeImpl>();
 
-    public void setXMLSchema(XmlSchema schema) {
-        xmlSchemaType = schema;
-    }
-
     public void setTypeMap(TypeMappingType map) {
         typeMappingType = map;
     }
@@ -113,11 +111,11 @@
         return idlNamespace;
     }
 
-    public void setXMLSchemaList(List<XmlSchema> list) {
+    public void setXMLSchemaList(SchemaCollection list) {
         xmlSchemaList = list;
     }
     
-    public List<XmlSchema> getXMLSchemaList() {
+    public SchemaCollection getXMLSchemaList() {
         return xmlSchemaList;
     }
 
@@ -142,8 +140,8 @@
             } else if (stype instanceof XmlSchemaSimpleType) {            
                 corbaTypeImpl = processSimpleType((XmlSchemaSimpleType)stype, 
                                                   defaultName, anonymous);
-            }  else if (xmlSchemaType.getElementByName(stype.getQName()) != null) {
-                XmlSchemaElement el = xmlSchemaType.getElementByName(stype.getQName());
+            }  else if (xmlSchemaList.getElementByQName(stype.getQName()) != null) {
+                XmlSchemaElement el = xmlSchemaList.getElementByQName(stype.getQName());
                 //REVISIT, passing ns uri because of a bug in XmlSchema (Bug: WSCOMMONS-69)
                 corbaTypeImpl = processElementType(el,
                                                    defaultName,
@@ -171,6 +169,9 @@
         } else if (particle instanceof XmlSchemaAll) {
             XmlSchemaAll acontainer = (XmlSchemaAll)particle;
             iterL = acontainer.getItems().getIterator();
+        } else {
+            LOG.warning("Unknown particle type " + particle.getClass().getName());
+            iterL = Collections.emptyList().iterator();
         }
 
         while (iterL.hasNext()) {
@@ -321,8 +322,8 @@
             if (elName ==  null) {
                 elName = createQNameTargetNamespace(elemName.getLocalPart());
             }
-            memtype = createNillableUnion(name,
-                                          elName, 
+            memtype = createNillableUnion(elName,
+                                          name, 
                                           elemtype.getQName(),
                                           elementQualified);
             memName = createQNameCorbaNamespace(memtype.getQName().getLocalPart());
@@ -342,6 +343,9 @@
             QName name = checkPrefix(element.getSchemaTypeName());
             membertype = getLocalType(name);
         }
+        if (membertype == null) {
+            return null;
+        }
 
         if (!(element.getMaxOccurs() == 1) || !(element.getMinOccurs() == 1)) {
             QName name = createQNameCorbaNamespace(getModulePrefix(membertype) 
@@ -371,9 +375,7 @@
     
     public XmlSchemaType getSchemaType(QName name) throws Exception {                
         XmlSchemaType type = null;
-        Iterator i = xmlSchemaList.iterator();
-        while (i.hasNext()) {
-            XmlSchema xmlSchema = (XmlSchema)i.next();            
+        for (XmlSchema xmlSchema : xmlSchemaList.getXmlSchemas()) {
             String nspace = name.getNamespaceURI(); 
             if (nspace == null) {
                 nspace = xmlSchema.getTargetNamespace();
@@ -500,7 +502,12 @@
         List <MemberType>members = new ArrayList<MemberType>();
 
         while (attrs.hasNext()) {
-            XmlSchemaAttribute attribute = (XmlSchemaAttribute)attrs.next();
+            Object attrObj = attrs.next();
+            if (!(attrObj instanceof XmlSchemaAttribute)) {
+                LOG.warning(attrObj.getClass() + " not supported in CORBA binding.  Skipping.");
+                continue;
+            }
+            XmlSchemaAttribute attribute = (XmlSchemaAttribute)attrObj;
             QName attrName = attribute.getQName();
             if (attrName.getNamespaceURI().equals("")) {
                 attrName = new QName(uri, attrName.getLocalPart());
@@ -774,11 +781,7 @@
     
     protected XmlSchemaType lookUpType(Part part) {
         XmlSchemaType schemaType = null;
-        
-        Iterator i = xmlSchemaList.iterator();
-        while (i.hasNext()) {
-            XmlSchema xmlSchema = (XmlSchema)i.next();
-        
+        for (XmlSchema xmlSchema : xmlSchemaList.getXmlSchemas()) {
             if (part.getElementName() != null) {
                 XmlSchemaElement schemaElement = xmlSchema.getElementByName(part.getElementName());
                 if (schemaElement != null) {
@@ -798,21 +801,14 @@
     }
     
     private XmlSchemaType findSchemaType(QName typeName) {
-        XmlSchemaType schemaType = null;
-        
-        
-        
-        
-        Iterator i = xmlSchemaList.iterator();
-        while (i.hasNext()) {
-            XmlSchema xmlSchema = (XmlSchema)i.next();                  
+        for (XmlSchema xmlSchema : xmlSchemaList.getXmlSchemas()) { 
             // if the schema includes other schemas need to search there.
-            schemaType = findTypeInSchema(xmlSchema, typeName);
+            XmlSchemaType schemaType = findTypeInSchema(xmlSchema, typeName);
             if (schemaType != null) {
                 return schemaType;
             }            
         }            
-        return schemaType;
+        return null;
     }
     
     private XmlSchemaType findTypeInSchema(XmlSchema xmlSchema, QName typeName) {
@@ -1053,7 +1049,9 @@
                 base = getSchemaType(ext.getBaseTypeName());
                 basetype = convertSchemaToCorbaType(base, base.getQName(), base, null, false);
             }
-            
+            if (basetype == null) {
+                return null;
+            }            
             // process  ext types ????                      
             MemberType basemember = new MemberType();
             basemember.setName("_simpleTypeValue");
@@ -1541,9 +1539,13 @@
     protected QName checkPrefix(QName schematypeName) {
         QName name = schematypeName;
         if ((name != null) && (name.getPrefix() == null || name.getPrefix().equals(""))) {
+            if (StringUtils.isEmpty(name.getNamespaceURI())) {
+                return name;
+            }
             String prefix = def.getPrefix(name.getNamespaceURI());
             if (prefix == null) {
-                prefix = xmlSchemaType.getNamespaceContext().getPrefix(name.getNamespaceURI());
+                prefix = xmlSchemaList.getSchemaByTargetNamespace(name.getNamespaceURI())
+                    .getNamespaceContext().getPrefix(name.getNamespaceURI());
             }
             if (prefix != null) {
                 return new QName(name.getNamespaceURI(),

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaProcessor.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaProcessor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaProcessor.java Thu Mar 20 19:28:42 2008
@@ -97,6 +97,8 @@
     }
 
     private void writeToWSDL(Definition def) throws ToolException {
+        
+        
         try {
             WSDLUtils.writeWSDL(def, outputdir, wsdlOutput);
         } catch (Throwable t) {

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java Thu Mar 20 19:28:42 2008
@@ -114,17 +114,12 @@
     
     public void generateIDL(Definition definition) throws Exception {
         if (definition == null) {
-            extReg = new ExtensionRegistry(); 
-            addExtensions(extReg);
-            typeProcessor.setExtensionRegistry(extReg); 
             typeProcessor.parseWSDL(wsdlFileName);
             def = typeProcessor.getWSDLDefinition();
         } else {
             def = definition;
-            extReg = def.getExtensionRegistry();
-            addExtensions(extReg);
-            typeProcessor.setExtensionRegistry(extReg);
         }
+        extReg = def.getExtensionRegistry();
 
         if (printWriter == null) {
             printWriter = createPrintWriter(outputFile);



Mime
View raw message