SOAPFault.cpp

Go to the documentation of this file.
00001 
00010 // SOAPFault.cpp: implementation of the SOAPFault class.
00011 //
00013 #ifdef _MSC_VER 
00014 // Microsoft only extension to the compiler
00015 // Turns off noise about debug symbols being "too long".
00016     #pragma warning( disable : 4786 )
00017 #endif // _MSC_VER 
00018 
00019 #include "SOAPFault.h"
00020 
00022 // Construction/Destruction
00024 
00025 SOAPFault::SOAPFault()
00026 {
00027 
00028 }
00029 
00030 SOAPFault::~SOAPFault()
00031 {
00032 
00033 }
00034 
00035 void SOAPFault::setFaultCode( FaultCode faultCode )
00036 {
00037     m_faultCode = faultCode;
00038 }
00039 
00040 void SOAPFault::setSpecificFault( const std::string& szSpecificFault, FaultCode faultCode /*= Client*/ )
00041 {
00042     m_szSpecificFault = szSpecificFault;
00043     m_faultCode = faultCode;
00044 }
00045 
00046 std::string SOAPFault::getFaultCode()
00047 {
00048     std::string retval;
00049     switch ( m_faultCode )
00050     {
00051     case Client:
00052         retval = "Client";
00053         break;
00054     case Server:
00055         retval = "Server";
00056         break;
00057     case MustUnderstand:
00058         retval = "MustUnderstand";
00059         break;
00060     case VersionMismatch:
00061         retval = "VersionMismatch";
00062         break;
00063     }
00064 
00065     if ( m_szSpecificFault.length() > 0 )
00066     {
00067         retval += "." + m_szSpecificFault;
00068     }
00069     return retval;
00070 }
00071 
00072 std::string& SOAPFault::faultString()
00073 {
00074     return m_szFaultString;
00075 }
00076 
00077 std::string& SOAPFault::faultActor()
00078 {
00079     return m_szFaultActor;
00080 }
00081 
00082 std::string& SOAPFault::detail()
00083 {
00084     return m_szDetail;
00085 }
00086 

Generated on Tue Mar 28 09:10:14 2006 for Simple SOAP by  doxygen 1.4.6