You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by am...@apache.org on 2010/12/27 08:55:23 UTC

svn commit: r1053017 - /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl

Author: amilas
Date: Mon Dec 27 07:55:23 2010
New Revision: 1053017

URL: http://svn.apache.org/viewvc?rev=1053017&view=rev
Log:
 fixed the issue AXIS2-3764

Modified:
    axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl

Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl?rev=1053017&r1=1053016&r2=1053017&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl (original)
+++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Mon Dec 27 07:55:23 2010
@@ -281,8 +281,8 @@
                                 public int hashCode() { return toString().hashCode();}
                                 public java.lang.String toString() {
                                 <xsl:choose>
-                                    <xsl:when test="@primitive">
-                                        return <xsl:value-of select="$varName"/> + "";
+                                    <xsl:when test="(@primitive) or ($shortTypeName = 'DateTime') or ($shortTypeName = 'Date') or ($shortTypeName = 'Time')">
+                                        return org.apache.axis2.databinding.utils.ConverterUtil.convertToString(<xsl:value-of select="$varName"/>);
                                     </xsl:when>
                                     <xsl:otherwise>
                                         return <xsl:value-of select="$varName"/>.toString();
@@ -530,8 +530,8 @@
 
                             public java.lang.String toString(){
                                 <xsl:choose>
-                                    <xsl:when test="@primitive">
-                                        return <xsl:value-of select="$varName"/> + "";
+                                    <xsl:when test="(@primitive) or ($shortTypeName = 'DateTime') or ($shortTypeName = 'Date') or ($shortTypeName = 'Time')">
+                                        return org.apache.axis2.databinding.utils.ConverterUtil.convertToString(<xsl:value-of select="$varName"/>);
                                     </xsl:when>
                                     <xsl:otherwise>
                                         return <xsl:value-of select="$varName"/>.toString();