HydraExpress™ C++ 2020 |
HydraExpress™ C++ API Reference Guide |
Product Documentation: HydraExpress C++ Documentation Home |
Represents generic SOAP faults in the generated client proxy. More...
#include <rwsf/webservice/SoapFault.h>
Public Member Functions | |
SoapFaultException (const rwsf::SoapFault &fault) | |
rwsf::SoapFault | getFault () const |
Public Member Functions inherited from rwsf::Exception | |
Exception (const ExceptionInfo &eInfo) | |
Exception (const char *msg) | |
Exception (const std::string &msg) | |
Exception (const rwsf::ExceptionInfo &eInfo, const LocalizedMessage &msg) | |
Exception (const Exception &) | |
virtual | ~Exception () throw () |
virtual Exception * | clone (void) const |
const char * | getFileName () const |
const char * | getFunctionName () const |
unsigned long | getLineNumber () const |
virtual bool | operator!= (const Exception exc2) |
Exception & | operator= (const Exception &m) |
virtual bool | operator== (const Exception exc2) |
virtual void | raise (void) const |
virtual const char * | what () const throw () |
Additional Inherited Members | |
Related Functions inherited from rwsf::Exception | |
#define | RWSF_DECLARE_EXCEPTION_METHODS(className) |
#define | RWSF_DEFINE_EXCEPTION_METHODS(className) |
#define | RWSF_EINFO |
rwsf::SoapFaultException represents generic SOAP faults in the proxy. If a fault is defined in the WSDL, a special class is generated for it; if it is not defined, an instance of rwsf::SoapFaultException is thrown from the client.
You may request the fault message as an std::string using what() . Alternatively, you can retrieve the SoapFault object using the getFault() method. The SoapFault object has methods for retrieving individual parts of the fault, such as the fault code and the fault detail. See rwsf::SoapFault for more information.
For an example on how generic and specific faults are caught, run the Fault example in your installdir\examples\webservices\Fault
directory.
The following code shows how a generated client implementation catches a rwsf::SoapFaultException in its invoke()
methods
. This excerpt is from the generated client for the DayofWeek example in your installdir\examples\webservices\DayofWeek
directory.
For more information on faults and exception handling, see the Web Service Development Guide.
rwsf::SoapFaultException::SoapFaultException | ( | const rwsf::SoapFault & | fault | ) |
Initializes an rwsf::SoapFaultException with the given SoapFault fault.
rwsf::SoapFault rwsf::SoapFaultException::getFault | ( | ) | const |
Returns the fault object as a SoapFault.
Copyright © 2020 Rogue Wave Software, Inc. All Rights Reserved. |