cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r592168 - in /incubator/cxf/trunk/rt/databinding/aegis/src: main/java/org/apache/cxf/aegis/type/ test/java/org/apache/cxf/aegis/type/array/
Date Mon, 05 Nov 2007 22:27:13 GMT
Author: dkulp
Date: Mon Nov  5 14:27:12 2007
New Revision: 592168

URL: http://svn.apache.org/viewvc?rev=592168&view=rev
Log:
Fix issue of Aegis generating "ArrayOf" types into the schema namespace which is invalid

Modified:
    incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayService.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayServiceBean.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayTest.java

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java?rev=592168&r1=592167&r2=592168&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
Mon Nov  5 14:27:12 2007
@@ -34,6 +34,7 @@
 import org.apache.cxf.aegis.type.collection.MapType;
 import org.apache.cxf.aegis.util.NamespaceHelper;
 import org.apache.cxf.aegis.util.ServiceUtils;
+import org.apache.cxf.wsdl.WSDLConstants;
 
 /**
  * @author Hani Suleiman Date: Jun 14, 2005 Time: 11:59:57 PM
@@ -301,6 +302,9 @@
             ns = type.getSchemaType().getNamespaceURI();
         } else {
             ns = tm.getEncodingStyleURI();
+        }
+        if (WSDLConstants.NS_SCHEMA_XSD.equals(ns)) {
+            ns = "http://cxf.apache.org/arrays";
         }
 
         String first = type.getSchemaType().getLocalPart().substring(0, 1);

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayService.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayService.java?rev=592168&r1=592167&r2=592168&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayService.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayService.java
Mon Nov  5 14:27:12 2007
@@ -32,5 +32,20 @@
   
     @WebMethod
     List<List<DuplicateArrayReturnItem>> lookupBatch(String indexid);
+    
+    @WebMethod 
+    Foo<String> doFoo(Foo<Integer> foo);
+    
+    
+    static class Foo<T> {
+        List<T> list;
+        
+        public void setList(List<T> l) {
+            list = l;
+        }
+        public List<T> getList() {
+            return list;
+        }
+    }
 
 }

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayServiceBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayServiceBean.java?rev=592168&r1=592167&r2=592168&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayServiceBean.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayServiceBean.java
Mon Nov  5 14:27:12 2007
@@ -35,5 +35,11 @@
     public List<List<DuplicateArrayReturnItem>> lookupBatch(String indexid) {
         return null;
     }
+    
+    @WebMethod
+    public Foo<String> doFoo(Foo<Integer> foo) {
+        return null;
+    }
+
 
 }

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayTest.java?rev=592168&r1=592167&r2=592168&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayTest.java
Mon Nov  5 14:27:12 2007
@@ -22,6 +22,8 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import org.w3c.dom.Document;
+
 import org.apache.cxf.aegis.AbstractAegisTest;
 import org.apache.cxf.aegis.databinding.AegisDatabinding;
 import org.apache.cxf.aegis.type.Configuration;
@@ -53,8 +55,11 @@
         serviceFactory.setServiceBean(new DuplicateArrayServiceBean());
         serviceFactory.setServiceClass(DuplicateArrayService.class);
         serviceFactory.setProperties(props);
-        serviceFactory.create();
-
+        Document doc = this.getWSDLDocument(serviceFactory.create());
+        this.assertValid("//wsdl:definitions/wsdl:types"
+                         + "/xsd:schema[@targetNamespace='http://cxf.apache.org/arrays']"
+                         + "/xsd:complexType[@name='ArrayOfAnyType']",
+                         doc.getDocumentElement());
     }
 
 }



Mime
View raw message