axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ami...@apache.org
Subject svn commit: r505175 - in /webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding: types/Union.java utils/BeanUtil.java
Date Fri, 09 Feb 2007 04:40:42 GMT
Author: amilas
Date: Thu Feb  8 20:40:41 2007
New Revision: 505175

URL: http://svn.apache.org/viewvc?view=rev&rev=505175
Log:
fixed some bugs. change the namespace prefix to s

Modified:
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Union.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/types/Union.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Union.java?view=diff&rev=505175&r1=505174&r2=505175
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Union.java
(original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Union.java
Thu Feb  8 20:40:41 2007
@@ -16,6 +16,8 @@
 package org.apache.axis2.databinding.types;
 
 
+import org.apache.axis2.databinding.utils.ConverterUtil;
+
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.namespace.QName;
@@ -55,14 +57,14 @@
         String value = xmlStreamReader.getElementText();
         if ("string".equals(type)) {
             setObject(value);
-        } else if ("int".equals(type)) {
+        } else if ("int".equals(type) || "integer".equals(type)) {
             setObject(new Integer(value));
         } else if ("boolean".equals(type)) {
             setObject(new Boolean(value));
         } else if ("anyURI".equals(type)) {
             setObject(new URI(value));
         } else if ("date".equals(type)) {
-            setObject(new Date(value));
+            setObject(ConverterUtil.convertToDate(value));
         } else if ("QName".equals(type)) {
             if (value.indexOf(":") > 0) {
                 // i.e it has a name space
@@ -75,7 +77,15 @@
             }
 
         } else if ("datetime".equals(type)) {
-            //TODO:set correctly
+            setObject(ConverterUtil.convertToDateTime(value));
+        } else if ("time".equals(type)) {
+            setObject(ConverterUtil.convertToTime(value));
+        } else if ("float".equals(type)) {
+            setObject(new Float(value));
+        } else if ("long".equals(type)) {
+            setObject(new Long(value));
+        } else if ("dobule".equals(type)) {
+            setObject(new Double(value));
         } else {
             throw new RuntimeException("Object not found");
         }

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?view=diff&rev=505175&r1=505174&r2=505175
==============================================================================
--- 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
Thu Feb  8 20:40:41 2007
@@ -697,7 +697,7 @@
      * @deprecated Please use getUniquePrefix
      */
     public static String getUniquePrifix() {
-        return "ns" + nsCount++;
+        return "s" + nsCount++;
     }
 
     /**
@@ -706,8 +706,10 @@
      * @return unique prefix
      */
     public static String getUniquePrefix() {
-        return "ns" + nsCount++;
+        return "s" + nsCount++;
     }
+
+    
 
     /**
      * JAM convert first name of an attribute into UpperCase as an example



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message