HydraExpress™ C++ API Reference Guide

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

All generated client proxies derive from rwsf::Client. More...

#include <rwsf/webservice/Client.h>

Inheritance diagram for rwsf::Client:
rwsf::MessageHandler rwsf::HandleBase

Public Member Functions

 Client ()
 
virtual ~Client ()
 
void addFaultHandler (const rwsf::MessageHandler &handler)
 
void addGlobalRequestHandler (const rwsf::MessageHandler &handler)
 
void addGlobalResponseHandler (const rwsf::MessageHandler &handler)
 
void addServiceRequestHandler (const rwsf::MessageHandler &handler)
 
void addServiceResponseHandler (const rwsf::MessageHandler &handler)
 
void addTransportHandler (const rwsf::MessageHandler &handler)
 
std::string getProperty (const std::string &key) const
 
virtual void init (const rwsf::Config &initParams)
 
void setProperty (const std::string &key, const std::string &value)
 
void setTransport (const rwsf::Transport &transport)
 
- Public Member Functions inherited from rwsf::MessageHandler
 MessageHandler ()
 
 MessageHandler (const MessageHandler &handler)
 
 MessageHandler (MessageHandlerImp *impl)
 
 ~MessageHandler ()
 
void destroy ()
 
void init (const rwsf::Config &initParams)
 
void invoke (rwsf::CallInfo &callInfo)
 
MessageHandleroperator= (const MessageHandler &obj)
 
- Public Member Functions inherited from rwsf::HandleBase
bool isValid (void) const
 
bool operator!= (const HandleBase &second) const
 
bool operator== (const HandleBase &second) const
 

Additional Inherited Members

- Protected Member Functions inherited from rwsf::HandleBase
 HandleBase (void)
 
 HandleBase (StaticCtor)
 
 HandleBase (BodyBase *body)
 
 HandleBase (const HandleBase &second)
 
virtual ~HandleBase (void)
 
BodyBase & body (void) const
 
HandleBaseoperator= (const HandleBase &second)
 

Detailed Description

All generated client proxies derive from rwsf::Client. Clients are handlers in RWSF, so this class derives from rwsf::MessageHandler. rwsf::Client includes methods to add various handlers to the client. For more information on handlers and clients, see the Web Services User Guide

Note
This class uses reference semantics in which an instance of this class represents a reference to an implementation class.

Constructor & Destructor Documentation

rwsf::Client::Client ( )

Default constructor.

virtual rwsf::Client::~Client ( )
virtual

Destructor.

Member Function Documentation

void rwsf::Client::addFaultHandler ( const rwsf::MessageHandler handler)

Adds a fault handler to the client. Fault handlers are invoked in exceptional situations and are best suited for providing custom message and error handling before the exception is rethrown.

Note
The exception message is stored in the properties contained by rwsf::CallInfo under the key rwsf:FaultMessage and can be retrieved by calling getStringProperty("rwsf::FaultMessage) on the rwsf::CallInfo instance.
void rwsf::Client::addGlobalRequestHandler ( const rwsf::MessageHandler handler)

Adds a global request handler to this client. Global request handlers are called directly after the service request handlers, and before the message is marshaled.

Note
Global request handlers are best suited for tasks in which you need to access parts of a message for all requests before the message is marshaled.
void rwsf::Client::addGlobalResponseHandler ( const rwsf::MessageHandler handler)

Adds a global response handler to this client. Global response handlers are invoked after the transport handlers, and after the message has been unmarshaled.

Note
Global response handlers are best suited for tasks in which you need to access parts of a message for all responses, before the response is passed back to the caller.
void rwsf::Client::addServiceRequestHandler ( const rwsf::MessageHandler handler)

Adds a service request handler to this client. Service request handlers are the first handlers invoked before sending a message to the server, and therefore are called before a message is marshaled.

Note
Service request handlers are best suited for tasks in which you need to access parts of a message for a particular service request before the message is marshaled.
void rwsf::Client::addServiceResponseHandler ( const rwsf::MessageHandler handler)

Adds a service response handler to this client. Service response handlers are invoked after the global response handlers.

Note
Service response handlers are best suited for tasks in which you need to access parts of the message for a particular service before response is passed back to the caller.
void rwsf::Client::addTransportHandler ( const rwsf::MessageHandler handler)

Adds a transport handler to this client. Transport handlers are invoked right after a message is marshaled and right before sending the message to the server. When a response is received from the server, the transport handlers are invoked again, but in reverse order.

Note
Transport handlers are best suited for tasks that must be performed on the entire message. Use a request handler if you need to access parts of the message.
std::string rwsf::Client::getProperty ( const std::string &  key) const

Given a key, returns the value of an initialization parameter on this client. The only system-provided key is "rwsf:doEscape", but any custom key stored using setProperty() is valid.

virtual void rwsf::Client::init ( const rwsf::Config initParams)
virtual

Initializes the client object. This method can be used to initialize client properties with an existing rwsf::Config object.

void rwsf::Client::setProperty ( const std::string &  key,
const std::string &  value 
)

Sets an initialization parameter key with the given value on this client.

Note
The only initialization property key/value pair used by the client is rwsf:doEscape. The rwsf:doEscape property is used to escape special characters in requests and responses. Set the rwsf:doEscape value to true to escape special characters, and false to not escape. You may also use this method to set any property that your application may require.
void rwsf::Client::setTransport ( const rwsf::Transport transport)

Sets the transport for this client to transport, disconnecting any existing transport.

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.