|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MimeMessage
Represents a Web service message with MIME attachments. Attachments can be added as a file, an InputStreamSource
, or a DataHandler
.
Attachment
Method Summary | |
---|---|
Attachment |
addAttachment(String contentId,
DataHandler dataHandler)
Add an attachment to the message, taking the content from a DataHandler . |
Attachment |
addAttachment(String contentId,
File file)
Add an attachment to the message, taking the content from a File . |
Attachment |
addAttachment(String contentId,
InputStreamSource inputStreamSource,
String contentType)
Add an attachment to the message, taking the content from an InputStreamSource . |
boolean |
convertToXopPackage()
Turns this message into a XOP package. |
Attachment |
getAttachment(String contentId)
Returns the Attachment with the specified content Id. |
Iterator |
getAttachments()
Returns an Iterator over all Attachment objects that are part of this message. |
boolean |
isXopPackage()
Indicates whether this message is a XOP package. |
Methods inherited from interface org.springframework.ws.WebServiceMessage |
---|
getPayloadResult, getPayloadSource, writeTo |
Method Detail |
---|
boolean isXopPackage()
true
when the constraints specified in Identifying
XOP Documents are met.boolean convertToXopPackage()
true
when the message is a XOP packageAttachment getAttachment(String contentId) throws AttachmentException
Attachment
with the specified content Id.
null
if it cannot be found
AttachmentException
- in case of errorsIterator getAttachments() throws AttachmentException
Iterator
over all Attachment
objects that are part of this message.
AttachmentException
- in case of errorsAttachment
Attachment addAttachment(String contentId, File file) throws AttachmentException
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)!
contentId
- the content Id of the attachmentfile
- the file to take the content from
AttachmentException
- in case of errorsAttachment addAttachment(String contentId, InputStreamSource inputStreamSource, String contentType)
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.
contentId
- the content Id of the attachmentinputStreamSource
- the resource to take the content from (all of Spring's Resource implementations can be
passed in here)contentType
- the content type to use for the element
AttachmentException
- in case of errorsResource
Attachment addAttachment(String contentId, DataHandler dataHandler)
DataHandler
.
dataHandler
- the data handler to take the content from
AttachmentException
- in case of errors
|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |