HydraExpress™ C++ API Reference Guide

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

Base class for rwsf::CallInfo. Not intended for direct use. More...

#include <rwsf/webservice/MessageProperties.h>

Inheritance diagram for rwsf::MessageProperties:
rwsf::CallInfo

Public Types

enum  LogLevel {
  None, Info, Warning, Error,
  Fatal
}
 

Public Member Functions

 MessageProperties ()
 
 ~MessageProperties ()
 
bool getBoolProperty (const std::string &name, bool def=false) const
 
bool getCancelSession () const
 
std::string getErrorMessage () const
 
int getIntProperty (const std::string &name) const
 
LogLevel getLogLevel () const
 
std::string getRequest () const
 
std::string getResponse () const
 
std::string getSoapAction () const
 
std::string getStringProperty (const std::string &name) const
 
bool hasResponse () const
 
bool isClient () const
 
bool isMessageProcessingStopped () const
 
bool isRequest () const
 
void setBoolProperty (const std::string &name, bool value)
 
void setCancelSession (bool c)
 
void setErrorMessage (const std::string &message)
 
void setHasResponse (bool response)
 
void setIntProperty (const std::string &name, int value)
 
void setIsClient (bool client)
 
void setIsRequest (bool req)
 
void setLogLevel (LogLevel l)
 
void setRequest (const std::string &request)
 
void setResponse (const std::string &response)
 
void setSoapAction (const std::string &soapAction)
 
void setStringProperty (const std::string &name, const std::string &value)
 
void stopMessageProcessing ()
 

Detailed Description

The base class for rwsf::CallInfo. Includes functionality to get and set various message and service properties, including transport properties, SOAP header properties, logging levels, and so on.

Note
This class is not intended to be used directly.

Member Enumeration Documentation

Enumeration containing logger levels. When a level is set, the logger reports messages at that level and below. For example, if the level is set to Info, which is the default for all clients, the logger reports messages at all levels from Info through Fatal.

Enumerator
None 

No messages are logged.

Info 

All messages are logged, i.e. Info, Warning, Error, and Fatal.

Warning 

Warn, Error, and Fatal messages.

Error 

Error and Fatal messages.

Fatal 

Fatal messages only.

Constructor & Destructor Documentation

rwsf::MessageProperties::MessageProperties ( )

Default constructor.

rwsf::MessageProperties::~MessageProperties ( )

Destructor.

Member Function Documentation

bool rwsf::MessageProperties::getBoolProperty ( const std::string &  name,
bool  def = false 
) const

Returns the bool setting for the property name. If the property is not set, returns def. If the property is "true", returns true, otherwise false.

bool rwsf::MessageProperties::getCancelSession ( ) const

Returns the bool setting for the property rwsf:CancelSession. If this value is true, then an HTTP transport will not maintain the session across calls. This value can be changed between requests.

std::string rwsf::MessageProperties::getErrorMessage ( ) const

Returns an error message as a string.

int rwsf::MessageProperties::getIntProperty ( const std::string &  name) const

Given a property name, returns the value as an int.

LogLevel rwsf::MessageProperties::getLogLevel ( ) const

Returns the LogLevel.

std::string rwsf::MessageProperties::getRequest ( ) const

Returns the request as a string.

std::string rwsf::MessageProperties::getResponse ( ) const

Returns the response as a string.

std::string rwsf::MessageProperties::getSoapAction ( ) const

Returns the value of the property rwsf:SoapAction. The rwsf:soapAction attribute specifies the value of the SOAPAction header for a given operation.

std::string rwsf::MessageProperties::getStringProperty ( const std::string &  name) const

Given a property name, returns the value as a string.

bool rwsf::MessageProperties::hasResponse ( ) const

Returns the bool value for the property rwsf:HasResponse. If true, this message requires a response; if false, no response is required.

bool rwsf::MessageProperties::isClient ( ) const

Returns the bool value of the property rwsf:IsClient.If the value is true, this is the client; otherwise, it's the server.

bool rwsf::MessageProperties::isMessageProcessingStopped ( ) const

Returns true if message processing has stopped, false otherwise. Applications may need to determine if processing has stopped before destroying some objects.

See also
stopMessageProcessing()
bool rwsf::MessageProperties::isRequest ( ) const

Returns the bool value of the property rwsf:isRequest. While requests are usually from clients, they may also come from servers in certain message patterns (such as notification); therefore, both properties rwsf:isClient and rwsf:isRequest must be true for this to be a client request.

void rwsf::MessageProperties::setBoolProperty ( const std::string &  name,
bool  value 
)

Sets the value of the property name to value.

void rwsf::MessageProperties::setCancelSession ( bool  c)

Sets the bool value for the property rwsf:CancelSession. If this value is true, then an HTTP transport will not maintain the session across calls. This value can be changed between requests.

void rwsf::MessageProperties::setErrorMessage ( const std::string &  message)

Sets the error message to message.

void rwsf::MessageProperties::setHasResponse ( bool  response)

Sets the bool value of rwsf:HasResponse. A value of true means this callInfo object contains a response; otherwise, it does not contain a response.

void rwsf::MessageProperties::setIntProperty ( const std::string &  name,
int  value 
)

Sets an int value on property name.

void rwsf::MessageProperties::setIsClient ( bool  client)

Sets the bool value of rwsf:isClient. A value of true identifies this message as a client; otherwise, it's a service.

void rwsf::MessageProperties::setIsRequest ( bool  req)

Sets the bool value of the property rwsf:IsRequest. A value of true identifies this message as a request; otherwise, it's a response.

void rwsf::MessageProperties::setLogLevel ( LogLevel  l)

Sets the LogLevel. The default is Error.

void rwsf::MessageProperties::setRequest ( const std::string &  request)

Sets the value of the rwsf::Request property with the string value in request.

void rwsf::MessageProperties::setResponse ( const std::string &  response)

Sets the value of the rwsf:Response property with the string value in response.

void rwsf::MessageProperties::setSoapAction ( const std::string &  soapAction)

Sets the value of the property rwsf:soapAction. The rwsf:soapAction attribute specifies the value of the SOAPAction header for a given operation.

void rwsf::MessageProperties::setStringProperty ( const std::string &  name,
const std::string &  value 
)

Sets a name/value property.

void rwsf::MessageProperties::stopMessageProcessing ( )

Stops the further processing of a message by the message processing layer, so that no further handlers are invoked. Invoke this method from your handler implementation by invoking callInfo.stopMessageProcessing(). For more information on message processing, see the Web Service Development Guide.

See also
isMessageProcessingStopped()

Copyright © 2019 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.