rwsf::CallInforwsf::MessageProperties
#include rwsf/webservice/CallInfo.h
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. A 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 a 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:
int handler(int in1_in); int handler(rwsf::CallInfo& callInfo, int in1_in);
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.
CallInfo();
Default constructor. Constructs an empty instance of rwsf::CallInfo.
~CallInfo();
Destructor.
void addParameter(const ParameterObject & p);
Inserts parameter p into this callInfo object.
void addRequestAttachment(const rwsf::MessageAttachment & a);
Adds a rwsf::MessageAttachmenta to the request message.
void 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 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. Additional parameter of type.
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());
Adds a SOAP header to the request. Additional parameter of a reference to type.
void addRequestTransportHeader(const std::string & name, const std::string & value);
Adds a transport header to the request.
void addResponseAttachment(const rwsf::MessageAttachment & a);
Adds a rwsf::MessageAttachment a to the response message.
void 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 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.
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());
Adds a SOAP header to response.
void addResponseTransportHeader(const std::string & name, const std::string & value);
Adds a generated transport header and its value to the response.
void clearAll();
Clears all SOAP headers and transport headers from this message.
void clearParameters();
Clears all parameters from this callinfo object.
void clearRequestAttachments();
Clears the list of attachments associated with the request message.
void clearRequestSoapHeaders();
Clears SOAP headers from the request.
void clearRequestTransportHeaders();
Clears transport headers from the request.
void clearResponseAttachments();
Clears the list of attachments associated with the response message.
void clearResponseSoapHeaders();
Clears SOAP headers from the response.
void clearResponseTransportHeaders();
Clears transport headers from the response.
rwsf::Attribute get(const std::string & attributeName) const;
Returns the attribute attributeName.
rwsf::Enumeration< std::string > getAttributeNames() const;
Returns an enumeration of the names of all rwsf::Attributes in the callInfo object.
std::string getMethodEncoding();
Returns the method's encoding.
rwsf::XmlName getMethodName();
Returns the method's name.
ParameterObject getParameterObject(const rwsf::XmlName & name) const;
Returns the ParameterObject.
std::list< ParameterObject > & getParameters() const;
Returns the contents of this ParameterObject as a std::list.
rwsf::MessageAttachment getRequestAttachment(const std::string & reference) const;
Returns a 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.
std::list< rwsf::MessageAttachment > & getRequestAttachments() const;
Returns a list of attachments associated with the request message.
rwsf::MessageMarshaller getRequestMessageMarshaller() const;
Returns the message marshaler for this request.
rwsf::Enumeration< rwsf::XmlName > getRequestSoapHeaderNames() const;
Returns an enumeration of the names of all request SOAP headers.
SoapHeaderObject getRequestSoapHeaderObject(const rwsf::XmlName & name) const;
Returns the request SOAP header object as a value-based structure. See SoapHeaderObject in this class.
std::string getRequestSoapHeaderValue(const rwsf::XmlName & headerName) const;
Returns the request SOAP header's value as a string.
rwsf::Enumeration< std::string > getRequestTransportHeaderNames() const;
Returns an enumeration of the names of all request transport headers.
TransportHeaderObject getRequestTransportHeaderObject(const std::string & name) const;
Returns the request transport header object as a value-based structure. See TransportHeaderObject in this class.
rwsf::Enumeration< TransportHeaderObject > getRequestTransportHeaders() const;
Returns an enumeration containing all the request transport headers.
std::string getRequestTransportHeaderValue(const std::string & name) const;
Returns the request transport header's value as a string.
rwsf::MessageAttachment getResponseAttachment(const std::string & reference) const;
Returns a 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.
std::list< rwsf::MessageAttachment > & getResponseAttachments() const;
Returns a list of attachments associated with the response message.
rwsf::Enumeration< rwsf::XmlName > getResponseSoapHeaderNames() const;
Returns an enumeration containing the names of all response SOAP headers.
SoapHeaderObject getResponseSoapHeaderObject(const rwsf::XmlName & name) const;
Returns the response SOAP header object as a value-based structure. See SoapHeaderObject in this class.
std::string getResponseSoapHeaderValue(const rwsf::XmlName & headerName) const;
Returns the value of the response SOAP header identified by the parameter headerName.
rwsf::Enumeration< std::string > getResponseTransportHeaderNames() const;
Returns an enumeration of the names of all response transport headers.
TransportHeaderObject getResponseTransportHeaderObject(const std::string & name) const;
Returns the response transport header object as a value-based structure. See TransportHeaderObject in this class.
rwsf::Enumeration< TransportHeaderObject > getResponseTransportHeaders() const;
Returns an enumeration containing all the response transport headers.
std::string getResponseTransportHeaderValue(const std::string & name) const;
Returns the value of the response transport header as a string.
bool isMarshal();
Returns the value of isMarshal_. A value of true indicates that a SOAP message is being marshaled in the current CallInfo object; a value of false means the message is to be unmarshaled.
bool isOneWay() const;
Returns the value of isOneWay_. A value of true means this header is part of a one-way message (as opposed to the traditional request/response).
bool isRequestSoapHeaderSet(const rwsf::XmlName & headerName) const;
Returns true if there is a request SOAP header with the name of headerName.
bool isRequestTransportHeaderSet(const std::string & name) const;
Returns true of there is a request transport header with the name of name.
bool isResponseSoapHeaderSet(const rwsf::XmlName & headerName) const;
Returns true if there is a response SOAP header with the name of headerName.
bool isResponseTransportHeaderSet(const std::string & name) const;
Returns true if there is a response transport header with the name of name.
void put(const std::string & attributeName, const rwsf::Attribute & value);
Adds a name/value attribute to this callInfo object.
void removeParameter(const rwsf::XmlName & name);
Removes the parameter name from this callInfo object.
void removeRequestAttachment(const std::string & reference);
Removes a 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 removeRequestSoapHeader(const rwsf::XmlName & headerName);
Removes the request message's SOAP header headerName from the callInfo object.
void removeRequestTransportHeader(const std::string & name);
Removes the request message's transport header name from the callInfo object.
void removeResponseAttachment(const std::string & reference);
Removes a 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 removeResponseSoapHeader(const rwsf::XmlName & headerName);
Removes the response message's SOAP header headerName from the callInfo object.
void removeResponseTransportHeader(const std::string & name);
Removes the response message's transport header name from the callInfo object.
void setIsMarshal(bool isMarshal);
Sets the value of isMarshal. The default is true.
void setIsOneWay(const bool isOneWay);
Sets the value of isOneWay_. A value of true means this header is one way (rather than the traditional request/response).
void setMethodEncoding(const std::string & encoding);
Sets the encoding of this method.
void setMethodName(const rwsf::XmlName & method);
Sets the name of this method.
std::string soapRequestHeadersAsString(const std::string & soapEnvPrefix = "SOAP-ENV") const;
Returns all request SOAP headers as a string suitable for inclusion in a SOAP message.
std::string soapResponseHeadersAsString(const std::string & soapEnvPrefix = "SOAP-ENV") const;
Returns all response SOAP headers as a string suitable for inclusion in a SOAP message.
© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.