rwsf::CallInfo rwsf::MessageProperties
#include <rw/rwsf/soapworx/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.
struct SoapHeaderObject { SoapHeaderObject(); bool operator==(const SoapHeaderObject& obj) const; rwsf::XmlName name_; std::string value_; std::string type_; bool mustUnderstand_; std::string actor_; rwsf::XmlAttributeSet attributes_; };
Sets the values for the elements in the SOAP header object.
struct TransportHeaderObject { TransportHeaderObject(); bool operator==(const TransportHeaderObject& obj) const; std::string name_; std::string value_; };
Sets the values for the elements in the transport header.
void addRequestAttachment(const rwsf::MessageAttachment& a);
Adds a rwsf::MessageAttachment a to the request message.
void addParameter(const ParameterObject& p);
Inserts parameter p into this callInfo object.
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
Parameters:
headerName |
the local name and namespace of the header |
value |
the value of the header entry as a string |
mustUnderstand |
indicates whether or not the receiver must understand the meaning of the header to process the document. The default is false. (optional) |
actor |
the designated receiver of the header (optional). |
attrs |
stores any unexpected header elements or additional user-defined header attributes |
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.
Parameters:
headerName |
the local name and namespace of the header |
value |
the value of the header entry as a string |
mustUnderstand |
indicates whether or not the receiver must understand the meaning of the header to process the document. The default is false. (optional) |
actor |
the designated receiver of the header (optional) |
type |
xsi:type of the header |
attrs |
stores any unexpected header elements or additional user-defined header attributes |
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.
Parameters:
headerName |
the local name and namespace of the header |
value |
the value of the header entry as a string |
mustUnderstand |
indicates whether or not the receiver must understand the meaning of the header to process the document. The default is false. (optional) |
actor |
the designated receiver of the header (optional) |
type |
xsi:type of the header |
attrs |
stores any unexpected header elements or additional user-defined header attributes |
void addRequestTransportHeader(const std::string& name, const std::string& value);
Adds a transport header to the request.
Parameters:
name |
the local name and namespace of the header |
value |
the value of the header entry as a string |
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.
Parameters:
headerName |
the local name and namespace of the header |
value |
the value of the header entry as a string |
mustUnderstand |
indicates whether or not the receiver must understand the meaning of the header to process the document. The default is false. (optional) |
actor |
the designated receiver of the header (optional) |
attrs |
stores any unexpected header elements or additional user-defined header attributes |
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.
Parameters:
headerName |
the local name and namespace of the header |
value |
the value of the header entry as a string |
mustUnderstand |
indicates whether or not the receiver must understand the meaning of the header to process the document. The default is false. (optional) |
actor |
the designated receiver of the header (optional) |
type |
the xsi:type |
attrs |
stores any unexpected header elements or additional user-defined header attributes |
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.
Parameters:
headerName |
the local name and namespace of the header |
value |
the value of the header entry as a string |
must understand |
indicates whether or not the receiver must understand the meaning of the header to process the document. The default is false. (optional) |
actor |
the designated receiver of the header (optional) |
type |
the xsi:type |
attrs |
stores any unexpected header elements or additional user-defined header attributes |
void addResponseTransportHeader(const std::string& name, const std::string& value);
Adds a generated transport header and its value to the response.
Parameters:
name |
the name of the header |
value |
the value of the header entry as a string |
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<rwsf::CallInfo::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<TransportHeaderObject> getRequestTransportHeaders() const;
Returns an enumeration containing all the request transport headers.
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.
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<TransportHeaderObject> getResponseTransportHeaderNames() const;
Returns an enumeration of the names of all response transport headers.
rwsf::Enumeration<TransportHeaderObject> getResponseTransportHeaders() const;
Returns an enumeration containing all the 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.
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 removeResponseSoapHeader(const rwsf::XmlName& headerName);
Removes the response message's SOAP header headerName from the 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 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 setMethodEncoding(const std::string& encoding);
Sets the encoding of this method.
void setMethodName(const rwsf::XmlName& method);
Sets the name of this method.
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).
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.
ParameterObject();
Default constructor.
~ParameterObject();
Default destructor.
ParameterObject(const rwsf::XmlName& name);
Constructs a parameter object with the value of name.
bool operator==(const ParameterObject& obj) const;
Returns true if self compares equal to obj, otherwise returns false.
std::string getValue()
Returns the parameter object's value. With wrapped style, a vector of values is possible. In this case, the first value in the list is returned.
void setValue(const std::string& value)
Sets the value of this parameter object. With wrapped style, a vector of values is possible. In this case, sets the first value in the list.
void appendValue(const std::string& value)
Appends value to the existing value(s) in this parameter object. Note that this member function is relevant only when using wrapped style with a parameter that is a list of values; in all other cases, only the first value is used.
size_t valueEntries()
Returns the number of values the parameter object has. Note that the only time there may be more than one value is with use of wrapped style when the parameter is a vector of values.
std::listIterator<std::string> getValues()
Returns an iterator initialized with the list of value(s) for this parameter object. Note that the existence of more than one value is possible only with the use of wrapped style when the parameter is a vector of values.
Static Variables
rwsf::XmlName name_
Name of the parameter
bool isParameter_
true if is an actual parameter (not just a reference, say in an array)
bool isSimple_
true if simple type
bool isAttachment_
true if attachment
std::string type_
type of parameter
rwsf::XmlReader rdr_
Reader for this parameter ready to read the element
©2004-2007 Copyright Quovadx, Inc. All Rights Reserved.
Quovadx and Rogue Wave are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.