static std::string getMessageForExceptionCode()

in include/axis/AxisException.hpp [547:768]


     static std::string getMessageForExceptionCode(int exceptionCode, const char *defaultMsg=NULL)
     {
        std::string sMsg;
        
        switch (exceptionCode)
        {
            case SOAP_VERSION_MISMATCH:
                sMsg = "AxisSoapException: Soap VersionMismatch fault occurred.";
                break;
            case SOAP_MUST_UNDERSTAND:    
                sMsg = "AxisSoapException: Soap MustUnderstand fault occurred.";
                break;
            case CLIENT_SOAP_MESSAGE_INCOMPLETE:
                sMsg = "AxisSoapException: Soap message is incomplete.";
                break;
            case CLIENT_SOAP_SOAP_ACTION_EMTPY:
                sMsg = "AxisSoapException: SOAPAction HTTP header is empty.";
                break;
            case CLIENT_SOAP_SOAP_CONTENT_ERROR:
                sMsg = "AxisSoapException: Soap message content is not valid.";
                break;
            case CLIENT_SOAP_NO_SOAP_METHOD:
                sMsg = "AxisSoapException: Request method is not a soap method.";
                break;
            case CLIENT_SOAP_CONTENT_NOT_SOAP:
                sMsg = "AxisSoapException: Content is not a valid soap message.";
                break;
            case CLIENT_WSDD_SERVICE_NOT_FOUND:
                sMsg = "AxisWsddException: Requested service not found.";
                break;
            case CLIENT_WSDD_METHOD_NOT_ALLOWED:
                sMsg = "AxisWsddException: Requested method is not allowed.";
                break;
            case CLIENT_WSDD_PARA_TYPE_MISMATCH:
                sMsg = "AxisWsddException: Parameter type mismatch.";
                break;
            case CLIENT_ENGINE_CLIENT_HANDLER_FAILED:
                sMsg = "AxisEngineException: Client handler failed.";
                break;
            case CLIENT_TRANSPORT_EXCEPTION:
                sMsg = "HTTPTransportException: Client transport exception.";
                break;
            case CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED:
                sMsg = "HTTPTransportException: Client failed to open.";
                break;
            case CLIENT_TRANSPORT_TYPE_MISMATCH:
                sMsg = "HTTPTransportException: Client attempted to use SSL functions without the proper prerequisites.";
                break;
            case CLIENT_TRANSPORT_HAS_NO_UNSECURE_TRANSPORT_LAYER:
                sMsg = "HTTPTransportException: Client attempted to use non-existant unsecure transport (http).";
                break;
            case CLIENT_TRANSPORT_HAS_NO_SECURE_TRANSPORT_LAYER:
                sMsg = "HTTPTransportException: Client attempted to use non-existant secure transport (https).";
                break;
            case CLIENT_MIME_CONTENT_ID_NOT_UNIQUE:
                sMsg = "AxisSoapException: Content is not unique within the MIME message.";
                break;
            case SERVER_ENGINE_EXCEPTION:
                sMsg = "AxisEngineException: Exception occurred.";
                break;
            case SERVER_ENGINE_COULD_NOT_LOAD_SRV:
                sMsg = "AxisEngineException: Could not load service.";
                break;
            case SERVER_ENGINE_COULD_NOT_LOAD_HDL:
                sMsg = "AxisEngineException: Could not load handler.";
                break;
            case SERVER_ENGINE_LOADING_TRANSPORT_FAILED:
                sMsg = "AxisEngineException: Failed to load transport library.";
                break;
            case SERVER_ENGINE_LOADING_PARSER_FAILED:
                sMsg = "AxisEngineException: Failed to load parser library.";
                break;
            case SERVER_ENGINE_HANDLER_FAILED:
                sMsg = "AxisEngineException: Handler failed.";
                break;
            case SERVER_ENGINE_WEBSERVICE_FAILED:
                sMsg = "AxisEngineException: Web service failed.";
                break;
            case SERVER_ENGINE_HANDLER_INIT_FAILED:
                sMsg = "AxisEngineException: Handler initialization failed.";
                break;
            case SERVER_ENGINE_HANDLER_CREATION_FAILED:
                sMsg = "AxisEngineException: Handler creation failed.";
                break;
            case SERVER_ENGINE_LIBRARY_LOADING_FAILED:
                sMsg = "AxisEngineException: Library loading failed.";
                break;
            case SERVER_ENGINE_HANDLER_NOT_LOADED:
                sMsg = "AxisEngineException: Handler is not loaded.";
                break;
            case SERVER_ENGINE_HANDLER_BEING_USED:
                sMsg = "AxisEngineException: Handler is being used.";
                break;
            case SERVER_ENGINE_GET_HANDLER_FAILED:
                sMsg = "AxisEngineException: Failed to get handler.";
                break;
            case SERVER_ENGINE_WRONG_HANDLER_TYPE:
                sMsg = "AxisEngineException: Wrong handler type.";
                break;
            case SERVER_CONFIG_EXCEPTION:
                sMsg = "AxisConfigException: Exception occurred.";
                break;
            case SERVER_CONFIG_TRANSPORT_CONF_FAILED:
                sMsg = "AxisConfigException: Transport layer is not configured properly.";
                break;
            case SERVER_CONFIG_LIBRARY_PATH_EMPTY:
                sMsg = "AxisConfigException: Library path is empty (not in server.wsdd file).";
                break;
            case SERVER_WSDD_FILE_NOT_FOUND:
                sMsg = "AxisWsddException: Unable to load file.";
                break;
            case SERVER_WSDD_EXCEPTION:
                sMsg = "AxisWsddException: Exception occurred.";
                break;
            case SERVER_WSDD_NO_HANDLERS_CONFIGURED:
                sMsg = "AxisWsddException: No handlers configured in server.wsdd file.";
                break;
            case SERVER_SOAP_EXCEPTION:
                sMsg = "AxisSoapException: Exception occurred.";
                break;
            case SERVER_TRANSPORT_EXCEPTION:
                sMsg = "HTTPTransportException: Exception occurred.";
                break;
            case CLIENT_SSLCHANNEL_RECEPTION_EXCEPTION:
            case SERVER_TRANSPORT_RECEPTION_EXCEPTION:
                sMsg = "HTTPTransportException: Problem occurred when receiving the stream.";
                break;
            case CLIENT_SSLCHANNEL_SENDING_EXCEPTION:
            case SERVER_TRANSPORT_SENDING_EXCEPTION:
                sMsg = "HTTPTransportException: Problem occurred when sending the stream.";
                break;
            case SERVER_TRANSPORT_PROCESS_EXCEPTION:
                sMsg = "HTTPTransportException: Cannot process response message.";
                break;
            case SERVER_TRANSPORT_UNKNOWN_HTTP_RESPONSE:
                sMsg = "HTTPTransportException: Unknown HTTP response, cannot process response message.";
                break;
            case CLIENT_SSLCHANNEL_CONTEXT_CREATE_ERROR:
                sMsg = "HTTPTransportException: Context creation error.";
                break;
            case CLIENT_SSLCHANNEL_ERROR:
                sMsg = "HTTPTransportException: HTTPS transport error.";
                break;
            case SERVER_TRANSPORT_HTTP_EXCEPTION:
                sMsg = "HTTPTransportException: HTTP transport error.";
                break;
            case SERVER_TRANSPORT_UNEXPECTED_STRING:
                sMsg = "HTTPTransportException: Unexpected string received.";
                break;
            case CLIENT_SSLCHANNEL_CHANNEL_INIT_ERROR:    
            case SERVER_TRANSPORT_CHANNEL_INIT_ERROR:
                sMsg = "HTTPTransportException: Cannot initialize a channel to the remote end.";
                break;
            case CLIENT_SSLCHANNEL_SOCKET_CREATE_ERROR:                
            case SERVER_TRANSPORT_SOCKET_CREATE_ERROR:
                sMsg = "AxisTransportException: Unable to create a socket.";
                break;
            case CLIENT_SSLCHANNEL_SOCKET_CONNECT_ERROR:                
            case SERVER_TRANSPORT_SOCKET_CONNECT_ERROR:
                sMsg = "AxisTransportException: Cannot open a channel to the remote end.";
                break;
            case CLIENT_SSLCHANNEL_INVALID_SOCKET_ERROR:                
            case SERVER_TRANSPORT_INVALID_SOCKET:
                sMsg = "AxisTransportException: Socket not valid.";
                break;
            case SERVER_TRANSPORT_OUTPUT_STREAMING_ERROR:
                sMsg = "HTTPTransportException: Output streaming error while writing to channel.";
                break;
            case SERVER_TRANSPORT_INPUT_STREAMING_ERROR:
                sMsg = "HTTPTransportException: Input streaming error while reading from channel.";
                break;
            case SERVER_TRANSPORT_TIMEOUT_EXCEPTION:
                sMsg = "HTTPTransportException: Channel error while doing a timed wait.";
                break;
            case SERVER_TRANSPORT_TIMEOUT_EXPIRED:
                sMsg = "HTTPTransportException: Channel I/O operation timed out.";
                break;
            case SERVER_TRANSPORT_LOADING_SSLCHANNEL_FAILED:
            case SERVER_TRANSPORT_LOADING_CHANNEL_FAILED:
                sMsg = "HTTPTransportException: Unable to load channel library.";
                break;
            case SERVER_TRANSPORT_BUFFER_EMPTY:
                sMsg = "HTTPTransportException: Transport buffer is empty.";
                break;
            case SERVER_PARSE_BUFFER_EMPTY:
                sMsg = "AxisParseException: Buffer received from the parser is empty.";
                break;
            case SERVER_PARSE_PARSER_FAILED: 
                sMsg = "AxisParseException: Parser error occurred.";
                break;
            case SERVER_PARSE_TRANSPORT_FAILED:
                sMsg = "AxisParseException: Error when getting the byte stream from the transport.";
                break;
            case SERVER_TEST_EXCEPTION:
                sMsg = "This is a testing error.";
                break;
            case SERVER_CLIENT_ENGINE_MISMATCH:
                sMsg = "AxisEngineException: Engine cannot be initialized as both client and server.";
                break;
            case AXISC_SERVICE_THROWN_EXCEPTION:
                sMsg = "A service has thrown an exception.";
                break;
            case AXISC_UNKNOWN_ELEMENT_EXCEPTION:
                sMsg = "AxisParseException: Unknown element encountered.";
                break;
            case AXISC_NODE_VALUE_MISMATCH_EXCEPTION:
                sMsg = "AxisSoapException: Cannot deserialize the requested element.";
                break;
            case AXISC_READ_CONF_EXCEPTION:
                sMsg = "AxisConfigException: Unable to read configuration file.";
                break;
            case CONFIG_DEFAULTS_ALREADY_SET:  
                sMsg = "AxisConfigException: Configuration defaults have already been set.";
                break;
            case SERVER_UNKNOWN_ERROR:
            default:    
                sMsg= defaultMsg ? defaultMsg : "AxisException:";      
                break;
        }
        
        return sMsg;
     }