Web / Apache Axiom Interview questions
What is MTOM and how does Axiom support it?
MTOM (Message Transmission Optimization Mechanism) is a W3C specification for sending binary data efficiently inside SOAP messages, by moving it out of the inline XML as base64 text and into a separate MIME part referenced by an xop:Include placeholder.
Axiom supports MTOM natively: a binary payload is represented as an OMText node wrapping a DataHandler and flagged as optimizable, rather than a plain base64 string.
When the tree is serialized with an OMOutputFormat that has optimization enabled, Axiom automatically produces the XOP-wrapped multipart/related output on the wire; on the receiving side, an MTOM-aware builder reverses the process, reconstructing the OMText/DataHandler pair from the incoming MIME parts.
Because base64 inflates binary data by roughly a third, MTOM's main practical benefit is avoiding that overhead - and cutting the CPU cost of encoding/decoding - for anything from moderately sized attachments up to large multi-megabyte payloads.
More Related questions...