MTOM messages and binary attachments in CICS

CICS supports and controls the handling of MTOM messages in both web service provider and requester pipelines using an MTOM handler program and XOP processing.

You configure and enable the MTOM support using the pipeline configuration file. If MTOM support is enabled for a pipeline, CICS unpacks inbound MTOM messages automatically and packages outbound messages. If MTOM support is not enabled for a pipeline and CICS receives an MTOM message, Java-based pipelines accept the inbound MTOM message, however other SOAP pipelines reject the inbound MTOM message with a SOAP fault.

Configuration options for Java-based pipelines

You can configure a provider pipeline to perform the following tasks:

  • Accept MTOM messages, but never send MTOM response messages.
  • Accept MTOM messages and always send MTOM response messages.
  • Process XOP documents and binary attachments in Axis2 mode.

You can configure a requester pipeline to perform the following tasks:

  • Never send an MTOM message, but accept MTOM response messages.
  • Always send MTOM messages and accept MTOM response messages.
  • Process XOP documents and binary attachments in Axis2 mode.

Configuration options for pipelines that do not support Java

You can configure a provider pipeline to perform the following tasks:

  • Accept MTOM messages, but never send MTOM response messages.
  • Accept MTOM messages and send the same type of response message.
  • Accept MTOM messages, but only send MTOM messages when there are binary attachments present.
  • Accept MTOM messages and always send MTOM response messages.
  • Process XOP documents and binary attachments in direct or compatibility mode.

You can configure a requester pipeline to perform the following tasks:

  • Never send an MTOM message, but accept MTOM response messages.
  • Only send MTOM messages when there are binary attachments, and accept MTOM response messages.
  • Always send MTOM messages and accept MTOM response messages.
  • Process XOP documents and binary attachments in direct or compatibility mode.

Modes of support

There are three modes of support provided in the pipeline to handle XOP documents and any associated binary attachments.
Axis2 mode
Axis2 mode is used when the terminal handler of your web services pipeline is either the <cics_soap_1.1_handler_java> or the <cics_soap_1.2_handler_java> message handler.
Direct mode

In direct mode, the binary attachments associated with an inbound or outbound MTOM message are passed in containers through the pipeline and handled directly by the application, without the need to perform any data conversion.

Compatibility mode
Compatibility mode is used when the pipeline processing requires the message to be in standard XML format, with any binary data stored as base64Binary fields within the message. For inbound messages, the XOP document and binary attachments are reconstituted into a standard XML message, either at the beginning of the pipeline when Web Services Security is enabled, or at the end of the pipeline when web service validation is enabled. For outbound messages, a standard XML message is created and passed along the pipeline. This XML message is converted to XOP format by the MTOM handler just before CICS sends it.
Compatibility mode is much less efficient than direct mode because binary data gets converted to base64 format and back again. However, it does allow your web services to interoperate with other MTOM/XOP web service requesters and providers without needing to change your applications.