axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject cvs commit: ws-axis/c/samples/client/rpcfault MathOps.cpp
Date Tue, 08 Jun 2004 05:22:53 GMT
damitha     2004/06/07 22:22:53

  Modified:    c/samples/client/rpcfault MathOps.cpp
  Log:
  
  
  Revision  Changes    Path
  1.9       +7 -7      ws-axis/c/samples/client/rpcfault/MathOps.cpp
  
  Index: MathOps.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/client/rpcfault/MathOps.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- MathOps.cpp	31 May 2004 03:47:49 -0000	1.8
  +++ MathOps.cpp	8 Jun 2004 05:22:53 -0000	1.9
  @@ -74,12 +74,7 @@
               cFaultcode = m_pCall->getElementAsString("faultcode", 0);
               cFaultstring = m_pCall->getElementAsString("faultstring", 0); 
               cFaultactor = m_pCall->getElementAsString("faultactor", 0);
  -            if(0 != strcmp("service_exception", cFaultstring))
  -            {
  -                cFaultdetail = m_pCall->getElementAsString("faultdetail", 0);
  -                throw AxisException(cFaultdetail);
  -            }
  -            else
  +            if(0 == strcmp("SOAPStructFault", cFaultstring))
               {
                   if(AXIS_SUCCESS == m_pCall->checkFault("faultdetail",
                       "http://localhost/axis/MathOps"))
  @@ -90,9 +85,9 @@
                           (void*) Axis_Create_SOAPStructFault, 
                           (void*) Axis_Delete_SOAPStructFault,"faultstruct", 0);
   
  +                    /*start user code*/
                       char* temp = pFaultDetail->varString;
                       printf("%s\n", temp);
  -                    /*start user code*/
                       printf("faultcode:%s\n", cFaultcode);
                       printf("faultstring:%s\n", cFaultstring);
                       printf("faultactor:%s\n", cFaultactor);
  @@ -100,6 +95,11 @@
                       m_pCall->unInitialize();
                       throw AxisDivByZeroException(pFaultDetail);
                   }
  +            }
  +            else//fault detail consists of a simple string
  +            {
  +                cFaultdetail = m_pCall->getElementAsString("faultdetail", 0);
  +                throw AxisException(cFaultdetail);
               }
           }
           else throw;
  
  
  

Mime
View raw message