rwsf::Faultrwsf::Exception
#include rwsf/webservice/Fault.h
rwsf::Fault and its derived classes rwsf::ClientFault and rwsf::ServerFault represent SOAP faults. In addition, if a fault is specified in the WSDL, rwsf generates a special class for it, which also derives from rwsf::Fault. On the client, generic faults that are not defined in the WSDL are propagated out to the client and thrown as a rwsf::SoapFaultException. To see how WSDL-defined and generic faults work, run the example Fault in your installdir\examples\webservices\Fault directory.
EncodingStyle { Rpc, Document, Wrapped }
Enumeration containing the three possible encoding styles for the fault. If Rpc=1, the fault's encoding style is SOAP's RPC (Remote Procedure Call); if Document=2, the encoding style is the SOAP document-style encoding; if Wrapped=3,the encoding style is "wrapped," meaning that rwsf will "unwrap" the top level element, and treat each of the element's parts as arguments to the operation. (For more information on the wrapped style, see Section 8.3.8, "Wrapped Style Operations," in the HydraExpress Web Service Development Guide.
FaultCode { VersionMismatch, MustUnderstand, Client, Server }
Enumeration containing the four possible fault codes.
Fault();
Default constructor.
Fault(FaultCode faultCode, const std::string & faultString);
Constructs an instance of rwsf::Fault containing a fault code and the error message.
virtual ~Fault();
Virtual destructor.
Fault::FaultCode getFaultCodeFromName(const rwsf::XmlName & name);
Returns the fault code from the name.
std::string asString() const;
Returns the SOAP fault message as a string. Allows derived classes to marshal detail elements into the SOAP fault message. Implemented by generated fault classes.
EncodingStyle getEncodingStyle() const;
Returns the encoding style element.
Fault::FaultCode getFaultCode() const;
Returns the enumeration, faultCode.
std::string getFaultCodeAsString() const;
Returns fault string as a string.
std::string getProperty(const std::string & key) const;
Returns the property represented by key. (This method supports marshaling in the generated fault classes.) Used to set the property rwsf:doEScape to define whether or not text will be escaped.
void init(const rwsf::Config & initParams);
Initializes the fault object. This method can be used to initialize fault properties with an existing rwsf::Config object.
void setEncodingStyle(EncodingStyle style);
Sets the encoding style element.
void setFaultCode(Fault::FaultCode faultCode);
Sets the fault code.
void setFaultString(const std::string & faultString);
Sets the fault string.
void setProperty(const std::string & key, const std::string & value);
Sets the property key to value. (This method supports marshaling in the generated fault classes.) Used to set the property rwsf:doEScape to define whether or not text will be escaped.
const char * why() const;
Reimplements method in rwsf::Exception
Base class documentation:
Returns a char* containing the exception message. By default, this method forwards to the what() member function.
Deprecated. Use the what() method for accessing the exception message.
Implementation documentation:
Returns faultString_.data().
© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.