MessageAttachment Complex Type

Applies to: SharePoint Workspace 2010 | Visual Studio 2008

The MessageAttachment type provides a way of attaching a file to the message. Attachments may be embedded directly using Base64 encoding. Alternatively, they can be included by reference, using the URI identifying a file accessible on the web services server system. This type is used both for attaching a voice memo and other types of files.

Syntax

<MessageAttachment>
    <DisplayName />
    <Type />  
    <Size />
    <Content />
    <AttachmentFileURI />
</MessageAttachment>

Complex Type Elements

Element

Data type

Explanation

DisplayName

xs:string

The name of the attachment as displayed to the user. Usually this is the original file name of the attachment. If you specify the contents of the attachment in the Content element, DisplayName determines the file name and extension.

Type

AttachmentType

Indicates whether the attachment is audio data or non-audio data:

  • Voice: indicates the attachment is audio data. Audio data must be .wav encoded.

  • File: indicates the attachment is non-audio data.

Size

xs:int

Size of the Base64-encoded attachment body, in bytes. Size is not used if the attachment is made by reference.

The usage of this element depends on the context:

  • Read operation: value provided by operation.

  • Create operation: value ignored by operation.

Content

xs:base64Binary

The contents of the attachment using Base64 encoding. When reading messages, the body of the attachment is always provided in Content. Content is optional.

The usage of this element depends on the context:

  • Read operation: value provided by operation.

  • Create operation: value ignored by operation if AttachmentFileURI is specified; otherwise value is used by operation.

AttachmentFileURI

xs:anyURI

A URI reference that specifies the contents of the attachment and the file extension of the attachment. AttachmentFileURI is optional.

The usage of this element depends on the context:

  • Read operation: element is not provided by operation; the body of the attachment is always provided by the Contents element.

  • Create operation: value used by operation.

Remarks

In calls to Read or ReadMessage, the operation returns the contents of an attachment in the Content element. In calls to Create, CreateForward, or CreateReply, you can specify the contents of an attachment in either the Content or AttachmentFileURI element.

See Also

Reference

GrooveMessages Web Service

Concepts

Accessing Groove Messages