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 di...@apache.org on 2008/06/10 05:25:10 UTC
svn commit: r665959 -
/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl
Author: dimuthu
Date: Mon Jun 9 20:25:10 2008
New Revision: 665959
URL: http://svn.apache.org/viewvc?rev=665959&view=rev
Log:
fix for https://issues.apache.org/jira/browse/AXIS2C-1159 , better patch
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=665959&r1=665958&r2=665959&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 Mon Jun 9 20:25:10 2008
@@ -4747,7 +4747,6 @@
<xsl:choose>
<xsl:when test="@type='unsigned short' or @type='unsigned char' or @type='unsigned int' or @type='uint64_t' or @type='short' or @type='char' or @type='int' or @type='float' or @type='double' or @type='int64_t' or @type='axis2_bool_t' or @type='axis2_byte_t'">
non_nil_exists = AXIS2_TRUE; /* no way to check for nill for each elements for primitive types */
- non_nil_count = axutil_array_list_size(<xsl:value-of select="$name"/>->property_<xsl:value-of select="$CName"/>, env);
</xsl:when>
<xsl:otherwise>
if(NULL != arg_<xsl:value-of select="$CName"/>)
@@ -4771,6 +4770,15 @@
}
}
}
+
+ <xsl:if test="not(@nillabe) and not(@minOccurs='0')"> <!-- if minOccurs=0 then no need to have error messages -->
+ if( non_nil_count < <xsl:value-of select="@minOccurs"/>)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Size of the array of <xsl:value-of select="$propertyName"/> is beinng set to be smaller than the specificed number of minOccurs(<xsl:value-of select="@minOccurs"/>)");
+ return AXIS2_FAILURE;
+ }
+ </xsl:if>
+
}
</xsl:otherwise>
</xsl:choose>
@@ -4782,13 +4790,6 @@
return AXIS2_FAILURE;
}
</xsl:if>
- <xsl:if test="not(@minOccurs='0')"> <!-- if minOccurs=0 then no need to have error messages -->
- if( non_nil_count < <xsl:value-of select="@minOccurs"/>)
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Size of the array of <xsl:value-of select="$propertyName"/> is beinng set to be smaller than the specificed number of minOccurs(<xsl:value-of select="@minOccurs"/>)");
- return AXIS2_FAILURE;
- }
- </xsl:if>
if(<xsl:value-of select="$name"/>->property_<xsl:value-of select="$CName"/> == NULL)
{