cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r756986 - in /cxf/trunk: common/xerces-xsd-validation/src/main/java/org/apache/cxf/xsdvalidation/DOMLSInput.java rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CustomStringType.java
Date Sat, 21 Mar 2009 18:47:49 GMT
Author: bimargulies
Date: Sat Mar 21 18:47:49 2009
New Revision: 756986

URL: http://svn.apache.org/viewvc?rev=756986&view=rev
Log:
Fix the rest of CXF-2126.

Modified:
    cxf/trunk/common/xerces-xsd-validation/src/main/java/org/apache/cxf/xsdvalidation/DOMLSInput.java
    cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CustomStringType.java

Modified: cxf/trunk/common/xerces-xsd-validation/src/main/java/org/apache/cxf/xsdvalidation/DOMLSInput.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/xerces-xsd-validation/src/main/java/org/apache/cxf/xsdvalidation/DOMLSInput.java?rev=756986&r1=756985&r2=756986&view=diff
==============================================================================
--- cxf/trunk/common/xerces-xsd-validation/src/main/java/org/apache/cxf/xsdvalidation/DOMLSInput.java
(original)
+++ cxf/trunk/common/xerces-xsd-validation/src/main/java/org/apache/cxf/xsdvalidation/DOMLSInput.java
Sat Mar 21 18:47:49 2009
@@ -53,7 +53,7 @@
         StreamResult result = new StreamResult(writer);
         transformer.transform(source, result);
         data = writer.toString();
-        LOG.warning(systemId + ": " + data);
+        LOG.fine(systemId + ": " + data);
         
     }
 

Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CustomStringType.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CustomStringType.java?rev=756986&r1=756985&r2=756986&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CustomStringType.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CustomStringType.java
Sat Mar 21 18:47:49 2009
@@ -18,8 +18,32 @@
  */
 package org.apache.cxf.aegis.type.java5;
 
+import javax.xml.XMLConstants;
+
 import org.apache.cxf.aegis.type.basic.StringType;
+import org.apache.cxf.common.xmlschema.XmlSchemaConstants;
+import org.apache.ws.commons.schema.XmlSchema;
+import org.apache.ws.commons.schema.XmlSchemaSimpleContentExtension;
+import org.apache.ws.commons.schema.XmlSchemaSimpleType;
+import org.apache.ws.commons.schema.XmlSchemaSimpleTypeRestriction;
 
 public class CustomStringType extends StringType {
 
+    @Override
+    public void writeSchema(XmlSchema root) {
+        // this mapping gets used with xs:string, and we might get called.
+        if (root.getTargetNamespace().equals(XMLConstants.W3C_XML_SCHEMA_NS_URI)) {
+            return;
+        }
+        XmlSchemaSimpleType type = new XmlSchemaSimpleType(root);
+        type.setName(getSchemaType().getLocalPart());
+        root.getItems().add(type);
+        root.addType(type);
+        XmlSchemaSimpleContentExtension ext = new XmlSchemaSimpleContentExtension();
+        ext.setBaseTypeName(XmlSchemaConstants.STRING_QNAME);
+        XmlSchemaSimpleTypeRestriction content = new XmlSchemaSimpleTypeRestriction();
+        content.setBaseTypeName(XmlSchemaConstants.STRING_QNAME);
+        type.setContent(content);
+    }
+
 }



Mime
View raw message