IBM Support

Attachment Processing on the IBM WebSphere DataPower SOA Appliance

Question & Answer


Question

I have a need to process attachment on the IBM WebSphere DataPower SOA Appliance. What attachment processing modes are available and when should the mode be used?

Answer

The attachment processing modes or options available are: Unprocessed, Allow, and Streaming. The mode to use may depend on the business requirement(s). However, the following provides additional information on each of the processing modes:


1. Use 'Unprocessed' attachment processing mode when:
    a. The attachment in the MIME message is not going to be processed or accessed.
    b. There is no XPath match rule being used with the processing rules. If there is, the following error message will be logged:
      xmlmgr (TestXMLManager): Unprocessed attachment mode is incompatible with XPATH dispatch

2. Using 'Allow' for the attachment processing mode.
    a. This is the preferred mode for MTOM or Soap with Attachment (SwA) messages.
    b. It has streaming capabilities as well.

3. If the attachment processing mode of 'Streaming' has to be used, then please take note of the following:
    a. Use this attachment processing mode to stream large attachments.

    b. Each part (root/parent plus attachments) of the MIME message will be processed or handled by
    a processing rule.

    c. Processing of the MIME parts will be based on the request/response type of the service such as SOAP or XML. This means that, if the root-part is XML/SOAP but the attachment part in the MIME is Non-XML and the service has XML or SOAP as the request or response type, then processing of the attachment will fail when DataPower tries to parse it as XML or SOAP.

    To resolve this, the processing rule that will handle the attachment part must have the 'Non-XML Processing' option enabled. Steps to enable the 'Non-XML Processing' can be found below. Also, since the attachment part is Non-XML, only processing actions that can operate on Non-XML messages can be used in the processing rule. For example, a Binary Transform action may have to be used instead of the Transform action.

    d. If the attachment part needs to be processed using a different rule, the processing rule will have to be configured to match on something unique in the attachment. The match can be based on the HTTP header (maybe the Content-Type header) in the attachment.

    e. If you do not want to process the attachment, you can configure the processing rule that will handle the attachment to pass the attachment through the rule without processing it (unprocessed). Information on configuring an Unprocessed processing rule can be found below.

    f. If the service has a dynamic backend, then the business logic to dynamically select or set the backend must be included in the processing rule handling the attachment part as well.


Enabling 'Non-XML Processing' on a processing rule:
1. From the WebGUI, click Objects -> Processing Rule. For Web Service Proxy, Objects -> WS-Proxy Processing Rule.
2. Select the processing rule of interest.
3. Click the 'on' radio button for the 'Non-XML Processing' option.


Enabling 'Unprocessed' on a processing rule:
1. From the WebGUI, click Objects -> Processing Rule. For Web Service Proxy, Objects -> WS-Proxy Processing Rule.
2. Select the processing rule of interest.
3. Click the 'on' radio button for the 'Unprocessed Processing' option.

[{"Product":{"code":"SS9H2Y","label":"IBM DataPower Gateway"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"General","Platform":[{"code":"PF009","label":"Firmware"}],"Version":"4.0.2;4.0.1;4.0;3.8.2;3.8.1;3.8;5.0.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
08 June 2021

UID

swg21509243