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 "Bill Blough (Jira)" <ji...@apache.org> on 2020/04/07 16:56:00 UTC

[jira] [Updated] (AXIS2C-1402) AXIS2_PARAM_CHECK overwrite previously set error status

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

Bill Blough updated AXIS2C-1402:
--------------------------------
    Fix Version/s:     (was: 1.7.0)

> AXIS2_PARAM_CHECK overwrite previously set error status
> -------------------------------------------------------
>
>                 Key: AXIS2C-1402
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1402
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: core/engine
>    Affects Versions: 1.6.0
>            Reporter: Selvaratnam Uthaiyashankar
>            Assignee: Selvaratnam Uthaiyashankar
>            Priority: Major
>         Attachments: axis2_param_check.patch
>
>
> When checking AXIS2_PARAM_CHECK, if it is success, it overwrites STATUS_CODE by setting AXIS2_ERROR_SET_STATUS_CODE(error, AXIS2_SUCCESS); 
> check the macro definition:
> #define AXIS2_PARAM_CHECK(error, object, error_return)                  \
>     if (!object)                                                        \
>     {                                                                   \
>         AXIS2_ERROR_SET_ERROR_NUMBER(error, AXIS2_ERROR_INVALID_NULL_PARAM); \
>         AXIS2_ERROR_SET_STATUS_CODE(error, AXIS2_FAILURE);              \
>         return error_return;                                            \
>     }                                                                   \
>     else                                                                \
>     {                                                                   \
>         AXIS2_ERROR_SET_STATUS_CODE(error, AXIS2_SUCCESS);              \
>     }
> Ideally, if PARAM_CHECK is success, it should not touch error status code. 
> This macro is a problem when sending soap faults from generated code. To send faults from generated code, we have to set the error status inside service logic and it will be checked by the engine to create soap fault. However, after setting error status, there are several generated codes doing AXIS2_PARAM_CHECK and hence overwriting the status code. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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