This chapter includes the following sections:
8.1 Overview of Message Transmission Optimization Mechanism
You can use Message Transmission Optimization Mechanism (MTOM), to pass Binary content such as an image in JPEG format between the client and the web service, which reduces the transmission size on the wire.
In order to be passed, the binary content is typically inserted into an XML document as an
xsd:base64Binary string. Transmitting the binary content in this format greatly increases the size of the message sent over the wire and is expensive in terms of the required processing space and time.
Using MTOM, binary content can be sent as a MIME attachment, which reduces the transmission size on the wire. The binary content is semantically part of the XML document. This is an advantage over SWA (SOAP Messages with Attachments), in that it enables you to apply operations such as WS-Security signature on the message. For more information, refer to the following specifications:
Using MTOM to pass binary content as an attachment improves the performance of the web services stack. Performance is not affected if an MTOM-encoded message does not contain binary content.
MTOM provides an optimized transmission mechanism for SOAP 1.2 messages with an envelope that contains elements of XML schema type
xs:base64 binary. MTOM makes use of data handling mechanisms described in the following specifications:
XOP (XML-binary Optimized Packaging)—Provides a mechanism to more efficiently serialize XML Infosets that have content of type
xs:base64Binary. The XOP specification is available at the following Web site:
DMCBDX (Describing Media Content of Binary Data in XML)—Provides content type information for the binary data in the XML instance and schema. This information can be used to optimize the processing of binary data. The DMCBDX specification is available at the following Web site:
RRSHB (Resource Representation SOAP Header Block)—allows a SOAP message to carry a representation of a Web resource, such as a JPEG image, in a SOAP header block. When combined with MTOM and XOP, the Web resource contained in a RRSHB SOAP header block can be transmitted as a raw binary MIME attachment instead of an xs:base64Binary string in the SOAP header. The RRSHB specification is available at the following Web site:
These specifications fulfill the requirements outlined in OSUCR (SOAP Optimized Serialization Use Cases and Requirements), as described at:
8.2 About Predefined MTOM Attachment Policies
MTOM attachment policies are part of the pre-defined policy set of OWSM.
As described in Understanding How Policies Attach to Oracle Infrastructure Web Services, OWSM provides a set of predefined policies and assertion templates that are automatically available when you install Oracle Fusion Middleware. The MTOM attachment policy listed in Table 8-1 is available in this pre-defined set:
Table 8-1 Predefined MTOM Attachment Policies
|Reliable Messaging Policy||Description|
Rejects inbound messages that are not in MTOM format and verifies that outbound messages are in MTOM format.
For more information about the MTOM attachment predefined policies, see "MTOM Attachment Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager.
8.3 About MTOM Policies Attachment
You can attach MTOM policies to Oracle Infrastructure web services and clients at design time using Oracle JDeveloper, or at runtime using the Oracle Enterprise Manager.
For more information, see Understanding How Policies Attach to Oracle Infrastructure Web Services.