Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-1548

WSDL2C generates improper code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • code generation
    • None

    Description

      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)

      Attachments

        Activity

          People

            Unassigned Unassigned
            progjohn Janusz Pulit
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: