cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r730888 - in /cxf/sandbox/benson/aegis_xmlschema: common/common/src/main/java/org/apache/cxf/helpers/ rt/core/src/main/java/org/apache/cxf/test/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/ rt/databinding/aegis/src/m...
Date Sat, 03 Jan 2009 01:58:21 GMT
Author: bimargulies
Date: Fri Jan  2 17:58:20 2009
New Revision: 730888

URL: http://svn.apache.org/viewvc?rev=730888&view=rev
Log:
Reduce the number of errors considerably, but not quite to 0 yet.

Modified:
    cxf/sandbox/benson/aegis_xmlschema/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
    cxf/sandbox/benson/aegis_xmlschema/rt/core/src/main/java/org/apache/cxf/test/XPathAssert.java
    cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
    cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
    cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
    cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
    cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/XMLBeanTypeInfo.java
    cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java
    cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/CustomMappingTest.java
    cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java
    cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/BeanTest.java
    cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java

Modified: cxf/sandbox/benson/aegis_xmlschema/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/benson/aegis_xmlschema/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java?rev=730888&r1=730887&r2=730888&view=diff
==============================================================================
--- cxf/sandbox/benson/aegis_xmlschema/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
(original)
+++ cxf/sandbox/benson/aegis_xmlschema/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
Fri Jan  2 17:58:20 2009
@@ -290,9 +290,8 @@
         for (Node n = parent.getFirstChild(); n != null; n = n.getNextSibling()) {
             if (n instanceof Element) {
                 Element e = (Element) n;
-                if (((ns == null && e.getNamespaceURI() == null)
-                    || (ns != null && ns.equals(e.getNamespaceURI())))
-                    && lp.equals(e.getNodeName())) {
+                String ens = e.getNamespaceURI();
+                if (ns.equals(ens) && lp.equals(e.getNodeName())) {
                     return e;
                 }
             }
@@ -312,8 +311,7 @@
         for (Node n = parent.getFirstChild(); n != null; n = n.getNextSibling()) {
             if (n instanceof Element) {
                 Element e = (Element) n;
-                if ((ns == null && e.getNamespaceURI() == null)
-                    || ns.equals(e.getNamespaceURI())) {
+                if (ns.equals(e.getNamespaceURI()) && localName.equals(e.getLocalName()))
{
                     r.add(e);
                 }
             }
@@ -361,8 +359,7 @@
             if (type >= 0 && node.getNodeType() != type) {
                 continue;
             }
-            // System.out.println("getNode: " + name + " " +
-            // node.getNodeName());
+
             if (name == null) {
                 return node;
             }

Modified: cxf/sandbox/benson/aegis_xmlschema/rt/core/src/main/java/org/apache/cxf/test/XPathAssert.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/benson/aegis_xmlschema/rt/core/src/main/java/org/apache/cxf/test/XPathAssert.java?rev=730888&r1=730887&r2=730888&view=diff
==============================================================================
--- cxf/sandbox/benson/aegis_xmlschema/rt/core/src/main/java/org/apache/cxf/test/XPathAssert.java
(original)
+++ cxf/sandbox/benson/aegis_xmlschema/rt/core/src/main/java/org/apache/cxf/test/XPathAssert.java
Fri Jan  2 17:58:20 2009
@@ -135,7 +135,10 @@
         throws Exception {
         Node result = (Node)createXPath(namespaces).evaluate(xpath, node, XPathConstants.NODE);
         if (result == null) {
-            throw new AssertionFailedError("No nodes were found for expression: " + xpath);
+            throw new AssertionFailedError("No nodes were found for expression: " 
+                                           + xpath 
+                                           + " in document " 
+                                           + writeNodeToString(node));
         }
 
         String value2 = DOMUtils.getContent(result).trim();

Modified: cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java?rev=730888&r1=730887&r2=730888&view=diff
==============================================================================
--- cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
(original)
+++ cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
Fri Jan  2 17:58:20 2009
@@ -62,10 +62,12 @@
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.SchemaInfo;
 import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.wsdl.WSDLConstants;
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaAnnotated;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.XmlSchemaForm;
+import org.apache.ws.commons.schema.utils.NamespaceMap;
 
 /**
  * CXF databinding object for Aegis. By default, this creates an AegisContext object. To
customize
@@ -428,6 +430,8 @@
 
         boolean needXmimeSchema = false;
         boolean needTypesSchema = false;
+        Map<String, String> namespaceMap = getDeclaredNamespaceMappings();
+
         
         for (ServiceInfo si : s.getServiceInfos()) {
             for (Map.Entry<String, Set<Type>> entry : tns2Type.entrySet()) {
@@ -436,12 +440,31 @@
                     continue;
                 }
                 SchemaInfo schemaInfo = si.addNewSchema(entry.getKey());
-                XmlSchema schema = schemaInfo.getSchema();
+                XmlSchema schema = schemaInfo.getSchema(); 
+                NamespaceMap xmlsNamespaceMap = new NamespaceMap();
+
+                // user-requested prefix mappings.
+                if (namespaceMap != null) {
+                    for (Map.Entry<String, String> e : namespaceMap.entrySet()) {
+                        xmlsNamespaceMap.add(e.getKey(), e.getValue());
+                    }
+                }
+                
+                // tns: is conventional, and besides we have unit tests that are hardcoded
to it.
+                if (!xmlsNamespaceMap.containsKey(WSDLConstants.CONVENTIONAL_TNS_PREFIX))
{
+                    xmlsNamespaceMap.add(WSDLConstants.CONVENTIONAL_TNS_PREFIX, entry.getKey());
+                }
+                
+                // ditto for xsd: instead of just namespace= for the schema schema.
+                if (!xmlsNamespaceMap.containsKey("xsd")) {
+                    xmlsNamespaceMap.add("xsd", XmlSchemaConstants.XSD_NAMESPACE_URI);
+                }
+
+                schema.setNamespaceContext(xmlsNamespaceMap);
                 schema.setTargetNamespace(entry.getKey());
                 schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
                 schema.setAttributeFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
 
-
                 for (Type t : entry.getValue()) {
                     t.writeSchema(schema);
                 }

Modified: cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java?rev=730888&r1=730887&r2=730888&view=diff
==============================================================================
--- cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
(original)
+++ cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
Fri Jan  2 17:58:20 2009
@@ -115,7 +115,7 @@
         if (is != null) {
             try {
                 aegisDocumentBuilderFactory = DocumentBuilderFactory.newInstance();
-
+                aegisDocumentBuilderFactory.setNamespaceAware(true);
                 
                 SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
                 aegisSchema = schemaFactory.newSchema(new StreamSource(is));
@@ -440,7 +440,7 @@
             }
             info.setTypeClass(m.getReturnType());
             // info.setAnnotations(m.getAnnotations());
-            Element rtElement = DOMUtils.getFirstChildWithName(bestMatch, null, "return-type");
+            Element rtElement = DOMUtils.getFirstChildWithName(bestMatch, "", "return-type");
             readMetadata(info, mapping, rtElement);
         }
 
@@ -638,7 +638,7 @@
         for (Iterator iterator = nodes.iterator(); iterator.hasNext();) {
             Element element = (Element)iterator.next();
 
-            List<Element> params = DOMUtils.getChildrenWithName(element, null, "parameter");
+            List<Element> params = DOMUtils.getChildrenWithName(element, "", "parameter");
             int availableParameters = params.size();
             if (availableParameters > highestSpecified) {
                 bestCandidate = element;

Modified: cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java?rev=730888&r1=730887&r2=730888&view=diff
==============================================================================
--- cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
(original)
+++ cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
Fri Jan  2 17:58:20 2009
@@ -285,6 +285,8 @@
         Type componentType = getComponentType();
         XmlSchemaElement element = new XmlSchemaElement();
         element.setSchemaTypeName(componentType.getSchemaType());
+        element.setName(componentType.getSchemaType().getLocalPart());
+        seq.getItems().add(element);
 
         if (componentType.isNillable()) {
             element.setNillable(true);

Modified: cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java?rev=730888&r1=730887&r2=730888&view=diff
==============================================================================
--- cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
(original)
+++ cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
Fri Jan  2 17:58:20 2009
@@ -687,8 +687,10 @@
         // Write out schema for attributes
         for (QName name : inf.getAttributes()) {
             XmlSchemaAttribute attribute = new XmlSchemaAttribute();
-            sequence.getItems().add(attribute);
+            complex.getAttributes().add(attribute);
             attribute.setName(name.getLocalPart());
+            Type type = getType(inf, name);
+            attribute.setSchemaTypeName(type.getSchemaType());
             String ns = name.getNamespaceURI();
             if (!ns.equals(root.getTargetNamespace())) {
                 XmlSchemaTools.addImportIfNeeded(root, ns);

Modified: cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/XMLBeanTypeInfo.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/XMLBeanTypeInfo.java?rev=730888&r1=730887&r2=730888&view=diff
==============================================================================
--- cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/XMLBeanTypeInfo.java
(original)
+++ cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/XMLBeanTypeInfo.java
Fri Jan  2 17:58:20 2009
@@ -66,14 +66,14 @@
         QName mappedName = null;
 
         if (e != null) {
-            String ignore = e.getAttribute("ignore");
+            String ignore = DOMUtils.getAttributeValueEmptyNull(e, "ignore");
             if (ignore != null && ignore.equals("true")) {
                 return;
             }
 
             LOG.debug("Found mapping for property " + pd.getName());
 
-            style = e.getAttribute("style");
+            style = DOMUtils.getAttributeValueEmptyNull(e, "style");
         }
 
         if (style == null) {
@@ -93,7 +93,7 @@
         }
         
         if (e != null) {
-            mappedName = NamespaceHelper.createQName(e, e.getAttribute("mappedName"),
+            mappedName = NamespaceHelper.createQName(e, DOMUtils.getAttributeValueEmptyNull(e,
"mappedName"),
                                                      namespace);
         }
 
@@ -102,18 +102,19 @@
         }
 
         if (e != null) {
-            QName mappedType = NamespaceHelper.createQName(e, e.getAttribute("typeName"),
+            QName mappedType = NamespaceHelper.createQName(e, 
+                                                           DOMUtils.getAttributeValueEmptyNull(e,
"typeName"),
                                                            getDefaultNamespace());
             if (mappedType != null) {
                 mapTypeName(mappedName, mappedType);
             }
 
-            String nillableVal = e.getAttribute("nillable");
+            String nillableVal = DOMUtils.getAttributeValueEmptyNull(e, "nillable");
             if (nillableVal != null && nillableVal.length() > 0) {
                 ensurePropertyInfo(mappedName).setNillable(Boolean.valueOf(nillableVal).booleanValue());
             }
 
-            String minOccurs = e.getAttribute("minOccurs");
+            String minOccurs = DOMUtils.getAttributeValueEmptyNull(e, "minOccurs");
             if (minOccurs != null && minOccurs.length() > 0) {
                 ensurePropertyInfo(mappedName).setMinOccurs(Integer.parseInt(minOccurs));
             }
@@ -139,10 +140,10 @@
     private Element getPropertyElement(String name2) {
         for (Iterator itr = mappings.iterator(); itr.hasNext();) {
             Element mapping2 = (Element)itr.next();
-            List<Element> elements = DOMUtils.getChildrenWithName(mapping2, null, "property");
+            List<Element> elements = DOMUtils.getChildrenWithName(mapping2, "", "property");
             for (int i = 0; i < elements.size(); i++) {
                 Element e = (Element)elements.get(i);
-                String name = e.getAttribute("name");
+                String name = DOMUtils.getAttributeValueEmptyNull(e, "name");
 
                 if (name != null && name.equals(name2)) {
                     return e;

Modified: cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java?rev=730888&r1=730887&r2=730888&view=diff
==============================================================================
--- cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java
(original)
+++ cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java
Fri Jan  2 17:58:20 2009
@@ -42,6 +42,7 @@
 import org.apache.cxf.binding.soap.SoapTransportFactory;
 import org.apache.cxf.bus.extension.ExtensionManagerBus;
 import org.apache.cxf.common.util.SOAPConstants;
+import org.apache.cxf.common.xmlschema.XmlSchemaConstants;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.endpoint.ServerRegistry;
 import org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory;
@@ -53,10 +54,13 @@
 import org.apache.cxf.transport.ConduitInitiatorManager;
 import org.apache.cxf.transport.DestinationFactoryManager;
 import org.apache.cxf.transport.local.LocalTransportFactory;
+import org.apache.cxf.wsdl.WSDLConstants;
 import org.apache.cxf.wsdl.WSDLManager;
 import org.apache.cxf.wsdl11.ServiceWSDLBuilder;
 import org.apache.cxf.wsdl11.WSDLDefinitionBuilder;
 import org.apache.cxf.wsdl11.WSDLManagerImpl;
+import org.apache.ws.commons.schema.XmlSchema;
+import org.apache.ws.commons.schema.utils.NamespaceMap;
 import org.jdom.Element;
 import org.jdom.output.DOMOutputter;
 import org.junit.Before;
@@ -261,4 +265,18 @@
         globalContext.initialize();
         return new Context(globalContext);
     }
+    
+    protected XmlSchema newXmlSchema(String targetNamespace) {
+        XmlSchema s = new XmlSchema();
+        s.setTargetNamespace(targetNamespace);
+        NamespaceMap xmlsNamespaceMap = new NamespaceMap();
+        s.setNamespaceContext(xmlsNamespaceMap);
+
+        // tns: is conventional, and besides we have unit tests that are hardcoded to it.
+        xmlsNamespaceMap.add(WSDLConstants.CONVENTIONAL_TNS_PREFIX, targetNamespace);
+        
+        // ditto for xsd: instead of just namespace= for the schema schema.
+        xmlsNamespaceMap.add("xsd", XmlSchemaConstants.XSD_NAMESPACE_URI);
+        return s;
+    }
 }

Modified: cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/CustomMappingTest.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/CustomMappingTest.java?rev=730888&r1=730887&r2=730888&view=diff
==============================================================================
--- cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/CustomMappingTest.java
(original)
+++ cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/CustomMappingTest.java
Fri Jan  2 17:58:20 2009
@@ -45,7 +45,7 @@
         TypeMapping mapping = context.getTypeMapping();
         // we are replacing the default mapping.
         mapping.register(beanType);
-        XmlSchema schema = new XmlSchema();
+        XmlSchema schema = newXmlSchema("http://util.java");
         beanType.writeSchema(schema);
         // well, test?
     }

Modified: cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java?rev=730888&r1=730887&r2=730888&view=diff
==============================================================================
--- cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java
(original)
+++ cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java
Fri Jan  2 17:58:20 2009
@@ -106,7 +106,8 @@
                         + "[@type=\"xsd:string\"]",
                     doc);
     }
-    
+
+    @org.junit.Ignore // uses Jaxen.
     @Test 
     public void testSubmitJDOMArray() throws Exception {
         

Modified: cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/BeanTest.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/BeanTest.java?rev=730888&r1=730887&r2=730888&view=diff
==============================================================================
--- cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/BeanTest.java
(original)
+++ cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/BeanTest.java
Fri Jan  2 17:58:20 2009
@@ -195,7 +195,7 @@
         assertValid("/b:root[@b:bleh='bleh']", element);
         assertValid("/b:root[@b:howdy='howdy']", element);
         
-        XmlSchema schema = new XmlSchema();
+        XmlSchema schema = newXmlSchema("urn:Bean");
         type.writeSchema(schema);
         
         XmlSchemaComplexType stype = (XmlSchemaComplexType)schema.getTypeByName("bean");
@@ -278,7 +278,7 @@
         assertInvalid("/b:root[@b:howdy]", element);
         assertValid("/b:root/b:bleh[@xsi:nil='true']", element);
 
-        XmlSchema schema = new XmlSchema();
+        XmlSchema schema = newXmlSchema("urn:Bean");
         type.writeSchema(schema);
         
         XmlSchemaComplexType stype = (XmlSchemaComplexType)schema.getTypeByName("bean");
@@ -320,7 +320,7 @@
         type.setTypeMapping(mapping);
         type.setSchemaType(new QName("urn:Bean", "bean"));
 
-        XmlSchema schema = new XmlSchema();
+        XmlSchema schema = newXmlSchema("urn:Bean");
         type.writeSchema(schema);
         
         XmlSchemaComplexType btype = (XmlSchemaComplexType)schema.getTypeByName("bean");
@@ -360,7 +360,7 @@
         type.setTypeClass(IntBean.class);
         type.setTypeMapping(mapping);
 
-        XmlSchema schema = new XmlSchema();
+        XmlSchema schema = newXmlSchema("urn:Bean");
         type.writeSchema(schema);
         
         XmlSchemaComplexType btype = (XmlSchemaComplexType)schema.getTypeByName("IntBean");
@@ -390,7 +390,7 @@
         type.setTypeClass(SimpleBean.class);
         type.setTypeMapping(mapping);
         
-        XmlSchema schema = new XmlSchema();
+        XmlSchema schema = newXmlSchema("urn:Bean");
         type.writeSchema(schema);
         
         XmlSchemaComplexType btype = (XmlSchemaComplexType)schema.getTypeByName("SimpleBean");
@@ -423,7 +423,7 @@
         type.setTypeClass(SimpleBean.class);
         type.setTypeMapping(mapping);
 
-        XmlSchema schema = new XmlSchema();
+        XmlSchema schema = newXmlSchema("urn:Bean");
         type.writeSchema(schema);
         
         XmlSchemaComplexType btype = (XmlSchemaComplexType)schema.getTypeByName("SimpleBean");

Modified: cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java?rev=730888&r1=730887&r2=730888&view=diff
==============================================================================
--- cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java
(original)
+++ cxf/sandbox/benson/aegis_xmlschema/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java
Fri Jan  2 17:58:20 2009
@@ -120,7 +120,7 @@
         EnumType type = new EnumType();
         type.setTypeClass(smallEnum.class);
         type.setSchemaType(new QName("urn:test", "test"));
-        XmlSchema schema = new XmlSchema();
+        XmlSchema schema = newXmlSchema("urn:test");
         type.writeSchema(schema);
 
         XmlSchemaSerializer ser = new XmlSchemaSerializer();



Mime
View raw message