| org.springframework.ws.mime.MimeMessage
All known Subclasses: org.springframework.ws.mime.AbstractMimeMessage,
MimeMessage | public interface MimeMessage extends WebServiceMessage(Code) | | Represents a Web service message with MIME attachments. Attachments can be added as a file, an
InputStreamSource , or a
DataHandler .
author: Arjen Poutsma See Also: Attachment since: 1.0.0 |
addAttachment | Attachment addAttachment(String contentId, File file) throws AttachmentException(Code) | | Add an attachment to the message, taking the content from a
File .
The content type will be determined by the name of the given content file. Do not use this for temporary files
with arbitrary filenames (possibly ending in ".tmp" or the like)!
Parameters: contentId - the content Id of the attachment Parameters: file - the file to take the content from the added attachment throws: AttachmentException - in case of errors |
addAttachment | Attachment addAttachment(String contentId, InputStreamSource inputStreamSource, String contentType)(Code) | | Add an attachment to the message, taking the content from an
InputStreamSource .
Note that the stream returned by the source needs to be a fresh one on each call, as underlying
implementations can invoke
InputStreamSource.getInputStream multiple times.
Parameters: contentId - the content Id of the attachment Parameters: inputStreamSource - the resource to take the content from (all of Spring's Resource implementations can bepassed in here) Parameters: contentType - the content type to use for the element the added attachment throws: AttachmentException - in case of errors See Also: org.springframework.core.io.Resource |
convertToXopPackage | boolean convertToXopPackage()(Code) | | Turns this message into a XOP package.
true when the message is a XOP package See Also: XOP Packages |
|
|