00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00027 #ifndef __AXISEXCEPTION_H_OF_AXIS_INCLUDED_
00028 #define __AXISEXCEPTION_H_OF_AXIS_INCLUDED_
00029
00030 #include <axis/server/GDefine.h>
00031
00032 #include <string>
00033 #include <exception>
00034 #include <new>
00035 #include <typeinfo>
00036 #include <stdexcept>
00037
00038 using namespace std;
00039
00040
00041 #ifdef ENABLE_AXIS_EXCEPTION
00042 #define AXISC_TRY try {
00043 #define AXISC_CATCH(X) } catch (X) {
00044 #define AXISC_ENDCATCH }
00045
00046 #define THROW_AXIS_EXCEPTION(X) throw AxisGenException(X)
00047 #define THROW_AXIS_CONFIG_EXCEPTION(X) throw AxisConfigException(X)
00048 #define THROW_AXIS_SOAP_EXCEPTION(X) throw AxisSoapException(X)
00049 #define THROW_AXIS_WSDD_EXCEPTION(X) throw AxisWsddException(X)
00050 #define THROW_AXIS_ENGINE_EXCEPTION(X) throw AxisEngineException(X)
00051 #define THROW_AXIS_TRANSPORT_EXCEPTION(X) throw AxisTransportException(X)
00052 #define THROW_AXIS_PARSE_EXCEPTION(X) throw AxisParseException(X)
00053
00054 #define THROW_AXIS_EXCEPTION2(X, Y) throw AxisGenException(X, Y)
00055 #define THROW_AXIS_CONFIG_EXCEPTION2(X, Y) throw AxisConfigException(X, Y)
00056 #define THROW_AXIS_SOAP_EXCEPTION2(X, Y) throw AxisSoapException(X, Y)
00057 #define THROW_AXIS_WSDD_EXCEPTION2(X, Y) throw AxisWsddException(X, Y)
00058 #define THROW_AXIS_ENGINE_EXCEPTION2(X, Y) throw AxisEngineException(X, Y)
00059 #define THROW_AXIS_TRANSPORT_EXCEPTION2(X, Y) throw AxisTransportException(X, Y)
00060 #define THROW_AXIS_PARSE_EXCEPTION2(X, Y) throw AxisParseException(X, Y)
00061
00062 #define THROW_AXIS_BAD_ALLOC() throw std::bad_alloc
00063 #define THROW_AXIS_BAD_CAST() throw std::bad_cast
00064 #define THROW_AXIS_BAD_TYPEID() throw std::bad_typeid
00065 #define THROW_AXIS_BAD_EXCEPTION() throw std::bad_exception
00066 #define THROW_AXIS_OUT_OF_RANGE(X) throw std::out_of_range
00067 #define THROW_AXIS_INVALID_ARGUMENT(X) throw std::invalid_argument
00068 #define THROW_AXIS_OVERFLOW_ERROR(X) throw std::overflow_error
00069
00070
00071 #define AXISC_THROW_SAME throw
00072
00073 #else
00074
00075 #define AXISC_TRY
00076 #define AXISC_CATCH(X)
00077 #define AXISC_ENDCATCH
00078
00079 #define THROW_AXIS_EXCEPTION(X) return X
00080 #define THROW_AXIS_CONFIG_EXCEPTION(X) return X
00081 #define THROW_AXIS_SOAP_EXCEPTION(X) return X
00082 #define THROW_AXIS_WSDD_EXCEPTION(X) return X
00083 #define THROW_AXIS_ENGINE_EXCEPTION(X) return X
00084 #define THROW_AXIS_TRANSPORT_EXCEPTION(X) return X
00085 #define THROW_AXIS_PARSE_EXCEPTION(X) return X
00086
00087 #define THROW_AXIS_EXCEPTION2(X, Y) return X
00088 #define THROW_AXIS_CONFIG_EXCEPTION2(X, Y) return X
00089 #define THROW_AXIS_SOAP_EXCEPTION2(X, Y) return X
00090 #define THROW_AXIS_WSDD_EXCEPTION2(X, Y) return X
00091 #define THROW_AXIS_ENGINE_EXCEPTION2(X, Y) return X
00092 #define THROW_AXIS_TRANSPORT_EXCEPTION2(X, Y) return X
00093 #define THROW_AXIS_PARSE_EXCEPTION2(X, Y) return X
00094
00095 #define THROW_AXIS_BAD_ALLOC()
00096 #define THROW_AXIS_BAD_CAST()
00097 #define THROW_AXIS_BAD_TYPEID()
00098 #define THROW_AXIS_BAD_EXCEPTION()
00099 #define THROW_AXIS_OUT_OF_RANGE(X)
00100 #define THROW_AXIS_INVALID_ARGUMENT(X)
00101 #define THROW_AXIS_OVERFLOW_ERROR(X)
00102 #define THROW_AXIS_IOS_BASE_FAILURE(X)
00103
00104 #define AXISC_THROW_SAME
00105 #endif
00106
00107
00108
00109
00110
00111 enum AXISC_EXCEPTIONS
00112 {
00113
00114 SOAP_VERSION_MISMATCH,
00115
00116
00117 SOAP_MUST_UNDERSTAND,
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137 CLIENT_SOAP_MESSAGE_INCOMPLETE,
00138 CLIENT_SOAP_SOAP_ACTION_EMTPY,
00139 CLIENT_SOAP_SOAP_CONTENT_ERROR,
00140 CLIENT_SOAP_NO_SOAP_METHOD,
00141 CLIENT_SOAP_CONTENT_NOT_SOAP,
00142 CLIENT_WSDD_SERVICE_NOT_FOUND,
00143 CLIENT_WSDD_METHOD_NOT_ALLOWED,
00144 CLIENT_WSDD_PARA_TYPE_MISMATCH,
00145 CLIENT_ENGINE_CLIENT_HANDLER_FAILED,
00146
00147
00148 SERVER_ENGINE_EXCEPTION,
00149 SERVER_ENGINE_COULD_NOT_LOAD_SRV,
00150 SERVER_ENGINE_COULD_NOT_LOAD_HDL,
00151 SERVER_ENGINE_LOADING_TRANSPORT_FAILED,
00152 SERVER_ENGINE_LOADING_PARSER_FAILED,
00153 SERVER_ENGINE_HANDLER_FAILED,
00154 SERVER_ENGINE_WEBSERVICE_FAILED,
00155 SERVER_ENGINE_HANDLER_INIT_FAILED,
00156 SERVER_ENGINE_HANDLER_CREATION_FAILED,
00157 SERVER_ENGINE_LIBRARY_LOADING_FAILED,
00158 SERVER_ENGINE_HANDLER_NOT_LOADED,
00159 SERVER_ENGINE_HANDLER_BEING_USED,
00160 SERVER_ENGINE_GET_HANDLER_FAILED,
00161 SERVER_ENGINE_WRONG_HANDLER_TYPE,
00162 SERVER_CONFIG_EXCEPTION,
00163 SERVER_CONFIG_TRANSPORT_CONF_FAILED,
00164 SERVER_CONFIG_LIBRARY_PATH_EMPTY,
00165 SERVER_WSDD_EXCEPTION,
00166 SERVER_WSDD_NO_HANDLERS_CONFIGURED,
00167 SERVER_SOAP_EXCEPTION,
00168 SERVER_TRANSPORT_EXCEPTION,
00169 SERVER_TRANSPORT_RECEPTION_EXCEPTION,
00170 SERVER_TRANSPORT_SENDING_EXCEPTION,
00171 SERVER_TRANSPORT_PROCESS_EXCEPTION,
00172 SERVER_TRANSPORT_UNKNOWN_HTTP_RESPONSE,
00173 SERVER_TRANSPORT_HTTP_EXCEPTION,
00174 SERVER_TRANSPORT_UNEXPECTED_STRING,
00175 SERVER_TRANSPORT_CHANNEL_INIT_ERROR,
00176 SERVER_TRANSPORT_SOCKET_CREATE_ERROR,
00177 SERVER_TRANSPORT_SOCKET_CONNECT_ERROR,
00178 SERVER_TRANSPORT_INVALID_SOCKET,
00179 SERVER_TRANSPORT_OUTPUT_STREAMING_ERROR,
00180 SERVER_TRANSPORT_INPUT_STREAMING_ERROR,
00181 SERVER_TRANSPORT_TIMEOUT_EXCEPTION,
00182 SERVER_TRANSPORT_TIMEOUT_EXPIRED,
00183 SERVER_TRANSPORT_BUFFER_EMPTY,
00184 SERVER_PARSE_BUFFER_EMPTY,
00185 SERVER_PARSE_PARSER_FAILED,
00186 SERVER_PARSE_TRANSPORT_FAILED,
00187
00188 SERVER_TEST_EXCEPTION,
00189 SERVER_UNKNOWN_ERROR,
00190
00191
00192 AXISC_SERVICE_THROWN_EXCEPTION,
00193 AXISC_UNKNOWN_ELEMENT_EXCEPTION,
00194 AXISC_NODE_VALUE_MISMATCH_EXCEPTION,
00195 AXISC_READ_CONF_EXCEPTION,
00196
00197
00198
00199
00200
00201
00202 FAULT_LAST
00203 };
00204
00216 class STORAGE_CLASS_INFO AxisException :public exception
00217 {
00218
00219 public:
00221
00222
00232
00233
00245
00246
00255
00256
00263
00264
00269
00270
00272 virtual ~AxisException() throw(){};
00273
00277 virtual const char* what() throw() = 0;
00278
00288 virtual const int getExceptionCode() = 0;
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300 };
00301
00302 #endif
00303