SegmentContentTransfer property: Message class

Description

Use this property to set or return a string constant indicating whether the message segment is binary or text data:

Value Description

%ContentTransfer_Binary

Transfer this segment as binary data.

Note: Any binary data must be encoded as text, which increases its size by up to 33%.

%ContentTransfer_Default

Transfer this segment as text data.

The HTTP target connector has a property called MTOM. When this property is set to Y, the transaction uses the Message Transmission Optimization Mechanism (MTOM) protocol for message transmission, which is more efficient for binary attachments.

This property is read/write.

Example

Local Message &MSG;

&MSG = CreateMessage(Message.FLIGHTDATA);

&MSG.SetXmlDoc(&xmldoc);

&MSG.CreateNextSegment();
&bRet = &MSG.SetContentString("your encoded image data here");
&MSG.SegmentContentType = "image/gif";
&MSG.SegmentContentTransfer = %ContentTransfer_Binary;

&MSG.CreateNextSegment();
&bRet = &MSG.SetContentString("your encoded video here");
&MSG.SegmentContentType = "video/mp4";
&MSG.SegmentContentTransfer = %ContentTransfer_Binary;

%IntBroker.Publish(&MSG);