axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r711389 - in /webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding: typemapping/SimpleTypeMapper.java utils/BeanUtil.java
Date Tue, 04 Nov 2008 20:43:22 GMT
Author: deepal
Date: Tue Nov  4 12:43:21 2008
New Revision: 711389

URL: http://svn.apache.org/viewvc?rev=711389&view=rev
Log:
applying the patch in AXIS2-4121

Modified:
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java?rev=711389&r1=711388&r2=711389&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
(original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
Tue Nov  4 12:43:21 2008
@@ -30,11 +30,7 @@
 import javax.activation.DataHandler;
 import javax.xml.namespace.QName;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.TimeZone;
+import java.util.*;
 
 public class SimpleTypeMapper {
 
@@ -161,6 +157,18 @@
         return list;
     }
 
+    public static HashSet getHashSet(OMElement element, String localName) {
+        Iterator childitr = element.getChildrenWithName(new QName(localName));
+        final HashSet list = new HashSet();
+        while (childitr.hasNext()) {
+            OMElement o = (OMElement) childitr.next();
+            list.add(o.getText());
+        }
+        return list;
+    }
+
+
+    
     public static DataHandler getDataHandler(OMElement element) {
         OMNode node = element.getFirstOMChild();
         if (node instanceof OMText) {
@@ -199,6 +207,11 @@
        return obj.isAssignableFrom(DataHandler.class);
     }
 
+    public static boolean isHashSet(Class obj) {
+        return java.util.HashSet.class.isAssignableFrom(obj);
+    }
+
+
     public static boolean isCollection(Class obj) {
         return java.util.Collection.class.isAssignableFrom(obj);
     }

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=711389&r1=711388&r2=711389&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
(original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
Tue Nov  4 12:43:21 2008
@@ -400,6 +400,9 @@
                         } else {
                             if (SimpleTypeMapper.isSimpleType(parameters)) {
                                 partObj = SimpleTypeMapper.getSimpleTypeObject(parameters,
parts);
+                            }    else if (SimpleTypeMapper.isHashSet(parameters)) {
+                                partObj = SimpleTypeMapper.getHashSet((OMElement)
+                                        parts.getParent(), prty.getName());
                             } else if (SimpleTypeMapper.isCollection(parameters)) {
                                 partObj = SimpleTypeMapper.getArrayList((OMElement)
                                         parts.getParent(), prty.getName());



Mime
View raw message