Show TOC Start of Content Area

Function documentation Attachments  Locate the document in its SAP Library structure

Use

An attachment comprises any data (for example, text or graphics) that can be appended to a message. In principle, you can append an unlimited number of attachments to an output message of a consumer or provider proxy (in the synchronous case), using the MessageSpecifier object.

Caution

Not all receivers of a message can understand attachments and therefore some receivers will ignore them. The proxy runtime (ABAP/Java) can process attachments, however the majority of the adapters cannot.

Features

You can generate an attachment object using methods of the MessageSpecifier interface. Attachment objects are instances of the class MessageAttachment, which has the full name com.sap.aii.proxy.xiruntime.core.MessageAttachment.

Activities

      Access the MessageSpecifier interface prior to the proxy call to generate attachments and to append them to the output message. Use the method createAttachment() to create attachment objects and then use the method addAttachment() to append them to the proxy object before the message is sent.

      To query attachments at the receiver, fetch the MessageSpecifier interface and query the attachments with the method getAttachment() or getAttachments().

Caution

For synchronous communication, received attachments are sent back to the sender if they are not deleted. If you do not want this to happen, you can delete the individual attachments with the method removeAttachment(), or all attachments with the method clearAttachments().

 

 

 

 

 

End of Content Area