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 "Andreas Veithen (JIRA)" <ji...@apache.org> on 2011/05/29 12:56:47 UTC

[jira] [Moved] (AXIS2C-1548) WSDL2C generates improper code

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

Andreas Veithen moved AXIS2-5003 to AXIS2C-1548:
------------------------------------------------

          Component/s:     (was: codegen)
    Affects Version/s:     (was: 1.5.4)
                  Key: AXIS2C-1548  (was: AXIS2-5003)
              Project: Axis2-C  (was: Axis2)

> WSDL2C generates improper code 
> -------------------------------
>
>                 Key: AXIS2C-1548
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1548
>             Project: Axis2-C
>          Issue Type: Bug
>            Reporter: Janusz Pulit
>            Priority: Minor
>
> Stub generated by WSDL2C contains bug, in generated code we can see something like: 
>  
>   soap_act = axis2_options_get_soap_action( options, env );
>             
>             if (NULL == soap_act)
>             {
>               is_soap_act_set = AXIS2_FALSE;
>               soap_action = "http://dummy/SampleService/dummyRequest";
>               soap_act = axutil_string_create(env, "http://dummy/SampleService/dummyRequest");
>               axis2_options_set_soap_action(options, env, soap_act);    
>             }
>             
>             axis2_options_set_soap_version(options, env, AXIOM_SOAP11);
>              
>             ret_node =  axis2_svc_client_send_receive_with_op_qname( svc_client, env, op_qname, payload);
>             if (!is_soap_act_set)
>             {
>               axis2_options_set_soap_action(options, env, NULL);    
>               axis2_options_set_action( options, env, NULL);
>             }
> 	
>             if(soap_act)
>             {
>               axutil_string_free(soap_act, env); 
>             }
> The problem is that soap_act string should be freed only in case if it wasn't retrieved from options, and was created with axutil_string_create() call
> If soap_action parameter will be set in options, existing implementation will retrieve that string with axis2_options_get_soap_action() call, and then free it, each next subsequent call will cause crash (because it will try to release already freed memory)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org