Work with specific protocols and standards > Web Services > Implement MTOM encoding

Implement MTOM encoding

Message Transmission Optimization Mechanism (MTOM) is used to optimize selected nodes of XML outbound Web Services messages that contain Base64 data sent to partners, when the selected node is above a size threshold of 100 bytes. This optimizing or encoding speeds up the message transfer since the large elements are moved outside of the HTTP message into a MIME attachment. MTOM does not change the envelope other than to add a reference to the attachment that contains the content of a specified node. The element is replaced by a link to the attachment. The link is what is parsed instead of a large element.

To use MTOM encoding for outbound messages, the receiving partner must be able to auto-detect the encoded parts and decode them. You must configure your Communities to use the outbound MTOM.

When an inbound Community receives embedded HTTP payloads from partners, if the inbound Pickup Exchange is configured to receive Web Services HTTP messages, Activator auto-detects and decodes the MTOM messages.

The following XML is an example of an MTOM policy found in a WSDL associated with the service. This policy indicates to your trading partners that your service supports MTOM encoding and decoding.

<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"><wsoma:OptimizedMimeSerialization optonal="true" />
</wsp:Policy>

To configure a Community to send outbound MTOM Web Services messages:

  1. In the user interface, from the Trading configuration menu, select a Community to open the Summary page for that Community.
  2. On the Community map of the community summary page, click the Collaboration settings icon to open the Configure community-specific collaboration settings page.
  3. In the Choose the settings to specialize list, select the Set sending rules for the Web Services message protocol option.
  4. In the Define the settings this community will use to send messages list, select the Use MTOM to encode messages option, and then select one of the following associated options:
  5. Select Save changes.

Related topics