cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r747871 [3/3] - in /cxf/branches/2.1.x-fixes: api/src/main/java/org/apache/cxf/wsdl/ rt/databinding/aegis/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/ rt/data...
Date Wed, 25 Feb 2009 17:54:36 GMT
Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/AbstractEncodedTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/AbstractEncodedTest.java?rev=747871&r1=747870&r2=747871&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/AbstractEncodedTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/AbstractEncodedTest.java
Wed Feb 25 17:54:34 2009
@@ -19,13 +19,10 @@
 package org.apache.cxf.aegis.type.encoded;
 
 import java.io.ByteArrayInputStream;
-import java.io.UnsupportedEncodingException;
 import java.util.List;
 import java.util.Map;
 import javax.xml.stream.XMLStreamException;
 
-import org.w3c.dom.Element;
-
 import org.apache.cxf.aegis.AbstractAegisTest;
 import org.apache.cxf.aegis.AegisContext;
 import org.apache.cxf.aegis.Context;
@@ -35,13 +32,15 @@
 import org.apache.cxf.aegis.type.TypeMapping;
 import org.apache.cxf.aegis.xml.MessageReader;
 import org.apache.cxf.aegis.xml.MessageWriter;
+import org.apache.cxf.aegis.xml.jdom.JDOMWriter;
 import org.apache.cxf.aegis.xml.stax.ElementReader;
-import org.apache.cxf.aegis.xml.stax.ElementWriter;
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.common.util.SOAPConstants;
-import org.apache.cxf.helpers.MapNamespaceContext;
-import org.apache.cxf.helpers.XMLUtils;
-
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.Namespace;
+import org.jdom.output.Format;
+import org.jdom.output.XMLOutputter;
 import org.junit.Before;
 
 public abstract class AbstractEncodedTest extends AbstractAegisTest {
@@ -59,7 +58,7 @@
 
         AegisContext context = new AegisContext();
         // create a different mapping than the context creates.
-        TypeMapping baseMapping = DefaultTypeMapping.createSoap11TypeMapping(true, false,
false);
+        TypeMapping baseMapping = DefaultTypeMapping.createSoap11TypeMapping(true, false);
         mapping = new DefaultTypeMapping(SOAPConstants.XSD, baseMapping);
         mapping.setTypeCreator(context.createTypeCreator());
         context.setTypeMapping(mapping);
@@ -101,14 +100,10 @@
     }
 
     public Object readRef(Element element) throws XMLStreamException {
-        String xml = XMLUtils.toString(element);
-        ElementReader root;
-        try {
-            root = new ElementReader(new ByteArrayInputStream(xml.getBytes("utf-8")));
-            return readRef(root);
-        } catch (UnsupportedEncodingException e) {
-            throw new RuntimeException(e);
-        }
+        XMLOutputter xmlOutputter = new XMLOutputter(Format.getPrettyFormat());
+        String xml = xmlOutputter.outputString(element);
+        ElementReader root = new ElementReader(new ByteArrayInputStream(xml.getBytes()));
+        return readRef(root);
     }
 
     public Object readRef(ElementReader root) throws XMLStreamException {
@@ -140,12 +135,12 @@
         assertNotNull("no type found for " + instance.getClass().getName());
 
         // create the document
-        Element element = createElement("urn:Bean", "root", "b");
-        MapNamespaceContext namespaces = new MapNamespaceContext();
+        Element element = new Element("root", "b", "urn:Bean");
         for (Map.Entry<String, String> entry : getNamespaces().entrySet()) {
-            namespaces.addNamespace(entry.getKey(), entry.getValue());
+            element.addNamespaceDeclaration(Namespace.getNamespace(entry.getKey(), entry.getValue()));
         }
-        ElementWriter rootWriter = getElementWriter(element, namespaces);
+        new Document(element);
+        JDOMWriter rootWriter = new JDOMWriter(element);
         Context context = getContext();
 
         // get Type based on the object instance

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/ArrayTypeInfoTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/ArrayTypeInfoTest.java?rev=747871&r1=747870&r2=747871&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/ArrayTypeInfoTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/ArrayTypeInfoTest.java
Wed Feb 25 17:54:34 2009
@@ -88,7 +88,7 @@
     }
 
     public void assertEquals(ArrayTypeInfo expected, String actualString) throws Exception
{
-        ArrayTypeInfo actual = new ArrayTypeInfo(getNamespaceContext(), actualString);
+        ArrayTypeInfo actual = new ArrayTypeInfo(actualString);
 
         // only compare local part because prefix is only resolved when using the MessageReader
constructor
         assertEquals(expected.getRanks(), actual.getRanks());
@@ -128,7 +128,7 @@
 
     public void assertInvalid(String actualString) {
         try {
-            new ArrayTypeInfo(getNamespaceContext(), actualString);
+            new ArrayTypeInfo(actualString);
             fail("Expected a DatabindingException from invalid arrayType " + actualString);
         } catch (Exception expected) {
             // expected

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/SoapArrayTypeTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/SoapArrayTypeTest.java?rev=747871&r1=747870&r2=747871&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/SoapArrayTypeTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/SoapArrayTypeTest.java
Wed Feb 25 17:54:34 2009
@@ -125,23 +125,12 @@
         assertArrayEquals(Arrays.asList(objects).toString(),
                           new Object[]{42, new BigDecimal("42.42"), "Forty Two"},
                           objects);
-    }
-    
-    @Test
-    public void testUrTypeArrayReadWriteRef1() throws Exception {
-        Object[] objects;
+
         // round trip tests
         objects = readWriteReadRef("arrayUrType1.xml", Object[].class);
         assertArrayEquals(new Object[]{42, new Float(42.42f), "Forty Two"}, objects);
-    }
-
-    @Test
-    public void testUrTypeArrayReadWriteRef2() throws Exception {
-        Object[] objects;
-        // round trip tests
         objects = readWriteReadRef("arrayUrType2.xml", Object[].class);
         assertArrayEquals(new Object[]{42, new BigDecimal("42.42"), "Forty Two"}, objects);
-        
     }
 
     @Test

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/StructTypeTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/StructTypeTest.java?rev=747871&r1=747870&r2=747871&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/StructTypeTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/StructTypeTest.java
Wed Feb 25 17:54:34 2009
@@ -22,16 +22,17 @@
 import java.util.TreeMap;
 import javax.xml.namespace.QName;
 
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
 import org.apache.cxf.aegis.AegisContext;
 import org.apache.cxf.aegis.Context;
 import org.apache.cxf.aegis.type.basic.BeanTypeInfo;
+import org.apache.cxf.aegis.xml.jdom.JDOMWriter;
 import org.apache.cxf.aegis.xml.stax.ElementReader;
-import org.apache.cxf.helpers.DOMUtils;
-
+import org.apache.cxf.helpers.CastUtils;
+import org.jdom.Attribute;
+import org.jdom.Content;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.output.XMLOutputter;
 import org.junit.Test;
 
 public class StructTypeTest extends AbstractEncodedTest {
@@ -81,7 +82,9 @@
         reader.getXMLStreamReader().close();
 
         // Test writing
-        Element element = writeObjectToElement(addressType, address, getLocalContext());

+        Element element = new Element("root", "b", "urn:Bean");
+        new Document(element);
+        addressType.writeObject(address, new JDOMWriter(element), getLocalContext());
         validateShippingAddress(element);
     }
 
@@ -159,9 +162,9 @@
     private void validatePurchaseOrder(Element element) throws Exception {
         Element poRefElement = null;
         Map<String, Element> blocks = new TreeMap<String, Element>();
-        for (Node n = element.getFirstChild(); n != null; n = n.getNextSibling()) {
-            if (n instanceof Element) {
-                Element child = (Element) n;
+        for (Content content : CastUtils.<Content>cast(element.getContent())) {
+            if (content instanceof Element) {
+                Element child = (Element) content;
                 if (poRefElement == null) {
                     poRefElement = child;
                 } else {
@@ -173,11 +176,11 @@
 
         Element po = getReferencedElement("poRef", poRefElement, blocks);
 
-        Element shippingRef = (Element)DOMUtils.getChild(po, "shipping");
+        Element shippingRef = po.getChild("shipping");
         Element shipping = getReferencedElement("shipping", shippingRef, blocks);
         validateShippingAddress(shipping);
 
-        Element billingRef = (Element)DOMUtils.getChild(po, "billing");
+        Element billingRef = po.getChild("billing");
         Element billing = getReferencedElement("billing", billingRef, blocks);
         validateBillingAddress(billing);
     }
@@ -194,22 +197,26 @@
     }
 
     private static void assertChildEquals(String expected, Element element, String childName)
{
-        assertEquals(expected, DOMUtils.getChild(element, childName).getTextContent());
+        assertEquals(expected, element.getChild(childName).getText());
     }
 
     private String getId(String childName, Element child) {
         assertNotNull(childName + " is null", child);
-        Attr idAttribute = child.getAttributeNode("id");
-        assertNotNull(childName + " id is null \n", idAttribute);
+        Attribute idAttribute = child.getAttribute("id");
+        XMLOutputter xmlOutputter = new XMLOutputter();
+        assertNotNull(childName + " id is null \n" + xmlOutputter.outputString(child), idAttribute);
         String id = idAttribute.getValue();
-        assertNotNull(childName + " id is null \n", id);
+        assertNotNull(childName + " id is null \n" + xmlOutputter.outputString(child), id);
         return id;
     }
 
     private String getRef(String childName, Element child) {
         assertNotNull(childName + " is null", child);
-        String hrefAttribute = child.getAttribute("href");
-        assertNotSame("", childName + " href is null \n", hrefAttribute);
-        return hrefAttribute;
+        Attribute hrefAttribute = child.getAttribute("href");
+        XMLOutputter xmlOutputter = new XMLOutputter();
+        assertNotNull(childName + " href is null \n" + xmlOutputter.outputString(child),
hrefAttribute);
+        String href = hrefAttribute.getValue();
+        assertNotNull(childName + " href is null \n" + xmlOutputter.outputString(child),
href);
+        return href;
     }
 }

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedTypeTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedTypeTest.java?rev=747871&r1=747870&r2=747871&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedTypeTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedTypeTest.java
Wed Feb 25 17:54:34 2009
@@ -64,7 +64,7 @@
         AnnotatedTypeInfo info = new AnnotatedTypeInfo(tm, AnnotatedBean1.class, "urn:foo",
                                                        new TypeCreationOptions());
 
-        Iterator elements = info.getElements().iterator();
+        Iterator elements = info.getElements();
         assertTrue(elements.hasNext());
         QName element = (QName)elements.next();
         assertTrue(elements.hasNext());
@@ -91,7 +91,7 @@
             fail("Unexpected element name: " + element.getLocalPart());
         }
 
-        Iterator atts = info.getAttributes().iterator();
+        Iterator atts = info.getAttributes();
         assertTrue(atts.hasNext());
         atts.next();
         assertFalse(atts.hasNext());
@@ -108,9 +108,9 @@
     public void testAegisType() {
         BeanType type = (BeanType)tm.getTypeCreator().createType(AnnotatedBean3.class);
 
-        assertEquals(0, type.getTypeInfo().getAttributes().size());
+        assertFalse(type.getTypeInfo().getAttributes().hasNext());
 
-        Iterator itr = type.getTypeInfo().getElements().iterator();
+        Iterator itr = type.getTypeInfo().getElements();
         assertTrue(itr.hasNext());
         QName q = (QName)itr.next();
         assertEquals("attProp", q.getLocalPart());
@@ -128,7 +128,7 @@
     public void testNillableAndMinOccurs() {
         BeanType type = (BeanType)tm.getTypeCreator().createType(AnnotatedBean4.class);
         AnnotatedTypeInfo info = (AnnotatedTypeInfo)type.getTypeInfo();
-        Iterator elements = info.getElements().iterator();
+        Iterator elements = info.getElements();
         assertTrue(elements.hasNext());
         // nillable first
         QName element = (QName)elements.next();
@@ -181,7 +181,7 @@
                                                            new TypeCreationOptions()));
         type.setSchemaType(new QName("urn:foo", "BadBean"));
 
-        assertFalse(type.getTypeInfo().getElements().iterator().hasNext());
+        assertFalse(type.getTypeInfo().getElements().hasNext());
     }
 
     public static class BadBean {

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java?rev=747871&r1=747870&r2=747871&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java
Wed Feb 25 17:54:34 2009
@@ -19,22 +19,19 @@
 package org.apache.cxf.aegis.type.java5;
 
 import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
 
 import org.w3c.dom.Document;
-import org.w3c.dom.Element;
 
 import org.apache.cxf.aegis.AbstractAegisTest;
 import org.apache.cxf.aegis.type.DefaultTypeMapping;
 import org.apache.cxf.aegis.type.Type;
 import org.apache.cxf.aegis.type.TypeCreationOptions;
 import org.apache.cxf.aegis.type.java5.CurrencyService.Currency;
-import org.apache.cxf.aegis.xml.stax.ElementReader;
+import org.apache.cxf.aegis.xml.jdom.JDOMReader;
+import org.apache.cxf.aegis.xml.jdom.JDOMWriter;
 import org.apache.cxf.common.util.SOAPConstants;
-import org.apache.cxf.staxutils.StaxUtils;
-import org.apache.ws.commons.schema.XmlSchema;
-import org.apache.ws.commons.schema.XmlSchemaSerializer;
-
+import org.jdom.Element;
+import org.jdom.output.DOMOutputter;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -69,12 +66,14 @@
 
         tm.register(type);
 
-        Element element = writeObjectToElement(type, smallEnum.VALUE1, getContext());
+        Element root = new Element("root");
+        JDOMWriter writer = new JDOMWriter(root);
 
-        assertEquals("VALUE1", element.getTextContent());
-        
-        XMLStreamReader xreader = StaxUtils.createXMLStreamReader(element);
-        ElementReader reader = new ElementReader(xreader);
+        type.writeObject(smallEnum.VALUE1, writer, getContext());
+
+        assertEquals("VALUE1", root.getValue());
+
+        JDOMReader reader = new JDOMReader(root);
         Object value = type.readObject(reader, getContext());
 
         assertEquals(smallEnum.VALUE1, value);
@@ -119,11 +118,12 @@
         EnumType type = new EnumType();
         type.setTypeClass(smallEnum.class);
         type.setSchemaType(new QName("urn:test", "test"));
-        XmlSchema schema = newXmlSchema("urn:test");
-        type.writeSchema(schema);
 
-        XmlSchemaSerializer ser = new XmlSchemaSerializer();
-        Document doc = ser.serializeSchema(schema, false)[0];
+        Element root = new Element("root");
+        org.jdom.Document wsdl = new org.jdom.Document(root);
+        type.writeSchema(root);
+
+        Document doc = new DOMOutputter().output(wsdl);
         addNamespace("xsd", SOAPConstants.XSD);
         assertValid("//xsd:simpleType[@name='test']/xsd:restriction[@base='xsd:string']",
doc);
         assertValid("//xsd:restriction[@base='xsd:string']/xsd:enumeration[@value='VALUE1']",
doc);
@@ -149,8 +149,12 @@
 
         tm.register(type);
 
-        Element root = writeObjectToElement(type, new EnumBean(), getContext());
-        ElementReader reader = new ElementReader(StaxUtils.createXMLStreamReader(root));
+        Element root = new Element("root");
+        JDOMWriter writer = new JDOMWriter(root);
+
+        type.writeObject(new EnumBean(), writer, getContext());
+
+        JDOMReader reader = new JDOMReader(root);
         Object value = type.readObject(reader, getContext());
 
         assertTrue(value instanceof EnumBean);

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/JaxbTypeTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/JaxbTypeTest.java?rev=747871&r1=747870&r2=747871&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/JaxbTypeTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/JaxbTypeTest.java
Wed Feb 25 17:54:34 2009
@@ -64,7 +64,7 @@
         AnnotatedTypeInfo info = new AnnotatedTypeInfo(tm, JaxbBean1.class, "urn:foo",
                                                        new TypeCreationOptions());
 
-        Iterator elements = info.getElements().iterator();
+        Iterator elements = info.getElements();
         assertTrue(elements.hasNext());
         QName element = (QName)elements.next();
         assertTrue(elements.hasNext());
@@ -91,7 +91,7 @@
             fail("Unexpected element name: " + element.getLocalPart());
         }
 
-        Iterator atts = info.getAttributes().iterator();
+        Iterator atts = info.getAttributes();
         assertTrue(atts.hasNext());
         atts.next();
         assertFalse(atts.hasNext());
@@ -108,9 +108,9 @@
     public void testAegisType() {
         BeanType type = (BeanType)tm.getTypeCreator().createType(JaxbBean3.class);
 
-        assertEquals(0, type.getTypeInfo().getAttributes().size());
+        assertFalse(type.getTypeInfo().getAttributes().hasNext());
 
-        Iterator itr = type.getTypeInfo().getElements().iterator();
+        Iterator itr = type.getTypeInfo().getElements();
         assertTrue(itr.hasNext());
         QName q = (QName)itr.next();
         assertEquals("attProp", q.getLocalPart());
@@ -128,7 +128,7 @@
     public void testNillableAndMinOccurs() {
         BeanType type = (BeanType)tm.getTypeCreator().createType(JaxbBean4.class);
         AnnotatedTypeInfo info = (AnnotatedTypeInfo)type.getTypeInfo();
-        Iterator elements = info.getElements().iterator();
+        Iterator elements = info.getElements();
         assertTrue(elements.hasNext());
         // nillable first
         QName element = (QName)elements.next();
@@ -181,7 +181,7 @@
                                                            new TypeCreationOptions()));
         type.setSchemaType(new QName("urn:foo", "BadBean"));
 
-        assertEquals(0, type.getTypeInfo().getElements().size());
+        assertFalse(type.getTypeInfo().getElements().hasNext());
     }
 
     public static class BadBean {

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XFireTypeTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XFireTypeTest.java?rev=747871&r1=747870&r2=747871&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XFireTypeTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XFireTypeTest.java
Wed Feb 25 17:54:34 2009
@@ -64,7 +64,7 @@
         AnnotatedTypeInfo info = new AnnotatedTypeInfo(tm, XFireBean1.class, "urn:foo",
                                                        new TypeCreationOptions());
 
-        Iterator elements = info.getElements().iterator();
+        Iterator elements = info.getElements();
         assertTrue(elements.hasNext());
         QName element = (QName)elements.next();
         assertTrue(elements.hasNext());
@@ -91,7 +91,7 @@
             fail("Unexpected element name: " + element.getLocalPart());
         }
 
-        Iterator atts = info.getAttributes().iterator();
+        Iterator atts = info.getAttributes();
         assertTrue(atts.hasNext());
         atts.next();
         assertFalse(atts.hasNext());
@@ -108,9 +108,9 @@
     public void testAegisType() {
         BeanType type = (BeanType)tm.getTypeCreator().createType(XFireBean3.class);
 
-        assertEquals(0, type.getTypeInfo().getAttributes().size());
+        assertFalse(type.getTypeInfo().getAttributes().hasNext());
 
-        Iterator itr = type.getTypeInfo().getElements().iterator();
+        Iterator itr = type.getTypeInfo().getElements();
         assertTrue(itr.hasNext());
         QName q = (QName)itr.next();
         assertEquals("attProp", q.getLocalPart());
@@ -128,7 +128,7 @@
     public void testNillableAndMinOccurs() {
         BeanType type = (BeanType)tm.getTypeCreator().createType(XFireBean4.class);
         AnnotatedTypeInfo info = (AnnotatedTypeInfo)type.getTypeInfo();
-        Iterator elements = info.getElements().iterator();
+        Iterator elements = info.getElements();
         assertTrue(elements.hasNext());
         // nillable first
         QName element = (QName)elements.next();
@@ -181,7 +181,7 @@
                                                            new TypeCreationOptions()));
         type.setSchemaType(new QName("urn:foo", "BadBean"));
 
-        assertEquals(0, type.getTypeInfo().getElements().size());
+        assertFalse(type.getTypeInfo().getElements().hasNext());
     }
 
     public static class BadBean {

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/XMLStreamReaderMappingTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/XMLStreamReaderMappingTest.java?rev=747871&r1=747870&r2=747871&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/XMLStreamReaderMappingTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/XMLStreamReaderMappingTest.java
Wed Feb 25 17:54:34 2009
@@ -48,7 +48,7 @@
 
         context = new AegisContext();
         // create a different mapping than the context creates.
-        TypeMapping baseMapping = DefaultTypeMapping.createSoap11TypeMapping(true, false,
false);
+        TypeMapping baseMapping = DefaultTypeMapping.createSoap11TypeMapping(true, false);
         mapping = new DefaultTypeMapping(SOAPConstants.XSD, baseMapping);
         mapping.register(XMLStreamReader.class, 
                          new QName("urn:Bean", "SimpleBean"), new XMLStreamReaderType());

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/resources/org/apache/cxf/aegis/type/aegisOptionsTestBeans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/resources/org/apache/cxf/aegis/type/aegisOptionsTestBeans.xml?rev=747871&r1=747870&r2=747871&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/resources/org/apache/cxf/aegis/type/aegisOptionsTestBeans.xml
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/resources/org/apache/cxf/aegis/type/aegisOptionsTestBeans.xml
Wed Feb 25 17:54:34 2009
@@ -35,17 +35,11 @@
 	<import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
 
         <bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding">
-                <property name="aegisContext">
-                	<bean class="org.apache.cxf.aegis.AegisContext">
-                	<!--  the test that uses this uses JDOM -->
-                		<property name="enableJDOMMappings" value="true"/>
-                		<property name="configuration">
-	                        <bean class="org.apache.cxf.aegis.type.TypeCreationOptions">
-                        		<property name="defaultMinOccurs" value="3"/>
-                        		<property name="defaultNillable" value="false"/>
-                        	</bean>
-                		</property>
-                	</bean>
+                <property name="configuration">
+                        <bean class="org.apache.cxf.aegis.type.TypeCreationOptions">
+                        <property name="defaultMinOccurs" value="3"/>
+                        <property name="defaultNillable" value="false"/>
+                        </bean>
                 </property>
         </bean>
            

Modified: cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/WeatherService2Test.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/WeatherService2Test.java?rev=747871&r1=747870&r2=747871&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/WeatherService2Test.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/WeatherService2Test.java
Wed Feb 25 17:54:34 2009
@@ -21,8 +21,8 @@
 
 import org.w3c.dom.Node;
 
-import org.apache.cxf.common.WSDLConstants;
 import org.apache.cxf.common.util.SOAPConstants;
+import org.apache.cxf.wsdl.WSDLConstants;
 import org.junit.Before;
 import org.junit.Test;
 

Modified: cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XMLBeansServiceTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XMLBeansServiceTest.java?rev=747871&r1=747870&r2=747871&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XMLBeansServiceTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XMLBeansServiceTest.java
Wed Feb 25 17:54:34 2009
@@ -22,8 +22,8 @@
 
 import org.w3c.dom.Node;
 
-import org.apache.cxf.common.WSDLConstants;
 import org.apache.cxf.common.util.SOAPConstants;
+import org.apache.cxf.wsdl.WSDLConstants;
 import org.junit.Before;
 import org.junit.Test;
 

Modified: cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/rpc/WeatherServiceRPCLitTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/rpc/WeatherServiceRPCLitTest.java?rev=747871&r1=747870&r2=747871&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/rpc/WeatherServiceRPCLitTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/rpc/WeatherServiceRPCLitTest.java
Wed Feb 25 17:54:34 2009
@@ -28,8 +28,8 @@
 
 import net.webservicex.WeatherData;
 
-import org.apache.cxf.common.WSDLConstants;
 import org.apache.cxf.common.util.SOAPConstants;
+import org.apache.cxf.wsdl.WSDLConstants;
 import org.apache.cxf.xmlbeans.AbstractXmlBeansTest;
 import org.junit.Before;
 import org.junit.Test;

Modified: cxf/branches/2.1.x-fixes/systests/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/pom.xml?rev=747871&r1=747870&r2=747871&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/pom.xml (original)
+++ cxf/branches/2.1.x-fixes/systests/pom.xml Wed Feb 25 17:54:34 2009
@@ -412,12 +412,6 @@
             <groupId>org.apache.servicemix</groupId>
             <artifactId>servicemix-core</artifactId>
             <version>${servicemix.version}</version>
-           <exclusions>
-             <exclusion>
-              <groupId>jaxen</groupId>
-              <artifactId>jaxen</artifactId>
-             </exclusion>
-	   </exclusions>
         </dependency>
 
         <dependency>

Modified: cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java?rev=747871&r1=747870&r2=747871&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
(original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
Wed Feb 25 17:54:34 2009
@@ -47,7 +47,7 @@
     
     @BeforeClass
     public static void startServers() throws Exception {
-        assertTrue("server did not launch correctly", launchServer(AegisServer.class, false));
+        assertTrue("server did not launch correctly", launchServer(AegisServer.class));
     }
     
     @Test



Mime
View raw message