Use this example of stub file to find out how SOAP faults are represented in the generated client stubs.
Each SOAP fault defined in the WSDL is represented as a generated C++ class. The generated DivByZeroStruct is as shown below:
class STORAGE_CLASS_INFO DivByZeroStruct : public SoapFaultException { public: xsd__string varString; xsd__int varInt; xsd__float varFloat; DivByZeroStruct(); ~DivByZeroStruct() throw(); };
The DivByZeroStruct class has public variables that contain the deserialized message. An instance of this exception class is thrown by the fault handler inside the MathOps stub, if such a fault is returned by the server.