You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by da...@apache.org on 2004/06/14 07:02:09 UTC
cvs commit: ws-axis/c/samples/client/doclitfault MathOps.cpp
damitha 2004/06/13 22:02:09
Modified: c/samples/client/doclitfault MathOps.cpp
Log:
(null)
Revision Changes Path
1.6 +9 -9 ws-axis/c/samples/client/doclitfault/MathOps.cpp
Index: MathOps.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/samples/client/doclitfault/MathOps.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- MathOps.cpp 13 Jun 2004 10:40:52 -0000 1.5
+++ MathOps.cpp 14 Jun 2004 05:02:09 -0000 1.6
@@ -56,6 +56,8 @@
Ret = m_pCall->getElementAsInt("divReturn", 0);
}
}
+ m_pCall->unInitialize();
+ return Ret;
}
catch(AxisException& e)
{
@@ -64,18 +66,13 @@
{
throw;
}
- else if(AXIS_SUCCESS == m_pCall->checkFault("Fault",
+ if(AXIS_SUCCESS == m_pCall->checkFault("Fault",
"http://localhost/axis/MathOps/types")) //Exception handling code goes here
{
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("DivByZeroFault", cFaultstring))
{
if(AXIS_SUCCESS == m_pCall->checkFault("faultdetail",
"http://localhost/axis/MathOps/types"))
@@ -97,12 +94,15 @@
throw AxisDivByZeroException(pFaultDetail);
}
}
+ else
+ {
+ cFaultdetail = m_pCall->getElementAsString("faultdetail", 0);
+ throw AxisException(cFaultdetail);
+ }
}
else throw;
}
- m_pCall->unInitialize();
- return Ret;
}
int MathOps::getFaultDetail(char** ppcDetail)