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

Dimuthu Gamage resolved AXIS2C-778.
-----------------------------------

    Resolution: Fixed

This if fixed in the latest svn, Now the generated code will be looks like,
            op_qname = axutil_qname_create(env,
                                        "simpleAdd" ,
                                        "http://ws.apache.org/axis2";,
                                        NULL);
            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 ( NULL == ret_node )
                    {
                        return NULL;
                    }
                    ret_val = adb_simpleAddResponse_create(env);

                    if(adb_simpleAddResponse_deserialize(ret_val, env, 
&ret_node ) == AXIS2_FAILURE)
                    {
                        if(ret_val != NULL)
                        {
                            adb_simpleAddResponse_free(ret_val, env);
                        }

                        AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "NULL 
returnted from the simpleAddResponse_deserialize: "
                                                                "This should be 
due to an invalid XML");
                        return NULL;
                    }
                    return ret_val;


Thanks for pointing out this

> Generated stubs do not check status returned by response deserialize methods
> ----------------------------------------------------------------------------
>
>                 Key: AXIS2C-778
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-778
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: code generation
>            Reporter: Michael Mole
>
> The generated client stubs do not check the status returned by the response 
> deserialize methods.  Therefore there is no way to tell whether the 
> deserialize was successful.
> For example, here is an excerpt from one of the stub methods from the 
> Calculator example.
>             op_qname = axutil_qname_create(env,
>                                         "add" ,
>                                         "http://localhost/axis/Calculator";,
>                                         NULL);
>             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 ( NULL == ret_node )
>                     {
>                         return NULL;
>                     }
>                     ret_val = adb_addResponse_create(env);
>                     adb_addResponse_deserialize(ret_val, env, ret_node );  
> /////////// return status is not handled here
>                     return ret_val;
>                 
>         }
> If adb_addResponse_deserialize fails, there should be some way of notifying 
> the caller.  Perhaps the function should try to free the ret_val and return 
> NULL.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to