axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ros...@apache.org
Subject cvs commit: ws-axis/c/samples/client/doclitfault MathOpsDL_AxisClientException.cpp
Date Fri, 03 Dec 2004 11:05:51 GMT
roshan      2004/12/03 03:05:50

  Modified:    c/samples/client/doclitfault
                        MathOpsDL_AxisClientException.cpp
  Log:
  added the code to the MathOpsDL_AxisClientException::processException
  
  Revision  Changes    Path
  1.2       +42 -0     ws-axis/c/samples/client/doclitfault/MathOpsDL_AxisClientException.cpp
  
  Index: MathOpsDL_AxisClientException.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/client/doclitfault/MathOpsDL_AxisClientException.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MathOpsDL_AxisClientException.cpp	2 Dec 2004 08:33:13 -0000	1.1
  +++ MathOpsDL_AxisClientException.cpp	3 Dec 2004 11:05:50 -0000	1.2
  @@ -58,6 +58,48 @@
   void MathOpsDL_AxisClientException::processException (ISoapFault* pFault)
   {
   	/*User can do something like deserializing the struct into a string*/
  +        /*User can do something like deserializing the struct into a string*/
  +        const char* pcCmplxFaultName;
  +	const char* pcDetail;
  +        if(pFault)
  +        {
  +            m_sMessage = "Fault Code:";
  +            m_sMessage = pFault->getFaultcode();
  +            m_sMessage += "\n";
  +            m_sMessage += "Fault String:";
  +            m_sMessage += pFault->getFaultstring();
  +            m_sMessage += "\n";
  +            m_sMessage += "Fault Actor:";
  +            m_sMessage += pFault->getFaultactor();
  +            m_sMessage += "\n";
  +
  +
  +            pcDetail = pFault->getSimpleFaultDetail().c_str();
  +	    if(NULL != pcDetail, 0 != strcmp("", pcDetail))
  +                m_sMessage += pcDetail;
  +	    else
  +            {
  +                pcCmplxFaultName = pFault->getCmplxFaultObjectName().c_str();
  +		//printf("pcCmplxFaultName:%s\n", pcCmplxFaultName);
  +            }
  +            if(0 == strcmp("DivByZero", pcCmplxFaultName))
  +            {
  +                DivByZeroStruct* pFaultDetail = NULL;
  +                pFaultDetail = (DivByZeroStruct*)pFault->
  +                    getCmplxFaultObject();
  +
  +                char* carrTempBuff =new char[4 * sizeof(char)];
  +                sprintf(carrTempBuff, "%d", pFaultDetail->varInt);
  +                m_sMessage += string(carrTempBuff);
  +                m_sMessage += "\n";
  +
  +                sprintf(carrTempBuff, "%f", pFaultDetail->varFloat);
  +                m_sMessage += string(carrTempBuff);
  +                m_sMessage += "\n";
  +
  +                m_sMessage += pFaultDetail->varString;
  +            }
  +        }
   }
   
   void MathOpsDL_AxisClientException::processException(exception* e)
  
  
  

Mime
View raw message