Author: amilas Date: Tue Aug 2 09:01:27 2011 New Revision: 1153072 URL: http://svn.apache.org/viewvc?rev=1153072&view=rev Log: applying the patch for AXIS2-5105
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=1153072&r1=1153071&r2=1153072&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 Tue Aug 2 09:01:27 2011 @@ -2970,6 +2970,15 @@ nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); if (!"true".equals(nillableValue) && !"1".equals(nillableValue)){ </xsl:if> + + <!-- when the nillable = false in the element --> + <xsl:if test="not(@nillable)"> + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if ("true".equals(nillableValue) || "1".equals(nillableValue)){ + throw new org.apache.axis2.databinding.ADBException("The element: "+"<xsl:value-of select="$propertyName"/>" +" cannot be null"); + } + </xsl:if> + java.lang.String content = reader.getElementText(); <xsl:if test="not(enumFacet)"> <xsl:choose>