Author: sagara
Date: Wed Feb 29 13:49:42 2012
New Revision: 1295105
URL: http://svn.apache.org/viewvc?rev=1295105&view=rev
Log:
Merged r1153072 to the 1.6 branch.
Modified:
axis/axis2/java/core/branches/1_6/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
Modified:
axis/axis2/java/core/branches/1_6/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl?rev=1295105&r1=1295104&r2=1295105&view=diff
==============================================================================
---
axis/axis2/java/core/branches/1_6/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
(original)
+++
axis/axis2/java/core/branches/1_6/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
Wed Feb 29 13:49:42 2012
@@ -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>