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 Nadir Amra <am...@us.ibm.com> on 2006/05/23 03:18:34 UTC

Soap Fault handling bug?

I am looking at how fault handling is done, and I see that we generate 
code like the following (using FaultMappingDoc test case) when the 
CmplxFaultName does not match:

                        else
                        {
                                const char *detail = 
pSoapFault->getSimpleFaultDetail();
                                bool deleteDetail=false;

                                if (NULL==detail || 0==strlen(detail))
                                {
 detail=m_pCall->getFaultAsXMLString();

                                        if (NULL==detail)
                                                detail="";
                                        else
                                                deleteDetail=true;
                                }

                                OtherFaultException 
ofe(pSoapFault->getFaultcode(),
                                        pSoapFault->getFaultstring(), 
pSoapFault->getFaultactor(),
                                        detail, iExceptionCode);

                                if (deleteDetail && NULL!=detail)
                                        Axis::AxisDelete( (void *) 
const_cast<char*>(detail), XSD_STRING);

                                m_pCall->unInitialize();
                                delete pSoapFault;
                                throw ofe;
                        }

My question is whether the call to AxisDelete is a bug, since from what I 
can tell getSimpleFaultDetail() does not return a new pointer.

Nadir K. Amra


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


Re: Soap Fault handling bug?

Posted by Nadir Amra <am...@us.ibm.com>.
oops, never mind...must be working too hard.  I read the code wrong.  No 
bug.

Nadir K. Amra


Nadir Amra/Rochester/IBM@IBMUS wrote on 05/22/2006 08:18:34 PM:

> I am looking at how fault handling is done, and I see that we generate 
> code like the following (using FaultMappingDoc test case) when the 
> CmplxFaultName does not match:
> 
>                         else
>                         {
>                                 const char *detail = 
> pSoapFault->getSimpleFaultDetail();
>                                 bool deleteDetail=false;
> 
>                                 if (NULL==detail || 0==strlen(detail))
>                                 {
>  detail=m_pCall->getFaultAsXMLString();
> 
>                                         if (NULL==detail)
>                                                 detail="";
>                                         else
>                                                 deleteDetail=true;
>                                 }
> 
>                                 OtherFaultException 
> ofe(pSoapFault->getFaultcode(),
>                                         pSoapFault->getFaultstring(), 
> pSoapFault->getFaultactor(),
>                                         detail, iExceptionCode);
> 
>                                 if (deleteDetail && NULL!=detail)
>                                         Axis::AxisDelete( (void *) 
> const_cast<char*>(detail), XSD_STRING);
> 
>                                 m_pCall->unInitialize();
>                                 delete pSoapFault;
>                                 throw ofe;
>                         }
> 
> My question is whether the call to AxisDelete is a bug, since from what 
I 
> can tell getSimpleFaultDetail() does not return a new pointer.
> 
> Nadir K. Amra
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
> 


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