HydraExpress™ C++ 2020 |
HydraExpress™ C++ API Reference Guide |
Product Documentation: HydraExpress C++ Documentation Home |
Holds all data for a given message, such as session or transaction data, SOAP headers, and any other custom data. More...
#include <rwsf/webservice/CallInfo.h>
Classes | |
class | ParameterObject |
Represents operation parameters. Generally not for direct use. More... | |
struct | SoapHeaderObject |
Represents element values in a SOAP header object. More... | |
struct | TransportHeaderObject |
Represents element values in a transport header. More... | |
Public Member Functions | |
CallInfo () | |
~CallInfo () | |
void | addParameter (const ParameterObject &p) |
void | addRequestAttachment (const rwsf::MessageAttachment &a) |
void | addRequestSoapHeader (const rwsf::XmlName &headerName, const std::string &value, bool mustUnderstand=false, const std::string &actor="", const XmlAttributeSet &attrs=XmlAttributeSet()) |
void | addRequestSoapHeader (const rwsf::XmlName &headerName, const std::string &value, const char *type, bool mustUnderstand=false, const std::string &actor="", const XmlAttributeSet &attrs=XmlAttributeSet()) |
void | addRequestSoapHeader (const rwsf::XmlName &headerName, const std::string &value, const std::string &type, bool mustUnderstand=false, const std::string &actor="", const XmlAttributeSet &attrs=XmlAttributeSet()) |
void | addRequestTransportHeader (const std::string &name, const std::string &value) |
void | addResponseAttachment (const rwsf::MessageAttachment &a) |
void | addResponseSoapHeader (const rwsf::XmlName &headerName, const std::string &value, bool mustUnderstand=false, const std::string &actor="", const XmlAttributeSet &attrs=XmlAttributeSet()) |
void | addResponseSoapHeader (const rwsf::XmlName &headerName, const std::string &value, const char *type, bool mustUnderstand=false, const std::string &actor="", const XmlAttributeSet &attrs=XmlAttributeSet()) |
void | addResponseSoapHeader (const rwsf::XmlName &headerName, const std::string &value, const std::string &type, bool mustUnderstand=false, const std::string &actor="", const XmlAttributeSet &attrs=XmlAttributeSet()) |
void | addResponseTransportHeader (const std::string &name, const std::string &value) |
void | clearAll () |
void | clearParameters () |
void | clearRequestAttachments () |
void | clearRequestSoapHeaders () |
void | clearRequestTransportHeaders () |
void | clearResponseAttachments () |
void | clearResponseSoapHeaders () |
void | clearResponseTransportHeaders () |
rwsf::Attribute | get (const std::string &attributeName) const |
rwsf::Enumeration< std::string > | getAttributeNames () const |
std::string | getMethodEncoding () |
rwsf::XmlName | getMethodName () |
ParameterObject | getParameterObject (const rwsf::XmlName &name) const |
std::list< ParameterObject > & | getParameters () const |
rwsf::MessageAttachment | getRequestAttachment (const std::string &reference) const |
std::list< rwsf::MessageAttachment > & | getRequestAttachments () const |
rwsf::Enumeration< rwsf::XmlName > | getRequestSoapHeaderNames () const |
SoapHeaderObject | getRequestSoapHeaderObject (const rwsf::XmlName &name) const |
std::string | getRequestSoapHeaderValue (const rwsf::XmlName &headerName) const |
rwsf::Enumeration< std::string > | getRequestTransportHeaderNames () const |
TransportHeaderObject | getRequestTransportHeaderObject (const std::string &name) const |
rwsf::Enumeration< TransportHeaderObject > | getRequestTransportHeaders () const |
std::string | getRequestTransportHeaderValue (const std::string &name) const |
rwsf::MessageAttachment | getResponseAttachment (const std::string &reference) const |
std::list< rwsf::MessageAttachment > & | getResponseAttachments () const |
rwsf::Enumeration< rwsf::XmlName > | getResponseSoapHeaderNames () const |
SoapHeaderObject | getResponseSoapHeaderObject (const rwsf::XmlName &name) const |
std::string | getResponseSoapHeaderValue (const rwsf::XmlName &headerName) const |
rwsf::Enumeration< std::string > | getResponseTransportHeaderNames () const |
TransportHeaderObject | getResponseTransportHeaderObject (const std::string &name) const |
rwsf::Enumeration< TransportHeaderObject > | getResponseTransportHeaders () const |
std::string | getResponseTransportHeaderValue (const std::string &name) const |
bool | isMarshal () |
bool | isOneWay () const |
bool | isRequestSoapHeaderSet (const rwsf::XmlName &headerName) const |
bool | isRequestTransportHeaderSet (const std::string &name) const |
bool | isResponseSoapHeaderSet (const rwsf::XmlName &headerName) const |
bool | isResponseTransportHeaderSet (const std::string &name) const |
void | put (const std::string &attributeName, const rwsf::Attribute &value) |
void | removeParameter (const rwsf::XmlName &name) |
void | removeRequestAttachment (const std::string &reference) |
void | removeRequestSoapHeader (const rwsf::XmlName &headerName) |
void | removeRequestTransportHeader (const std::string &name) |
void | removeResponseAttachment (const std::string &reference) |
void | removeResponseSoapHeader (const rwsf::XmlName &headerName) |
void | removeResponseTransportHeader (const std::string &name) |
void | setIsMarshal (bool isMarshal) |
void | setIsOneWay (const bool isOneWay) |
void | setMethodEncoding (const std::string &encoding) |
void | setMethodName (const rwsf::XmlName &method) |
std::string | soapRequestHeadersAsString (const std::string &soapEnvPrefix="SOAP-ENV") const |
std::string | soapResponseHeadersAsString (const std::string &soapEnvPrefix="SOAP-ENV") const |
Public Member Functions inherited from rwsf::MessageProperties | |
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 () |
Additional Inherited Members | |
Public Types inherited from rwsf::MessageProperties | |
enum | LogLevel { None, Info, Warning, Error, Fatal } |
An instance of rwsf::CallInfo contains data about a message, including session or transaction data, SOAP headers, or transport headers. This class can also be used to hold any other desired data relevant to this SOAP message. An rwsf::CallInfo object is passed from the client to the transport on the client side, and from the servlet to the skeleton and down to the service implementation on the server side.
Each callInfo
object is automatically initialized with three attributes: a rwsf:SessionID
, a rwsf:Session
, and a rwsf:RequestURL
, while all other elements are optional. If no transport header is defined in this class, the default transport type is HTTP. (See rwsf::Transport.) Any number of headers or other objects may be added to the callInfo
object.
Each service operation method takes a callInfo
object as a parameter. A callInfo
object carries data as a key/value pair. Each key is a simple string identifier. Each value is an rwsf::Attribute.
Additional SOAP headers or transport headers may be added or deleted at any point during processing. Any headers attached to the request message will appear as requestHeaders
in the callInfo
object. Likewise, any headers returning to the client in the response message will show up as responseHeaders
.
The service operation methods in the generated client proxy are overloaded with either a callInfo
object as a parameter or not, as follows:
If your message does not contain any customized headers or objects, there is no need to pass the callInfo
object throughout the service, so you may want to use the first method when creating your proxy.
rwsf::CallInfo::CallInfo | ( | ) |
Default constructor. Constructs an empty instance of rwsf::CallInfo.
rwsf::CallInfo::~CallInfo | ( | ) |
Destructor.
void rwsf::CallInfo::addParameter | ( | const ParameterObject & | p | ) |
Inserts parameter p into this callInfo
object.
void rwsf::CallInfo::addRequestAttachment | ( | const rwsf::MessageAttachment & | a | ) |
Adds an rwsf::MessageAttachment a to the request message.
void rwsf::CallInfo::addRequestSoapHeader | ( | const rwsf::XmlName & | headerName, |
const std::string & | value, | ||
bool | mustUnderstand = false , |
||
const std::string & | actor = "" , |
||
const XmlAttributeSet & | attrs = XmlAttributeSet() |
||
) |
Adds a SOAP header to the request.
void rwsf::CallInfo::addRequestSoapHeader | ( | const rwsf::XmlName & | headerName, |
const std::string & | value, | ||
const char * | type, | ||
bool | mustUnderstand = false , |
||
const std::string & | actor = "" , |
||
const XmlAttributeSet & | attrs = XmlAttributeSet() |
||
) |
Adds a SOAP header to the request. The type parameter specifies the xsi:type associated with the header.
void rwsf::CallInfo::addRequestSoapHeader | ( | const rwsf::XmlName & | headerName, |
const std::string & | value, | ||
const std::string & | type, | ||
bool | mustUnderstand = false , |
||
const std::string & | actor = "" , |
||
const XmlAttributeSet & | attrs = XmlAttributeSet() |
||
) |
Adds a SOAP header to the request. The type parameter specifies the xsi:type associated with the header.
void rwsf::CallInfo::addRequestTransportHeader | ( | const std::string & | name, |
const std::string & | value | ||
) |
Adds a transport header to the request.
void rwsf::CallInfo::addResponseAttachment | ( | const rwsf::MessageAttachment & | a | ) |
Adds an rwsf::MessageAttachment a to the response message.
void rwsf::CallInfo::addResponseSoapHeader | ( | const rwsf::XmlName & | headerName, |
const std::string & | value, | ||
bool | mustUnderstand = false , |
||
const std::string & | actor = "" , |
||
const XmlAttributeSet & | attrs = XmlAttributeSet() |
||
) |
Adds a SOAP header to the response.
void rwsf::CallInfo::addResponseSoapHeader | ( | const rwsf::XmlName & | headerName, |
const std::string & | value, | ||
const char * | type, | ||
bool | mustUnderstand = false , |
||
const std::string & | actor = "" , |
||
const XmlAttributeSet & | attrs = XmlAttributeSet() |
||
) |
Adds a SOAP header to the response. The type parameter specifies the xsi:type associated with the header.
void rwsf::CallInfo::addResponseSoapHeader | ( | const rwsf::XmlName & | headerName, |
const std::string & | value, | ||
const std::string & | type, | ||
bool | mustUnderstand = false , |
||
const std::string & | actor = "" , |
||
const XmlAttributeSet & | attrs = XmlAttributeSet() |
||
) |
Adds a SOAP header to response. The type parameter specifies the xsi:type associated with the header.
void rwsf::CallInfo::addResponseTransportHeader | ( | const std::string & | name, |
const std::string & | value | ||
) |
Adds a generated transport header and its value to the response.
void rwsf::CallInfo::clearAll | ( | ) |
Clears all SOAP headers and transport headers from this message.
void rwsf::CallInfo::clearParameters | ( | ) |
Clears all parameters from this callInfo
object.
void rwsf::CallInfo::clearRequestAttachments | ( | ) |
Clears the list of attachments associated with the request message.
void rwsf::CallInfo::clearRequestSoapHeaders | ( | ) |
Clears SOAP headers from the request.
void rwsf::CallInfo::clearRequestTransportHeaders | ( | ) |
Clears transport headers from the request.
void rwsf::CallInfo::clearResponseAttachments | ( | ) |
Clears the list of attachments associated with the response message.
void rwsf::CallInfo::clearResponseSoapHeaders | ( | ) |
Clears SOAP headers from the response.
void rwsf::CallInfo::clearResponseTransportHeaders | ( | ) |
Clears transport headers from the response.
rwsf::Attribute rwsf::CallInfo::get | ( | const std::string & | attributeName | ) | const |
Returns the attribute attributeName.
rwsf::Enumeration<std::string> rwsf::CallInfo::getAttributeNames | ( | ) | const |
Returns an enumeration of the names of all rwsf::Attribute objects in the callInfo
object.
std::string rwsf::CallInfo::getMethodEncoding | ( | ) |
Returns the method's encoding.
rwsf::XmlName rwsf::CallInfo::getMethodName | ( | ) |
Returns the method's name.
ParameterObject rwsf::CallInfo::getParameterObject | ( | const rwsf::XmlName & | name | ) | const |
Returns the ParameterObject associated with parameter name. If no ParameterObject is associated with name, this function constructs and returns an empty instance of ParameterObject.
std::list<ParameterObject>& rwsf::CallInfo::getParameters | ( | ) | const |
Returns all of the ParameterObject instances associated with this CallInfo.
rwsf::MessageAttachment rwsf::CallInfo::getRequestAttachment | ( | const std::string & | reference | ) | const |
Returns an rwsf::MessageAttachment from the request message. The parameter reference refers to the Content-ID
(or if not present, the Content-Location
) header of the attachment. If the reference is not found, an empty MessageAttachment is constructed and returned.
std::list<rwsf::MessageAttachment>& rwsf::CallInfo::getRequestAttachments | ( | ) | const |
Returns a list of attachments associated with the request message.
rwsf::Enumeration<rwsf::XmlName> rwsf::CallInfo::getRequestSoapHeaderNames | ( | ) | const |
Returns an enumeration of the names of all request SOAP headers.
SoapHeaderObject rwsf::CallInfo::getRequestSoapHeaderObject | ( | const rwsf::XmlName & | name | ) | const |
Returns the request SOAP header object as a value-based structure. See SoapHeaderObject in this class. If name is not found, constructs and returns an empty SoapHeaderObject.
std::string rwsf::CallInfo::getRequestSoapHeaderValue | ( | const rwsf::XmlName & | headerName | ) | const |
Returns the request SOAP header's value as a string. If headerName
not found returns an empty string.
rwsf::Enumeration<std::string> rwsf::CallInfo::getRequestTransportHeaderNames | ( | ) | const |
Returns an enumeration of the names of all request transport headers.
TransportHeaderObject rwsf::CallInfo::getRequestTransportHeaderObject | ( | const std::string & | name | ) | const |
Returns the request transport header object as a value-based structure. See TransportHeaderObject in this class. If name is not found, constructs and returns an empty TransportHeaderObject.
rwsf::Enumeration<TransportHeaderObject> rwsf::CallInfo::getRequestTransportHeaders | ( | ) | const |
Returns an enumeration of all the request transport headers.
std::string rwsf::CallInfo::getRequestTransportHeaderValue | ( | const std::string & | name | ) | const |
Returns the request transport header's value as a string. If name not found returns an empty string.
rwsf::MessageAttachment rwsf::CallInfo::getResponseAttachment | ( | const std::string & | reference | ) | const |
Returns an rwsf::MessageAttachment from the response message. The parameter reference refers to the Content-ID
(or if not present, the Content-Location
) header of the attachment. If the reference is not found, an empty MessageAttachment is constructed and returned.
std::list<rwsf::MessageAttachment>& rwsf::CallInfo::getResponseAttachments | ( | ) | const |
Returns a list of attachments associated with the response message.
rwsf::Enumeration<rwsf::XmlName> rwsf::CallInfo::getResponseSoapHeaderNames | ( | ) | const |
Returns an enumeration of the names of all response SOAP headers.
SoapHeaderObject rwsf::CallInfo::getResponseSoapHeaderObject | ( | const rwsf::XmlName & | name | ) | const |
Returns the response SOAP header object as a value-based structure. See SoapHeaderObject in this class. If name is not found, constructs and returns an empty SoapHeaderObject.
std::string rwsf::CallInfo::getResponseSoapHeaderValue | ( | const rwsf::XmlName & | headerName | ) | const |
Returns the value of the response SOAP header identified by the parameter headerName.
rwsf::Enumeration<std::string> rwsf::CallInfo::getResponseTransportHeaderNames | ( | ) | const |
Returns an enumeration of the names of all response transport headers.
TransportHeaderObject rwsf::CallInfo::getResponseTransportHeaderObject | ( | const std::string & | name | ) | const |
Returns the response transport header object as a value-based structure. See TransportHeaderObject in this class. If name is not found, constructs and returns an empty TransportHeaderObject.
rwsf::Enumeration<TransportHeaderObject> rwsf::CallInfo::getResponseTransportHeaders | ( | ) | const |
Returns an enumeration of all the response transport headers.
std::string rwsf::CallInfo::getResponseTransportHeaderValue | ( | const std::string & | name | ) | const |
Returns the value of the response transport header as a string. If name
not found returns an empty string.
bool rwsf::CallInfo::isMarshal | ( | ) |
Returns c true if a SOAP message is being marshaled in the current CallInfo
object; false
if the message is to be unmarshaled.
bool rwsf::CallInfo::isOneWay | ( | ) | const |
Returns true
if this is a one-way message (as opposed to the traditional request/response), false
, otherwise.
bool rwsf::CallInfo::isRequestSoapHeaderSet | ( | const rwsf::XmlName & | headerName | ) | const |
Returns true
if there is a request SOAP header with the name of headerName. If headerName is not found, returns false
.
bool rwsf::CallInfo::isRequestTransportHeaderSet | ( | const std::string & | name | ) | const |
Returns true
of there is a request transport header with the name of name. If name is not found, returns false
.
bool rwsf::CallInfo::isResponseSoapHeaderSet | ( | const rwsf::XmlName & | headerName | ) | const |
Returns true
if there is a response SOAP header with the name of headerName. If headerName is not found, returns false
.
bool rwsf::CallInfo::isResponseTransportHeaderSet | ( | const std::string & | name | ) | const |
Returns true
if there is a response transport header with the name of name. If name is not found, returns false
.
void rwsf::CallInfo::put | ( | const std::string & | attributeName, |
const rwsf::Attribute & | value | ||
) |
Adds a name/value attribute to this callInfo
object.
void rwsf::CallInfo::removeParameter | ( | const rwsf::XmlName & | name | ) |
Removes the parameter name from this callInfo
object.
void rwsf::CallInfo::removeRequestAttachment | ( | const std::string & | reference | ) |
Removes an rwsf::MessageAttachment from the request message. The parameter reference refers to the Content-ID
(or if not present, the Content-Location
) header of the attachment.
void rwsf::CallInfo::removeRequestSoapHeader | ( | const rwsf::XmlName & | headerName | ) |
Removes the request message's SOAP header headerName from the callInfo
object.
void rwsf::CallInfo::removeRequestTransportHeader | ( | const std::string & | name | ) |
Removes the request message's transport header name from the callInfo
object.
void rwsf::CallInfo::removeResponseAttachment | ( | const std::string & | reference | ) |
Removes an rwsf::MessageAttachment from the response message. The parameter reference refers to the Content-ID
(or if not present, the Content-Location
) header of the attachment.
void rwsf::CallInfo::removeResponseSoapHeader | ( | const rwsf::XmlName & | headerName | ) |
Removes the response message's SOAP header headerName from the callInfo
object.
void rwsf::CallInfo::removeResponseTransportHeader | ( | const std::string & | name | ) |
Removes the response message's transport header name from the callInfo
object.
void rwsf::CallInfo::setIsMarshal | ( | bool | isMarshal | ) |
void rwsf::CallInfo::setIsOneWay | ( | const bool | isOneWay | ) |
Sets the bool
that defines whether the message is one-way. A value of true
means this is one-way message (rather than the traditional request/response).
void rwsf::CallInfo::setMethodEncoding | ( | const std::string & | encoding | ) |
Sets the encoding of this method to encoding.
void rwsf::CallInfo::setMethodName | ( | const rwsf::XmlName & | method | ) |
Sets the name of this method to method.
std::string rwsf::CallInfo::soapRequestHeadersAsString | ( | const std::string & | soapEnvPrefix = "SOAP-ENV" | ) | const |
Returns all request SOAP headers as a string suitable for inclusion in a SOAP message. If SOAP header is empty returns an empty string.
std::string rwsf::CallInfo::soapResponseHeadersAsString | ( | const std::string & | soapEnvPrefix = "SOAP-ENV" | ) | const |
Returns all response SOAP headers as a string suitable for inclusion in a SOAP message. If SOAP header is empty returns an empty string.
Copyright © 2020 Rogue Wave Software, Inc. All Rights Reserved. |