Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

AxisException.hpp

00001 /*
00002  *   Copyright 2003-2004 The Apache Software Foundation.
00003 // (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved
00004  *
00005  *   Licensed under the Apache License, Version 2.0 (the "License");
00006  *   you may not use this file except in compliance with the License.
00007  *   You may obtain a copy of the License at
00008  *
00009  *       http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  *   Unless required by applicable law or agreed to in writing, software
00012  *   distributed under the License is distributed on an "AS IS" BASIS,
00013  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *   See the License for the specific language governing permissions and
00015  *   limitations under the License.
00016  *
00017  *
00018  *
00019  */
00020 
00028 #ifndef __AXISEXCEPTION_H_OF_AXIS_INCLUDED_
00029 #define __AXISEXCEPTION_H_OF_AXIS_INCLUDED_
00030 
00031 #include <axis/GDefine.hpp>
00032 #include <string>
00033 #include <exception>
00034 #include <new>
00035 #include <typeinfo>
00036 #include <stdexcept>
00037 
00038 AXIS_CPP_NAMESPACE_START
00039 using namespace std;
00040 
00041 /*
00042  * The following enumeration is used to serve the Axis C++ codes for 
00043  * faults.
00044  */
00045 #define CLIENT_FAULT_OFFSET             0x0
00046 #define SERVER_FAULT_OFFSET             0x1000
00047 #define SOAP_FAULT_OFFSET               0x2000
00048 #define ENGINE_FAULT_OFFSET             0x3000
00049 #define WSDD_FAULT_OFFSET               0x4000
00050 #define TRANSPORT_FAULT_OFFSET  0x5000
00051 #define CONFIG_FAULT_OFFSET             0x6000
00052 #define AXISC_FAULT_OFFSET              0x7000
00053 
00054 typedef enum 
00055 {
00056     /*The notation used for naming these exceptions is as follows
00057      *CLIENT at the beginning means when this interpreted as a soap fault
00058      *    it's fault code is CLIENT
00059      *SERVER at the beginning means when this interpreted as a soap fault
00060      *    it's fault code is SERVER
00061      *SOAP that comes next to CLIENT/SERVER means this is a soap releated
00062      *    exception
00063      *ENGINE that comes next to CLIENT/SERVER means this is a axisc++ engine
00064      *    related exception
00065      *WSDD that comes next to CLIENT/SERVER means this is a wsdd releated
00066      *    exception
00067      *TRANSPORT that comes next to CLIENT/SERVER means this is a transport releated
00068      *    exception
00069      *CONFIG that comes next to CLIENT/SERVER means this is a axisc++ configuration
00070      *    related exception
00071          *AXISC ?
00072      */
00073         /* SOAP faults */
00074 /*0*/    SOAP_VERSION_MISMATCH, /* VersionMismatch faults */
00075 /*1*/    SOAP_MUST_UNDERSTAND,  /* MustUnderstand faults */
00076 
00077     /* Client faults */
00078 /*2*/    CLIENT_SOAP_MESSAGE_INCOMPLETE,
00079 /*3*/    CLIENT_SOAP_SOAP_ACTION_EMTPY,
00080 /*4*/    CLIENT_SOAP_SOAP_CONTENT_ERROR,
00081 /*5*/    CLIENT_SOAP_NO_SOAP_METHOD,
00082 /*6*/    CLIENT_SOAP_CONTENT_NOT_SOAP,
00083 /*7*/    CLIENT_WSDD_SERVICE_NOT_FOUND,
00084 /*8*/    CLIENT_WSDD_METHOD_NOT_ALLOWED,
00085 /*9*/    CLIENT_WSDD_PARA_TYPE_MISMATCH,
00086 /*10*/   CLIENT_ENGINE_CLIENT_HANDLER_FAILED,
00087 /*11*/   CLIENT_TRANSPORT_EXCEPTION,
00088 /*12*/   CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED,
00089 /*13*/   CLIENT_TRANSPORT_TYPE_MISMATCH,
00090 /*14*/   CLIENT_TRANSPORT_HAS_NO_UNSECURE_TRANSPORT_LAYER,
00091 /*15*/   CLIENT_TRANSPORT_HAS_NO_SECURE_TRANSPORT_LAYER,
00092 /*16*/   CLIENT_SSLCHANNEL_RECEPTION_EXCEPTION,
00093 /*17*/   CLIENT_SSLCHANNEL_SENDING_EXCEPTION,
00094 /*18*/   CLIENT_SSLCHANNEL_CHANNEL_INIT_ERROR,
00095 /*19*/   CLIENT_SSLCHANNEL_SOCKET_CREATE_ERROR,
00096 /*20*/   CLIENT_SSLCHANNEL_SOCKET_CONNECT_ERROR,
00097 /*21*/   CLIENT_SSLCHANNEL_INVALID_SOCKET_ERROR,
00098 /*22*/   CLIENT_SSLCHANNEL_CONTEXT_CREATE_ERROR,
00099 /*23*/   CLIENT_SSLCHANNEL_ERROR,
00100 
00101     /* Server faults */
00102 /*24*/    SERVER_ENGINE_EXCEPTION,
00103 /*25*/    SERVER_ENGINE_COULD_NOT_LOAD_SRV,
00104 /*26*/    SERVER_ENGINE_COULD_NOT_LOAD_HDL,
00105 /*27*/    SERVER_ENGINE_LOADING_TRANSPORT_FAILED,
00106 /*28*/    SERVER_ENGINE_LOADING_PARSER_FAILED,
00107 /*29*/    SERVER_ENGINE_HANDLER_FAILED,
00108 /*30*/    SERVER_ENGINE_WEBSERVICE_FAILED,
00109 /*31*/    SERVER_ENGINE_HANDLER_INIT_FAILED,
00110 /*32*/    SERVER_ENGINE_HANDLER_CREATION_FAILED,
00111 /*33*/    SERVER_ENGINE_LIBRARY_LOADING_FAILED,
00112 /*34*/    SERVER_ENGINE_HANDLER_NOT_LOADED,
00113 /*35*/    SERVER_ENGINE_HANDLER_BEING_USED,
00114 /*36*/    SERVER_ENGINE_GET_HANDLER_FAILED,
00115 /*37*/    SERVER_ENGINE_WRONG_HANDLER_TYPE,
00116 /*38*/    SERVER_CONFIG_EXCEPTION,
00117 /*39*/    SERVER_CONFIG_TRANSPORT_CONF_FAILED,
00118 /*40*/    SERVER_CONFIG_LIBRARY_PATH_EMPTY,
00119 /*41*/    SERVER_WSDD_FILE_NOT_FOUND,
00120 /*42*/    SERVER_WSDD_EXCEPTION,
00121 /*43*/    SERVER_WSDD_NO_HANDLERS_CONFIGURED,
00122 /*44*/    SERVER_SOAP_EXCEPTION,
00123 /*45*/    SERVER_TRANSPORT_EXCEPTION,
00124 /*46*/    SERVER_TRANSPORT_RECEPTION_EXCEPTION,
00125 /*47*/    SERVER_TRANSPORT_SENDING_EXCEPTION,
00126 /*48*/    SERVER_TRANSPORT_PROCESS_EXCEPTION,
00127 /*49*/    SERVER_TRANSPORT_UNKNOWN_HTTP_RESPONSE,
00128 /*50*/    SERVER_TRANSPORT_HTTP_EXCEPTION,
00129 /*51*/    SERVER_TRANSPORT_UNEXPECTED_STRING,
00130 /*52*/    SERVER_TRANSPORT_CHANNEL_INIT_ERROR,
00131 /*53*/    SERVER_TRANSPORT_SOCKET_CREATE_ERROR,
00132 /*54*/    SERVER_TRANSPORT_SOCKET_CONNECT_ERROR,
00133 /*55*/    SERVER_TRANSPORT_INVALID_SOCKET,
00134 /*56*/    SERVER_TRANSPORT_OUTPUT_STREAMING_ERROR,
00135 /*57*/    SERVER_TRANSPORT_INPUT_STREAMING_ERROR,
00136 /*58*/    SERVER_TRANSPORT_TIMEOUT_EXCEPTION,
00137 /*59*/    SERVER_TRANSPORT_TIMEOUT_EXPIRED,
00138 /*60*/    SERVER_TRANSPORT_LOADING_SSLCHANNEL_FAILED,
00139 /*61*/    SERVER_TRANSPORT_LOADING_CHANNEL_FAILED,
00140 /*62*/    SERVER_TRANSPORT_BUFFER_EMPTY,
00141 /*63*/    SERVER_PARSE_BUFFER_EMPTY,
00142 /*64*/    SERVER_PARSE_PARSER_FAILED, 
00143 /*65*/    SERVER_PARSE_TRANSPORT_FAILED,
00144 /*66*/    SERVER_TEST_EXCEPTION,
00145 /*67*/    SERVER_UNKNOWN_ERROR,
00146 /*68*/    SERVER_CLIENT_ENGINE_MISMATCH,
00147 
00148     /* AXIS C faults */
00149     /*Following exceptions are not releated to soap faults
00150      */
00151 /*60*/    AXISC_SERVICE_THROWN_EXCEPTION,
00152 /*70*/    AXISC_UNKNOWN_ELEMENT_EXCEPTION,
00153 /*71*/    AXISC_NODE_VALUE_MISMATCH_EXCEPTION,
00154 /*72*/    AXISC_READ_CONF_EXCEPTION,
00155 
00156     /*
00157      * This FAULT_LAST is not used as a fault code, but instead is used 
00158      * internaly in the code. Developers should not use this as a fault 
00159      * code.
00160      */
00161 /*73*/    FAULT_LAST 
00162 } AXISC_EXCEPTIONS;
00163 
00175 class STORAGE_CLASS_INFO AxisException :public exception
00176 {
00177 
00178 public:
00180     //AxisException(){};
00181 
00191     //AxisException(const int iExceptionCode);
00192 
00204     //AxisException(const int iExceptionCode, char* pcMessage);
00205 
00214     //AxisException(const exception* e);
00215 
00222     //AxisException(const exception* e, const int iExceptionCode);
00223     
00228     //AxisException(const char* pcMessage){m_sMessage = pcMessage;};
00229     
00231     virtual ~AxisException() throw(){};
00232 
00236     virtual const char* what() throw() = 0;
00237 
00247     virtual const int getExceptionCode() = 0;
00248 };
00249 
00250 AXIS_CPP_NAMESPACE_END
00251 
00252 #endif
00253 

Generated on Tue May 17 02:30:31 2005 for AxisC++ by doxygen1.2.18