Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.6.0
-
None
Description
I used axis2-1.6.1 to generate code, and the generated code crashed. In the core dump, I found that element_qname in the deserialization code is NULL but is used later to compare the qname.
Below is a patch that I used to get around this issue (the line number may off as I applied other patches),
— ./modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl 2012-01-12 13:56:41.000000000 -0500
+++ ./modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl 2012-01-12 13:58:16.000000000 -0500
@@ -2105,15 +2105,20 @@
is_early_node_valid = AXIS2_FALSE;
continue;
}
- <xsl:if test="not(@any)">
+ <xsl:choose>
+ <xsl:when test="not(@any)">
current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
qname = axiom_element_get_qname(current_element, env, current_node);
if (<xsl:if test="@ours"><xsl:value-of select="substring-before(@type, '_t*')"/>_is_particle() || </xsl:if> <!-- is particle test should be done here -->
(current_node && current_element && (axutil_qname_equals(element_qname, env, qname)<xsl:if test="not(@nsuri) or @nsuri=''"> || !axutil_strcmp("<xsl:value-of select="$propertyName"/>", axiom_element_get_localname(current_element, env))</xsl:if>)))
{
- </xsl:if>
if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname)<xsl:if test="not(@nsuri) or @nsuri=''"> || !axutil_strcmp("<xsl:value-of select="$propertyName"/>", axiom_element_get_localname(current_element, env))</xsl:if>))
+ </xsl:when>
+ <xsl:otherwise>
+ if( current_node && current_element)
+ </xsl:otherwise>
+ </xsl:choose> { is_early_node_valid = AXIS2_TRUE; }