Inbound MTOM message processing for pipelines that do not support Java
When the MTOM handler is enabled in pipelines that do not support Java, it checks the headers of the inbound message in the DFHREQUEST or DFHRESPONSE container to determine the format of the message during the transport handling processing.
When a MIME Multipart/Related message is received, the MTOM handler unpackages the message as follows:
- It puts the headers and binary data from each binary attachment into separate containers.
- It puts the list of containers in the DFHWS-XOP-IN container.
- It puts the XOP document, which formed the root of the message, back in the DFHREQUEST or DFHRESPONSE container, replacing the original message.
If there are no binary attachments, the XOP document is handled as a normal XML message and no XOP processing is required. If there are any binary attachments, XOP processing is enabled for the message.
If XOP processing is enabled, the MTOM handler checks the pipeline properties to determine if the current message should be processed in direct or compatibility mode, and puts this information in the DFHWS-MTOM-IN container.
In provider mode, the MTOM handler also creates the DFHWS-MTOM-OUT container to determine how the outbound response message should be processed.
Direct mode
When you are using CICS web services support, that is, when a service provider pipeline uses the DFHPITP application handler or a service requester pipeline is invoked using INVOKE WEBSERVICE, the pipeline can process the XOP document and binary attachments in direct mode.
In
this mode, the XOP document and associated containers are passed by
the MTOM handler to the next message handler in the pipeline for processing.
The CICS web services support interprets the <xop:Include> elements.
If the base64Binary field is represented as a container in the application
data structure, then the attachment container name is stored in the
structure. If the field is represented as a variable or fixed length
string, the contents of the container are copied to the relevant application
data structure field. The data structure is then passed to the application
program.
Compatibility mode
If your pipeline is configured to use a custom application handler, or Web Services Security is also enabled, the message is processed in compatibility mode. In this mode, the XOP document and binary attachments are immediately reconstituted into a SOAP message using XOP processing, so that the content can be successfully processed in the pipeline. The XOP processing performs the following tasks:
- Scans the XOP document for
<xop:Include>elements, replacing each occurrence with the binary data from the referenced attachment in base64-encoded format. - Discards the DFHWS-XOP-IN container and all of the attachment containers.
The reconstituted SOAP message is then passed to the next handler in the pipeline to be processed as normal.
If web service validation is enabled, the pipeline switches to compatibility mode when the message reaches the application handler. The message is reconstituted into a SOAP message, validated, and passed to the application.