Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.4 Final
    • 1.5 Alpha
    • Basic Architecture
    • None
    • All platforms

    Description

      The pointer returned to the SOAPFault object is never deallocated in the generated code in case of a fault. The pointer is returned by Call::checkFault() method and memory is allocated by SoapDeSerializer::checkForFault()

      Attachments

        Issue Links

          Activity

            Resolving this issue is a bit complex given that we pass the pointer to the SOAP fault object to the client exception constructor. Either we have to make the exception constructor do a deep copy of the fault object and delete the fault object before we throw the exception. Or alternatively we could pass the required values to the exception and delete the fault object before we throw the exception object.
            It is not a good idea to delete the SOAP fault from within the Exception destructor as of now, because we have a shallow copy of the SOAP fault inside the exception class.

            samisa Don Samisa Abeysinghe added a comment - Resolving this issue is a bit complex given that we pass the pointer to the SOAP fault object to the client exception constructor. Either we have to make the exception constructor do a deep copy of the fault object and delete the fault object before we throw the exception. Or alternatively we could pass the required values to the exception and delete the fault object before we throw the exception object. It is not a good idea to delete the SOAP fault from within the Exception destructor as of now, because we have a shallow copy of the SOAP fault inside the exception class.

            Here is a sample code segment of the generated code. Note that pSoapFault is passed to the Calculator_AxisClientException constructor. And Calculator_AxisClientException class does not clean up this pointer.

            catch(AxisException& e)
            {
            int iExceptionCode = e.getExceptionCode();
            if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)

            { throw Calculator_AxisClientException(e.what()); }

            => ISoapFault* pSoapFault = (ISoapFault*) m_pCall->checkFault("Fault","http://localhost/axis/Calculator" );
            if(pSoapFault)

            { m_pCall->unInitialize(); throw Calculator_AxisClientException(pSoapFault); }

            else throw;
            }

            samisa Don Samisa Abeysinghe added a comment - Here is a sample code segment of the generated code. Note that pSoapFault is passed to the Calculator_AxisClientException constructor. And Calculator_AxisClientException class does not clean up this pointer. catch(AxisException& e) { int iExceptionCode = e.getExceptionCode(); if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode) { throw Calculator_AxisClientException(e.what()); } => ISoapFault* pSoapFault = (ISoapFault*) m_pCall->checkFault("Fault","http://localhost/axis/Calculator" ); if(pSoapFault) { m_pCall->unInitialize(); throw Calculator_AxisClientException(pSoapFault); } else throw; }

            Memory leaks related to SOAPFault handling is a bit complex to solve. However the problem is trivial, allocated memory is not deallocated

            samisa Don Samisa Abeysinghe added a comment - Memory leaks related to SOAPFault handling is a bit complex to solve. However the problem is trivial, allocated memory is not deallocated

            This issue is invaalis because the SOAP fault exception model was changed with updates to the Exception class hierarcy. These updates were done by Mark.

            samisa Don Samisa Abeysinghe added a comment - This issue is invaalis because the SOAP fault exception model was changed with updates to the Exception class hierarcy. These updates were done by Mark.

            People

              Unassigned Unassigned
              samisa Don Samisa Abeysinghe
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: