AS2 message processing
The DataPower® Gateway uses the MEIG AS2 proxy handler and a Multi-Protocol Gateway to process the received AS2 message.
The following image shows the processing sequence by the DataPower Gateway.
- The DataPower Gateway receives an AS2 message from the external trading partner.
- The DataPower Gateway parses the AS2 message header.
- The MEIG AS2 proxy handler retrieves the exchange profile from the MEIG server.
- The MEIG server responds with the requested exchange profile.
- The MEIG AS2 proxy handler processes the MEIG integration response.
- Depending on the setting, the MEIG AS2 proxy handler processes the AS2 message in one of the
following ways.
- Decrypts the message and verifies the signature, then passes the original message along with its HTTP headers to the Multi-Protocol Gateway for processing.
- Decrypts the message and verifies the signature, then passes the message body of the decrypted data with signature removed to the Multi-Protocol Gateway for processing.
- The MEIG AS2 proxy handler passes the message to the Multi-Protocol Gateway.
- The Multi-Protocol Gateway applies relevant processing policy actions on the message.
- The Multi-Protocol Gateway sends the processed message to the MEIG server.
- The Multi-Protocol Gateway receives the response from the MEIG server and then processes the server response.
- The Multi-Protocol Gateway sends the processed response to the MEIG AS2 proxy handler.
- The MEIG AS2 proxy handler generates visibility events.
- The MEIG AS2 proxy handler delivers visibility events to the MEIG visibility event endpoint.
- The MEIG AS2 proxy handler sends the response to the external trading partner.

During this process, the DataPower Gateway generates a list of visibility events in XML format to represent the lifecycle of a received transaction and report the transaction status. When a transaction is completed, the visibility events for the transaction are sent to the MEIG visibility event endpoint.
Note:
- The transaction metadata and message payload are not persisted. The processing of AS2 messaging is stateless.
- The DataPower Gateway does not generate MDN on behalf of the Multi-Enterprise Integration Gateway server. The Multi-Enterprise Integration Gateway generates and processes MDN.