3.1.4.2 DeleteAttachment Operation

The DeleteAttachment operation deletes attachments from an item in the server store.

The following is the WSDL port type specification of the operation.

 <wsdl:operation name="DeleteAttachment">
     <wsdl:input message="tns:DeleteAttachmentSoapIn" />
     <wsdl:output message="tns:DeleteAttachmentSoapOut" />
 </wsdl:operation>

The following is the WSDL binding specification of the operation.

 <wsdl:operation name="DeleteAttachment">
     <soap:operation soapAction="http://schemas.microsoft.com/exchange/services/2006/messages/DeleteAttachment" />
     <wsdl:input>
         <soap:header message="tns:DeleteAttachmentSoapIn" part="Impersonation" use="literal"/>
         <soap:header message="tns:DeleteAttachmentSoapIn" part="MailboxCulture" use="literal"/>
         <soap:header message="tns:DeleteAttachmentSoapIn" part="RequestVersion" use="literal"/>
         <soap:body parts="request" use="literal" />
     </wsdl:input>
     <wsdl:output>
         <soap:body parts="DeleteAttachmentResult" use="literal" />
         <soap:header message="tns:DeleteAttachmentSoapOut" part="ServerVersion" use="literal"/>
     </wsdl:output>
 </wsdl:operation>

The protocol client sends a DeleteAttachmentSoapIn request WSDL message, and the protocol server responds with a DeleteAttachmentSoapOut response WSDL message.

An item attachment does not exist as a store item. It only exists as an attachment on an item or another attachment. Item attachments can be retrieved only by using the GetAttachment operation request. Before an item attachment can be deleted, it MUST be retrieved from the server.