You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/09/02 18:32:50 UTC

svn commit: r691309 - in /cxf/branches/2.1.x-fixes: ./ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/ rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/

Author: dkulp
Date: Tue Sep  2 09:32:49 2008
New Revision: 691309

URL: http://svn.apache.org/viewvc?rev=691309&view=rev
Log:
Merged revisions 690067 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r690067 | bimargulies | 2008-08-28 21:32:37 -0400 (Thu, 28 Aug 2008) | 2 lines
  
  Fix CXF-1770.
........

Added:
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionServiceInterface.aegis.xml
      - copied unchanged from r690067, cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionServiceInterface.aegis.xml
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionServiceInterface.java
      - copied unchanged from r690067, cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionServiceInterface.java
Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/CollectionType.java
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest$CollectionService.aegis.xml
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep  2 09:32:49 2008
@@ -1 +1 @@
-/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924
+/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Sep  2 09:32:49 2008
@@ -1 +1 @@
-/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690638
+/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690638

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/CollectionType.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/CollectionType.java?rev=691309&r1=691308&r2=691309&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/CollectionType.java (original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/CollectionType.java Tue Sep  2 09:32:49 2008
@@ -24,6 +24,8 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
 import java.util.Vector;
 
 import org.apache.cxf.aegis.Context;
@@ -58,6 +60,8 @@
 
         if (getTypeClass().isAssignableFrom(List.class)) {
             values = new ArrayList();
+        } else if (getTypeClass().isAssignableFrom(SortedSet.class)) {
+            values = new TreeSet();
         } else if (getTypeClass().isAssignableFrom(Set.class)) {
             values = new HashSet();
         } else if (getTypeClass().isAssignableFrom(Vector.class)) {

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest$CollectionService.aegis.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest%24CollectionService.aegis.xml?rev=691309&r1=691308&r2=691309&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest$CollectionService.aegis.xml (original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest$CollectionService.aegis.xml Tue Sep  2 09:32:49 2008
@@ -6,5 +6,8 @@
 		<method name="takeDoubleList">
             <parameter index="0" mappedName="doublesList" componentType="java.lang.Double"/>
         </method> 
+        <method name="takeSortedStrings">
+        	<parameter index="0" mappedName="strings"/>
+        </method>
 	</mapping>
 </mappings>
\ No newline at end of file

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.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/CollectionTest.java?rev=691309&r1=691308&r2=691309&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java (original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java Tue Sep  2 09:32:49 2008
@@ -24,12 +24,16 @@
 import java.util.Collection;
 import java.util.List;
 import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
 
 import javax.xml.namespace.QName;
 
 import org.w3c.dom.Document;
 
 import org.apache.cxf.aegis.AbstractAegisTest;
+import org.apache.cxf.aegis.databinding.AegisDatabinding;
+import org.apache.cxf.aegis.databinding.XFireCompatibilityServiceConfiguration;
 import org.apache.cxf.aegis.type.DefaultTypeMapping;
 import org.apache.cxf.aegis.type.Type;
 import org.apache.cxf.aegis.type.TypeCreationOptions;
@@ -38,9 +42,12 @@
 import org.apache.cxf.aegis.type.java5.dto.DTOService;
 import org.apache.cxf.aegis.type.java5.dto.ObjectDTO;
 import org.apache.cxf.common.util.SOAPConstants;
+import org.apache.cxf.frontend.ClientProxyFactoryBean;
 import org.junit.Before;
 import org.junit.Test;
 
+
+
 public class CollectionTest extends AbstractAegisTest {
     private DefaultTypeMapping tm;
     private Java5TypeCreator creator;
@@ -203,25 +210,55 @@
                     doc);
         
     }
+    
+    @Test
+    public void testSortedSet() throws Exception {
+        createService(CollectionService.class, new CollectionService(), null);
+        
+        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
+        proxyFac.getServiceFactory().getServiceConfigurations().add(0, 
+                                                              new XFireCompatibilityServiceConfiguration());
+        proxyFac.setServiceClass(CollectionServiceInterface.class);
+        proxyFac.setDataBinding(new AegisDatabinding());
+        proxyFac.setAddress("local://CollectionService");
+        proxyFac.setBus(getBus());
+
+        CollectionServiceInterface csi = (CollectionServiceInterface)proxyFac.create();
+        SortedSet<String> strings = new TreeSet<String>();
+        strings.add("Able");
+        strings.add("Baker");
+        String first = csi.takeSortedStrings(strings);
+        assertEquals("Able", first);
+    }
 
-    public class CollectionService {
+    public class CollectionService implements CollectionServiceInterface {
         
+        /** {@inheritDoc}*/
         public Collection<String> getStrings() {
             return null;
         }
 
+        /** {@inheritDoc}*/
         public void setLongs(Collection<Long> longs) {
         }
 
+        /** {@inheritDoc}*/
         public Collection getUnannotatedStrings() {
             return null;
         }
 
+        /** {@inheritDoc}*/
         public Collection<Collection<String>> getStringCollections() {
             return null;
         }
         
+        /** {@inheritDoc}*/
         public void takeDoubleList(List<Double> doublesList) {
         }
+        
+        /** {@inheritDoc}*/
+        public String takeSortedStrings(SortedSet<String> strings) {
+            return strings.first();
+        }
     }
 }