Does not inherit
#include rwsf/webservice/MessageAttachment.h
In generated code, rwsf represents any message parts specified in a WSDL with a Multipurpose Internet Mail Extensions (MIME) binding as type rwsf::MessageAttachment. This class encapsulates the message payload, its Content-Type, and any custom- defined Content-Id or Content-Locationdata.
MessageAttachment();
Default constructor. The message will be assigned a default unique Content-ID header, and will be assigned a Content-Type of 'application/binary'.
MessageAttachment(const std::string & uid, const std::string & ct = "application/binary");
Constructs a MessageAttachment with the specified uid and Content-Type. The uid specified should be in the form of a URL. If the URL is of the cid scheme, a Content-ID header will be associated with that value, otherwise a Content-Location will be used.
MessageAttachment(const MessageAttachment & m);
Copy constructor.
std::string getContentId() const;
Get the Content-ID header associated with this instance. If it is not present, a null string is returned.
std::string getContentLocation() const;
Get the Content-Location header associated with this instance. If it is not present, a null string is returned.
std::string getContentType() const;
Gets the Content-Type header associated with this instance. If it is not present, a null string is returned.
std::string getPayload() const;
Gets the payload of the attachment.
std::string getUniqueId() const;
Returns the Unique ID for this instance. If a Content-ID header is present, it will be used. Otherwise the Content-Location header will be used. If neither is present, an empty string will be returned.
const rwsf::MimeHeaders & headers() const;
Returns a reference to the data structure holding the headers for this instance.
rwsf::MimeHeaders & headers();
Returns a reference to the data structure holding the headers for this instance.
void setContentId(const std::string & ci);
Sets the Content-ID header for this instance. If a Content-ID header is already present, it will be replaced. Note: A Content-ID header value should take the form of '<' + unique identifier + '>'.
void setContentLocation(const std::string & cl);
Sets the Content-Location header for this instance. If a Content-Location header is already present, it will be replaced. Note: A Content-Location header value should take the form of a URL.
void setContentType(const std::string & ct);
Sets the Content-Type header for this instance. If a Content-Type header is already present, it will be replaced.
void setPayload(const std::string & payload);
Sets the payload of the attachment.
void setUniqueId(const std::string & uid);
Sets the Unique ID for this instance. The uid specified should be in the form of a URL. If the URL is of a cid scheme, a Content-ID header will be associated with that value, otherwise a Content-Location header will be used.
MessageAttachment & operator=(const MessageAttachment & m);
Assignment operator.
© 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.