rwlogo
HydraExpress 4.6

HydraExpress C++ API Reference Guide


   


Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::SoapFault Class Reference
[Web Services]

Represents a SOAP fault. More...

#include <rwsf/webservice/SoapFault.h>

Inheritance diagram for rwsf::SoapFault:
rwsf::SoapBase

List of all members.

Public Member Functions

 SoapFault ()
 SoapFault (const SoapFault &other)
 ~SoapFault ()
SoapFaultoperator= (const SoapFault &rhs)
rwsf::XmlName getFaultcode () const
void setFaultcode (const rwsf::XmlName &Faultcode)
std::string getFaultstring () const
void setFaultstring (const std::string &Faultstring)
std::string getFaultactor () const
void setFaultactor (const std::string &Faultactor)
bool isFaultactorSet () const
void setFaultactorSet (bool setValue)
rwsf::SoapDetail getDetail () const
void setDetail (const rwsf::SoapDetail &Detail)
bool isDetailSet () const
void setDetailSet (bool setValue)
void unmarshal (rwsf::XmlReader &reader)
void unmarshal (const std::string &input)
virtual rwsf::XmlName getDefaultElementName () const

Detailed Description

rwsf::SoapFault represents a SOAP fault. A SOAP fault must contain a primary faultcode element and a faultstring element. Depending on the cause of the fault, a SOAP fault may also contain a faultactor element or a detail element.


Constructor & Destructor Documentation

rwsf::SoapFault::SoapFault (  ) 

Default constructor.

rwsf::SoapFault::SoapFault ( const SoapFault other  ) 

Copy constructor. Creates a SoapFault that is an exact copy of other, including any faultactor, detail elements, etc.

rwsf::SoapFault::~SoapFault (  ) 

Destructor.


Member Function Documentation

virtual rwsf::XmlName rwsf::SoapFault::getDefaultElementName (  )  const [virtual]

Returns an instance of rwsf::XmlName with fixed values in which the local name is set to "Fault", the namespace prefix is set to "SOAP-ENV", and the namespace URI is set to "http://schemas.xmlsoap.org/soap/envelope/".

Implements rwsf::SoapBase.

rwsf::SoapDetail rwsf::SoapFault::getDetail (  )  const

Returns the detail element of this fault represented as an rwsf::SoapDetail object containing detail entries.

std::string rwsf::SoapFault::getFaultactor (  )  const

Returns the faultactor for this fault. The faultactor should be a URI representing the cause of the fault in the message path. It is optional and may not be set.

rwsf::XmlName rwsf::SoapFault::getFaultcode (  )  const

Returns the fault code for this fault. The faultcode must be an XML qualified name of the identifier listing out the fault reason. Four basic values are defined in section 4.4.1 of the SOAP Specification and defined in the empty namespace:

  • VersionMismatch
  • MustUnderstand
  • Client
  • Server

Other user-defined qualified XML values may be used. In addition, a dot (".") may be used to add additional, more specific codes to one of these four categories, such as "Client.Authentication".

std::string rwsf::SoapFault::getFaultstring (  )  const

Returns the faultstring for this fault. The faultstring is a required element in every fault and should present a human-readable explanation of the fault.

bool rwsf::SoapFault::isDetailSet (  )  const

Returns true if the detail element has been set, false otherwise.

bool rwsf::SoapFault::isFaultactorSet (  )  const

Returns true if the faultactor has been set, false otherwise.

SoapFault& rwsf::SoapFault::operator= ( const SoapFault rhs  ) 

Sets this SoapFault as an exact copy of rhs, including any faultactor, detail elements, etc.

void rwsf::SoapFault::setDetail ( const rwsf::SoapDetail Detail  ) 

Sets the fault detail in this fault to the SoapDetail object Detail.

void rwsf::SoapFault::setDetailSet ( bool  setValue  ) 

Sets whether the detail element has been added. If the value is set to true, the detail element will be marshaled out, otherwise it will not be marshaled.

Note:
Setting this value to false does not clear the actual detail value; rather, it prevents the detail from marshaling in the SOAP fault.
void rwsf::SoapFault::setFaultactor ( const std::string &  Faultactor  ) 

Sets the faultactor element. See getFaultactor() for a description of the faultactor and its valid values.

void rwsf::SoapFault::setFaultactorSet ( bool  setValue  ) 

Sets whether a faultactor has been added. If the value is set to true, the faultactor element will be marshaled out, otherwise it will not be marshaled.

Note:
Setting this value to false will not clear the actual faultactor value; rather, it will only prevent the faultactor from marshaling in the SOAP fault.
void rwsf::SoapFault::setFaultcode ( const rwsf::XmlName Faultcode  ) 

Sets the fault code. See getFaultCode() for an explanation of the SOAP faultcode and valid values.

void rwsf::SoapFault::setFaultstring ( const std::string &  Faultstring  ) 

Sets the fault string.

void rwsf::SoapFault::unmarshal ( const std::string &  input  ) 

Reads in a SOAP fault element from the given string input. The input string should contain a complete and valid SOAP fault element.

If the SOAP fault being read is malformed, throws an XmlException.

void rwsf::SoapFault::unmarshal ( rwsf::XmlReader reader  ) 

Parses the SoapFault from the given reader. The reader instance should be set up so that it is ready to read a SOAP fault element. This means its cursor should be positioned just before the SOAP fault element. After this function completes, the reader instance will have its cursor positioned after the SOAP fault's end element.

If the SOAP fault being read is malformed, throws an XmlException.


Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.