You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Janusz Pulit (JIRA)" <ji...@apache.org> on 2011/04/13 16:46:05 UTC

[jira] [Created] (AXIS2-5003) WSDL2C generates improper code

WSDL2C generates improper code 
-------------------------------

                 Key: AXIS2-5003
                 URL: https://issues.apache.org/jira/browse/AXIS2-5003
             Project: Axis2
          Issue Type: Bug
          Components: codegen
    Affects Versions: 1.5.4
            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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org