HydraExpress™ C++ API Reference Guide

Product Documentation:
   HydraExpress C++
Documentation Home
List of all members | Public Member Functions
rwsf::SoapFault Class Reference

Represents a SOAP fault. More...

#include <rwsf/webservice/SoapFault.h>

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

Public Member Functions

 SoapFault ()
 
 SoapFault (const SoapFault &other)
 
 ~SoapFault ()
 
virtual rwsf::XmlName getDefaultElementName () const
 
rwsf::SoapDetail getDetail () const
 
std::string getFaultactor () const
 
rwsf::XmlName getFaultcode () const
 
std::string getFaultstring () const
 
bool isDetailSet () const
 
bool isFaultactorSet () const
 
SoapFaultoperator= (const SoapFault &rhs)
 
void setDetail (const rwsf::SoapDetail &Detail)
 
void setDetailSet (bool setValue)
 
void setFaultactor (const std::string &Faultactor)
 
void setFaultactorSet (bool setValue)
 
void setFaultcode (const rwsf::XmlName &Faultcode)
 
void setFaultstring (const std::string &Faultstring)
 
void unmarshal (rwsf::XmlReader &reader)
 
void unmarshal (const std::string &input)
 
- Public Member Functions inherited from rwsf::SoapBase
 SoapBase ()
 
 SoapBase (const SoapBase &sb)
 
virtual ~SoapBase ()
 
bool getXsiNil () const
 
std::string getXsiNoNamespaceSchemaLocation () const
 
std::string getXsiSchemaLocation () const
 
std::string getXsiType () const
 
bool isXsiNilSet () const
 
bool isXsiNoNamespaceSchemaLocationSet () const
 
bool isXsiSchemaLocationSet () const
 
bool isXsiTypeSet () const
 
void setXsiNil (bool XsiNil)
 
void setXsiNilSet (bool setValue)
 
void setXsiNoNamespaceSchemaLocation (const std::string &XsiNoNamespaceSchemaLocation)
 
void setXsiNoNamespaceSchemaLocationSet (bool setValue)
 
void setXsiSchemaLocation (const std::string &XsiSchemaLocation)
 
void setXsiSchemaLocationSet (bool setValue)
 
void setXsiType (const std::string &XsiType)
 
void setXsiTypeSet (bool setValue)
 

Additional Inherited Members

- Protected Member Functions inherited from rwsf::SoapBase
virtual void populateAttributes (rwsf::XmlAttributeSet &attributes) const
 
void unmarshalAttributes (rwsf::XmlAttributeSet &attrs)
 

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 ( 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.

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.

Copyright © 2020 Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is registered trademark of Rogue Wave Software, Inc. in the United States and other countries, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.