Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 93394 invoked from network); 6 Jul 2004 15:17:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Jul 2004 15:17:50 -0000 Received: (qmail 61249 invoked by uid 500); 6 Jul 2004 14:58:43 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 61107 invoked by uid 500); 6 Jul 2004 14:58:41 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 60968 invoked by uid 99); 6 Jul 2004 14:58:39 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Tue, 06 Jul 2004 07:58:38 -0700 Received: (qmail 46411 invoked by uid 1683); 6 Jul 2004 13:56:35 -0000 Date: 6 Jul 2004 13:56:35 -0000 Message-ID: <20040706135635.46410.qmail@minotaur.apache.org> From: damitha@apache.org To: ws-axis-cvs@apache.org Subject: cvs commit: ws-axis/c/tests/client/threadSafe/gen_src AxisClientException.cpp AxisClientException.h X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N damitha 2004/07/06 06:56:35 Added: c/tests/client/threadSafe/gen_src AxisClientException.cpp AxisClientException.h Log: (null) Revision Changes Path 1.1 ws-axis/c/tests/client/threadSafe/gen_src/AxisClientException.cpp Index: AxisClientException.cpp =================================================================== /* * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws) * This file contains implementations of an Exception class of the web service. */ #include "AxisClientException.h" //#include AxisClientException::AxisClientException() { /* This only serves the pupose of indicating that the * service has thrown an excpetion */ m_iExceptionCode = AXISC_SERVICE_THROWN_EXCEPTION; processException(m_iExceptionCode); } AxisClientException::AxisClientException(ISoapFault* pFault) { m_iExceptionCode = AXISC_SERVICE_THROWN_EXCEPTION; processException(pFault);} AxisClientException::AxisClientException(int iExceptionCode) { m_iExceptionCode = iExceptionCode; processException (iExceptionCode); } AxisClientException::AxisClientException(exception* e) { processException (e); } AxisClientException::AxisClientException(exception* e,int iExceptionCode) { processException (e, iExceptionCode); } AxisClientException::~AxisClientException() throw () { m_sMessage =""; } void AxisClientException:: processException(exception* e, int iExceptionCode) { m_sMessage = getMessage (e) + getMessage (iExceptionCode); } void AxisClientException::processException (ISoapFault* pFault) { /*User can do something like deserializing the struct into a string*/ 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"; m_sMessage = "Fault Detail:"; m_sMessage += pFault->getSimpleFaultDetail(); m_sMessage += "\n"; } void AxisClientException::processException(exception* e) { m_sMessage = getMessage (e); } void AxisClientException::processException(int iExceptionCode) { m_sMessage = getMessage (iExceptionCode); } const string AxisClientException::getMessage (exception* objException) { string sMessage = objException->what(); return sMessage; } const string AxisClientException::getMessage (int iExceptionCode) { string sMessage; switch(iExceptionCode) { case AXISC_SERVICE_THROWN_EXCEPTION: sMessage = "A service has thrown an exception. see detail"; break; default: sMessage = "Unknown Exception has occured"; } return sMessage; } const char* AxisClientException::what() throw () { return m_sMessage.c_str (); } const int AxisClientException::getExceptionCode(){ return m_iExceptionCode; } 1.1 ws-axis/c/tests/client/threadSafe/gen_src/AxisClientException.h Index: AxisClientException.h =================================================================== /* * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws) * This file contains an Exception class of the web service. */ #if !defined(__AXISCLIENTEXCEPTION_EXCEPTION_H__INCLUDED_) #define __AXISCLIENTEXCEPTION_EXCEPTION_H__INCLUDED_ #include #include #include #include using namespace std; class AxisClientException: public AxisException { public: AxisClientException(); AxisClientException(ISoapFault* pFault); AxisClientException(int iExceptionCode); AxisClientException(exception* e); AxisClientException(exception* e, int iExceptionCode); virtual ~AxisClientException() throw(); const char* what() throw(); const int getExceptionCode(); const string getMessage(exception* e); const string getMessage(int iExceptionCode); private: void processException(exception* e); void processException(ISoapFault* pFault); void processException(exception* e, int iExceptionCode); void processException(int iExceptionCode); string m_sMessage; int m_iExceptionCode; }; #endif /* !defined(__AXISCLIENTEXCEPTION_EXCEPTION_H__INCLUDED_)*/