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

AXIS2_PARAM_CHECK overwrite previously set error status

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 1.6.0
    • None
    • core/engine
    • None

    Description

      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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            shankar Selvaratnam Uthaiyashankar
            shankar Selvaratnam Uthaiyashankar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment