You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Dimuthu Gamage (JIRA)" <ji...@apache.org> on 2007/12/19 19:20:43 UTC
[jira] Commented: (AXIS2C-846) Bug in stub generated parsing
response with array of ints
[ https://issues.apache.org/jira/browse/AXIS2C-846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553421 ]
Dimuthu Gamage commented on AXIS2C-846:
---------------------------------------
Oops!, There is a bug in the template just for long type. :(
Now the above code segment looks like,
<xsl:when test="$nativePropertyType='long' or $nativePropertyType='unsigned long'">
text_value = axiom_element_get_text(current_element, env, current_node); /* we have missed this */
if(text_value != NULL)
{
/* we keeps long in arrays from their pointers */
text_value = axiom_element_get_text(current_element, env, current_node);
element = AXIS2_MALLOC(env-> allocator, sizeof(long));
(*(<xsl:value-of select="$nativePropertyType"/>*)element) = atol(text_value);
axutil_array_list_add_at(arr_list, env, i, element);
}
I noticed similar places in the code and fixed.
We have test cases for all the simple types, but not for all the simple types arrays. :(
> Bug in stub generated parsing response with array of ints
> ----------------------------------------------------------
>
> Key: AXIS2C-846
> URL: https://issues.apache.org/jira/browse/AXIS2C-846
> Project: Axis2-C
> Issue Type: Bug
> Components: code generation
> Affects Versions: Current (Nightly)
> Environment: Linux
> Reporter: Antonio Chiurla
>
> Parsing a response wich conatains an array of ints,
> the array is not populated with values contained in SOAP response because the generated stub
> test if text_value is different from NULL before to get text of element.
> In my investigations I found a problem in file: modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl
> I think is sufficient the following patch at line 1483:
> <xsl:when test="$nativePropertyType='long' or $nativePropertyType='unsigned long'">
> + text_value = axiom_element_get_text(current_element, env, current_node);
> if(text_value != NULL)
> {
> /* we keeps long in arrays from their pointers */
> - text_value = axiom_element_get_text(current_element, env, current_node);
> element = AXIS2_MALLOC(env-> allocator, sizeof(long));
> (*(<xsl:value-of select="$nativePropertyType"/>*)element) = atol(text_value);
> axutil_array_list_add_at(arr_list, env, i, element);
> }
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org