cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r732168 - in /cxf/trunk: common/common/src/main/java/org/apache/cxf/common/xmlschema/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/ rt/databinding/aegis/sr...
Date Tue, 06 Jan 2009 23:12:26 GMT
Author: bimargulies
Date: Tue Jan  6 15:12:26 2009
New Revision: 732168

URL: http://svn.apache.org/viewvc?rev=732168&view=rev
Log:
Fix schema generation problem with missing import in Aegis. Remove JDOM usage from Javascript
Aegis test
rather than track down very muddy change in behavior from old world. Remove the unwanted ant
tasks.

Removed:
    cxf/trunk/tools/anttask/
Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
    cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/AegisTest.java
    cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AegisService.java
    cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AegisServiceImpl.java
    cxf/trunk/rt/javascript/src/test/resources/AegisBeans.xml
    cxf/trunk/tools/pom.xml

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java?rev=732168&r1=732167&r2=732168&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java
(original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaUtils.java
Tue Jan  6 15:12:26 2009
@@ -202,7 +202,9 @@
      */
     public static void addImportIfNeeded(XmlSchema schema, String namespaceUri) {
         // no need to import nothing or the XSD schema.
-        if ("".equals(namespaceUri) || XmlSchemaConstants.XSD_NAMESPACE_URI.equals(namespaceUri))
{
+        if ("".equals(namespaceUri) 
+            || XmlSchemaConstants.XSD_NAMESPACE_URI.equals(namespaceUri)
+            || schema.getTargetNamespace().equals(namespaceUri)) {
             return;
         }
             

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java?rev=732168&r1=732167&r2=732168&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
Tue Jan  6 15:12:26 2009
@@ -501,9 +501,8 @@
                 si.addSchema(schemaInfo);
             }
         }
-        
     }
-
+    
     private boolean schemaImportsXmime(XmlSchema schema) {
         return XmlSchemaUtils.schemaImportsNamespace(schema, AbstractXOPType.XML_MIME_NS);
     }

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java?rev=732168&r1=732167&r2=732168&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
Tue Jan  6 15:12:26 2009
@@ -41,6 +41,8 @@
  * @author Hani Suleiman Date: Jun 14, 2005 Time: 11:59:57 PM
  */
 public abstract class AbstractTypeCreator implements TypeCreator {
+    public static final String HTTP_CXF_APACHE_ORG_ARRAYS = "http://cxf.apache.org/arrays";
+
     protected TypeMapping tm;
 
     protected AbstractTypeCreator nextCreator;
@@ -308,7 +310,7 @@
             ns = tm.getMappingIdentifierURI();
         }
         if (WSDLConstants.NS_SCHEMA_XSD.equals(ns)) {
-            ns = "http://cxf.apache.org/arrays";
+            ns = HTTP_CXF_APACHE_ORG_ARRAYS;
         }
 
         String first = type.getSchemaType().getLocalPart().substring(0, 1);

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java?rev=732168&r1=732167&r2=732168&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
Tue Jan  6 15:12:26 2009
@@ -30,11 +30,13 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.cxf.aegis.Context;
 import org.apache.cxf.aegis.DatabindingException;
+import org.apache.cxf.aegis.type.AbstractTypeCreator;
 import org.apache.cxf.aegis.type.Type;
 import org.apache.cxf.aegis.type.TypeUtil;
 import org.apache.cxf.aegis.xml.MessageReader;
 import org.apache.cxf.aegis.xml.MessageWriter;
 import org.apache.cxf.common.xmlschema.XmlSchemaConstants;
+import org.apache.cxf.common.xmlschema.XmlSchemaUtils;
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaComplexType;
 import org.apache.ws.commons.schema.XmlSchemaElement;
@@ -286,6 +288,7 @@
         XmlSchemaElement element = new XmlSchemaElement();
         element.setName(componentType.getSchemaType().getLocalPart());
         element.setSchemaTypeName(componentType.getSchemaType());
+      
         seq.getItems().add(element);
 
         if (componentType.isNillable()) {

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java?rev=732168&r1=732167&r2=732168&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
Tue Jan  6 15:12:26 2009
@@ -33,6 +33,7 @@
 import org.apache.cxf.aegis.AegisContext;
 import org.apache.cxf.aegis.Context;
 import org.apache.cxf.aegis.DatabindingException;
+import org.apache.cxf.aegis.type.AbstractTypeCreator;
 import org.apache.cxf.aegis.type.Type;
 import org.apache.cxf.aegis.type.TypeMapping;
 import org.apache.cxf.aegis.type.TypeUtil;
@@ -664,6 +665,10 @@
             sequence.getItems().add(element);
 
             Type type = getType(inf, name);
+            if (AbstractTypeCreator.
+                HTTP_CXF_APACHE_ORG_ARRAYS.equals(type.getSchemaType().getNamespaceURI()))
{
+                XmlSchemaUtils.addImportIfNeeded(root, AbstractTypeCreator.HTTP_CXF_APACHE_ORG_ARRAYS);
+            }
 
             writeTypeReference(name, element, type);
             needXmime |= type.usesXmime();

Modified: cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/AegisTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/AegisTest.java?rev=732168&r1=732167&r2=732168&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/AegisTest.java (original)
+++ cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/AegisTest.java Tue Jan
 6 15:12:26 2009
@@ -22,6 +22,8 @@
 import java.util.Collection;
 import java.util.logging.Logger;
 
+import org.w3c.dom.Document;
+
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.javascript.JavascriptTestUtilities.JSRunnable;
 import org.apache.cxf.javascript.JavascriptTestUtilities.Notifier;
@@ -70,7 +72,7 @@
                                 testUtilities.javaToJS(getAddress()));
         implementor.waitForOneWay();
         assertEquals("before items", implementor.getAcceptedString());
-        Collection<org.jdom.Element> something = implementor.getAcceptedCollection();
+        Collection<Document> something = implementor.getAcceptedCollection();
         assertNotNull(something);
         return null;
     }
@@ -133,7 +135,6 @@
         return null;
     }
 
-    @org.junit.Ignore
     @Test
     public void callReturnBeanWithAnyTypeArray() {
         testUtilities.runInsideContext(Void.class, new JSRunnable<Void>() {

Modified: cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AegisService.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AegisService.java?rev=732168&r1=732167&r2=732168&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AegisService.java
(original)
+++ cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AegisService.java
Tue Jan  6 15:12:26 2009
@@ -21,10 +21,12 @@
 
 import java.util.Collection;
 
+import org.w3c.dom.Document;
+
 import org.apache.cxf.javascript.fortest.aegis.BeanWithAnyTypeArray;
 
 public interface AegisService {
-    void acceptAny(String before, Collection<org.jdom.Element> anything);
+    void acceptAny(String before, Collection<Document> anything);
     void acceptObjects(Collection<Object> anything);
     void acceptStrings(Collection<String> someStrings);
     BeanWithAnyTypeArray returnBeanWithAnyTypeArray();

Modified: cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AegisServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AegisServiceImpl.java?rev=732168&r1=732167&r2=732168&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AegisServiceImpl.java
(original)
+++ cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AegisServiceImpl.java
Tue Jan  6 15:12:26 2009
@@ -22,6 +22,8 @@
 import java.util.Collection;
 import java.util.concurrent.CountDownLatch;
 
+import org.w3c.dom.Document;
+
 import org.apache.cxf.javascript.fortest.aegis.BeanWithAnyTypeArray;
 import org.apache.cxf.javascript.fortest.aegis.Mammal;
 import org.apache.cxf.javascript.fortest.aegis.Vegetable;
@@ -31,7 +33,7 @@
  */
 public class AegisServiceImpl implements AegisService {
     private String acceptedString;
-    private Collection<org.jdom.Element> acceptedCollection;
+    private Collection<Document> acceptedCollection;
     private Collection<String> acceptedStrings;
     private Collection<Object> acceptedObjects;
     private CountDownLatch oneWayLatch;
@@ -46,7 +48,7 @@
     }
     
     /** {@inheritDoc}*/
-    public void acceptAny(String before, Collection<org.jdom.Element> anything) {
+    public void acceptAny(String before, Collection<Document> anything) {
         acceptedString = before;
         acceptedCollection = anything;
         if (oneWayLatch != null) {
@@ -57,7 +59,7 @@
     /**
      * @return Returns the acceptedCollection.
      */
-    public Collection<org.jdom.Element> getAcceptedCollection() {
+    public Collection<Document> getAcceptedCollection() {
         return acceptedCollection;
     }
 

Modified: cxf/trunk/rt/javascript/src/test/resources/AegisBeans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/src/test/resources/AegisBeans.xml?rev=732168&r1=732167&r2=732168&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/src/test/resources/AegisBeans.xml (original)
+++ cxf/trunk/rt/javascript/src/test/resources/AegisBeans.xml Tue Jan  6 15:12:26 2009
@@ -44,11 +44,6 @@
 		<simple:dataBinding>
 			<bean
 				class="org.apache.cxf.aegis.databinding.AegisDatabinding">
-				<property name="aegisContext">
-					<bean class="org.apache.cxf.aegis.AegisContext">
-						<property name="enableJDOMMappings" value="true"/>
-					</bean>
-				</property>
 			</bean>
 		</simple:dataBinding>
 		<simple:serviceFactory>

Modified: cxf/trunk/tools/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/pom.xml?rev=732168&r1=732167&r2=732168&view=diff
==============================================================================
--- cxf/trunk/tools/pom.xml (original)
+++ cxf/trunk/tools/pom.xml Tue Jan  6 15:12:26 2009
@@ -37,7 +37,6 @@
         <module>wsdlto</module>
         <module>javato</module>
         <module>corba</module>
-        <module>anttask</module>
     </modules>
 
     <scm>



Mime
View raw message