axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Chinthaka Suriarachchi (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AXIS2-2839) c-server stubs: memset() missing
Date Tue, 26 Jun 2007 11:00:26 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-2839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Amila Chinthaka Suriarachchi resolved AXIS2-2839.
-------------------------------------------------

    Resolution: Invalid

please report this issue at http://ws.apache.org/axis2/c/

> c-server stubs: memset() missing
> --------------------------------
>
>                 Key: AXIS2-2839
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2839
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: codegen
>         Environment: Apache Axis2 SNAPSHOT build May 16th, 2007,
> Linux
>            Reporter: Florian Steinborn
>            Assignee: Amila Chinthaka Suriarachchi
>
> I guess I found a problem in generated sources. I try to get in touch with Axis and play
around with all the things... I have a service that returns an array of structures that contain
all possible datatypes - also float and double.
>  
> I used this class for generating the wsdl:
>  
>  
> public class Dat{
>     public long         l;
>     public short        s;
>     public int          i;
>     public String       str;
>     public float        fl;
>     public double       dl;
> }
>  
> The generated wsdl shows
>  
> <xs:element name="Dat" type="ns:Dat" />
> <xs:complexType name="Dat">
> <xs:sequence>
> <xs:element name="dl" type="xs:double" />
> <xs:element name="fl" type="xs:float" />
> <xs:element name="i" type="xs:int" />
> <xs:element name="str" nillable="true" type="xs:string" />
> <xs:element name="l" type="xs:long" />
> <xs:element name="s" type="xs:short" />
> </xs:sequence>
> </xs:complexType>
>  
> When you generate C-Server stubs the constructor function
> shows:
>  
> AXIS2_EXTERN axis2_Dat_t* AXIS2_CALL
> axis2_Dat_create(
>     const axutil_env_t *env )
> {
>     axis2_Dat_t *Dat = NULL;
>  
>     AXIS2_ENV_CHECK(env, NULL);
>  
>     Dat = (axis2_Dat_t *) AXIS2_MALLOC(env->
>         allocator, sizeof(axis2_Dat_t));
>  
>     /* *********** missing ***********
>      * memset( Dat, 0, sizeof(axis2_Dat_t));
>      * ********************************
>      */
>  
>     if(NULL == Dat)
>     {
>         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
>         return NULL;
>     }
>     return Dat;
> }
>  
> For more safety it would be desirable if the generation would add the memset() call.


-- 
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-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message