HydraExpress™ C++ API Reference Guide

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

Represents a SOAP fault's optional detail element. More...

#include <rwsf/webservice/SoapDetail.h>

Inheritance diagram for rwsf::SoapDetail:
rwsf::SoapBase

Public Types

typedef std::vector< std::string > anyVector
 

Public Member Functions

 SoapDetail ()
 
 SoapDetail (const SoapDetail &other)
 
 ~SoapDetail ()
 
rwsf::XmlAttributeSet getAnyAttribute () const
 
virtual rwsf::XmlName getDefaultElementName () const
 
rwsf::XmlReader getReader ()
 
std::string marshal (bool includeChildTypeAttributes=false) const
 
void marshal (rwsf::XmlWriter &writer, bool includeChildTypeAttributes, const rwsf::XmlName &elementName, bool includeSelfTypeAttribute) const
 
SoapDetailoperator= (const SoapDetail &rhs)
 
void populateAttributes (rwsf::XmlAttributeSet &attributes) const
 
void setAnyAttribute (const rwsf::XmlAttributeSet &AnyAttribute)
 
void setAnyVector (const anyVector &Any)
 
void unmarshal (rwsf::XmlReader &reader)
 
void unmarshal (const std::string &input)
 
anyVectorgetAnyVector ()
 
const anyVectorgetAnyVector () const
 
- 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
void unmarshalAttributes (rwsf::XmlAttributeSet &attrs)
 

Detailed Description

An instance of rwsf::SoapDetail is used by rwsf::SoapFault and contains the value of the optional detail element of a SOAP fault.

It contains a vector of std::string instances that hold individual elements of the detail (if any), and an rwsf::XmlAttributeSet containing any attributes set on the detail instance.

This class may be used to get details from a generic SOAP fault instance rwsf::SoapFaultException, i.e. SOAP faults that are not generated from a WSDL fault.

Member Typedef Documentation

typedef std::vector<std::string> rwsf::SoapDetail::anyVector

A vector that stores as strings the individual elements contained by an rwsf::SoapDetail instance.

Constructor & Destructor Documentation

rwsf::SoapDetail::SoapDetail ( )

Default constructor. Constructs an rwsf::SoapDetail instance containing an empty vector and rwsf::XmlAttributeSet.

rwsf::SoapDetail::SoapDetail ( const SoapDetail other)

Copy constructor.

rwsf::SoapDetail::~SoapDetail ( )

Destructor.

Member Function Documentation

rwsf::XmlAttributeSet rwsf::SoapDetail::getAnyAttribute ( ) const
inline

Returns the set of attributes for this detail.

anyVector& rwsf::SoapDetail::getAnyVector ( )
inline

Returns a std::vector of std::string instances containing the individual elements of the SoapDetail as strings.

const anyVector& rwsf::SoapDetail::getAnyVector ( ) const
inline

Returns a std::vector of std::string instances containing the individual elements of the SoapDetail as strings.

virtual rwsf::XmlName rwsf::SoapDetail::getDefaultElementName ( ) const
virtual

Returns an instance of rwsf::XmlName with fixed values in which the localname is set to "detail", and the namespace prefix and URI are both set to the empty string, "".

Implements rwsf::SoapBase.

rwsf::XmlReader rwsf::SoapDetail::getReader ( )

Returns an instance of rwsf::XmlReader for unmarshaling.

std::string rwsf::SoapDetail::marshal ( bool  includeChildTypeAttributes = false) const

Returns the SOAP detail element as a string. The parameter includeChildTypeAttributes determines whether each contained element will include type attributes. The default is false, i.e. to not include type attributes on each nested element.

void rwsf::SoapDetail::marshal ( rwsf::XmlWriter writer,
bool  includeChildTypeAttributes,
const rwsf::XmlName elementName,
bool  includeSelfTypeAttribute 
) const

Marshals this rwsf::SoapDetail instance. This marshal() method is more efficient than marshaling a string separately (using the marshal() method that takes only the includeChildTypeAttributes parameter), and is preferable when your application already has an XmlWriter instance constructed since you can just pass the detail in.

Parameters
writerThe XmlWriter instance into which the element will be marshaled.
includeChildTypeAttributesBool to determine whether each contained element should have a type attribute.
elementNameThe name of the element to be marshaled.
includeSelfTypeAttributeBool to determine whether the element to be marshaled should have a type attribute.
SoapDetail& rwsf::SoapDetail::operator= ( const SoapDetail rhs)

Assignment operator.

void rwsf::SoapDetail::populateAttributes ( rwsf::XmlAttributeSet attributes) const
virtual

Copies all attributes in this detail into the parameter XmlAttributeSet attributes. Used during marshaling.

Reimplemented from rwsf::SoapBase.

void rwsf::SoapDetail::setAnyAttribute ( const rwsf::XmlAttributeSet AnyAttribute)
inline

Copies the attribute set AnyAttribute to the attribute set for this detail. Any attributes present before the call are replaced.

void rwsf::SoapDetail::setAnyVector ( const anyVector Any)
inline

Copies the vector parameter any to the vector of elements. Any elements present before the call are replaced.

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

Unmarshals this rwsf::SoapDetail instance. Used by RWSF-generated code to produce SOAP fault messages.

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

Unmarshals this rwsf::SoapDetail instance. Used by RWSF-generated code to produce SOAP fault messages. The string input must be a "detail" XML element in the empty namespace, i.e. formatted like so:

<detail attr1='value1' attr2='value2'>
<anyXmlElement>anyValue...</anyXmlElement>...
</detail>

The detail itself can have any number of children elements and attributes, where the attributes are held in the detail's XmlAttributeSet instance. The XML element anyXmlElement above can be anything, even a string value or blank.

If a "fault" is declared in the WSDL for this operation, the fault will define a message type that must be represented under the SOAP fault detail element. This can include 0 or more parts, each with a type or element declaration under it. In that case, anyXmlElement must follow that declaration, both for the element or the type.

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.