rwlogo
HydraExpress 4.6

HydraExpress C++ API Reference Guide


   


Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::SoapDetail Class Reference
[Web Services]

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

#include <rwsf/webservice/SoapDetail.h>

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

List of all members.

Public Types

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

Public Member Functions

 SoapDetail ()
 SoapDetail (const SoapDetail &other)
 ~SoapDetail ()
SoapDetailoperator= (const SoapDetail &rhs)
rwsf::XmlReader getReader ()
void setAnyVector (const anyVector &Any)
rwsf::XmlAttributeSet getAnyAttribute () const
void setAnyAttribute (const rwsf::XmlAttributeSet &AnyAttribute)
void unmarshal (rwsf::XmlReader &reader)
void unmarshal (const std::string &input)
std::string marshal (bool includeChildTypeAttributes=false) const
void marshal (rwsf::XmlWriter &writer, bool includeChildTypeAttributes, const rwsf::XmlName &elementName, bool includeSelfTypeAttribute) const
void populateAttributes (rwsf::XmlAttributeSet &attributes) const
virtual rwsf::XmlName getDefaultElementName () const

anyVectorgetAnyVector ()
const anyVectorgetAnyVector () const

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.

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

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

anyVector& rwsf::SoapDetail::getAnyVector (  )  [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.

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:
writer The XmlWriter instance into which the element will be marshaled.
includeChildTypeAttributes Bool to determine whether each contained element should have a type attribute.
elementName The name of the element to be marshaled.
includeSelfTypeAttribute Bool to determine whether the element to be marshaled should have a type attribute.
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.

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

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

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


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.