You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2007/09/12 09:43:34 UTC

svn commit: r574824 - /webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl

Author: samisa
Date: Wed Sep 12 00:43:34 2007
New Revision: 574824

URL: http://svn.apache.org/viewvc?rev=574824&view=rev
Log:
Fixed the shallow copy problem. Now it makes a deep copy in case of xsd:string and ensure that it is freed also.


Modified:
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl?rev=574824&r1=574823&r2=574824&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl Wed Sep 12 00:43:34 2007
@@ -240,7 +240,7 @@
               </xsl:if>
 
               <!-- the following element can be inside array or independent one -->
-                 <xsl:if test="$nativePropertyType!='axis2_char_t*'">
+                 <!--xsl:if test="$nativePropertyType!='axis2_char_t*'"-->
               if( <xsl:value-of select="$justAttriName"/> != NULL)
               {
                  <!-- how to free all the ours things -->
@@ -294,7 +294,7 @@
                  <xsl:value-of select="$justAttriName"/> = NULL;
               }
 
-              </xsl:if>
+              <!--/xsl:if-->
               <!-- close tags arrays -->
               <xsl:if test="@isarray">
                     }
@@ -1945,7 +1945,14 @@
                       return AXIS2_FAILURE;
                   }
                 </xsl:if>
-                <xsl:value-of select="$name"/>-> attrib_<xsl:value-of select="$CName"/> = param_<xsl:value-of select="$CName"/>;
+                <xsl:choose>
+                    <xsl:when test="@type='axis2_char_t*'">
+                        <xsl:value-of select="$name"/>->attrib_<xsl:value-of select="$CName"/> = axutil_strdup(env, param_<xsl:value-of select="$CName"/>);
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="$name"/>->attrib_<xsl:value-of select="$CName"/> = param_<xsl:value-of select="$CName"/>;
+                    </xsl:otherwise>
+                </xsl:choose>
                 return AXIS2_SUCCESS;
              }
 



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