Contact Us 1-800-596-4880

AS2 Connector - Mule 3

AS2 Connector Version 3.0

Mule runtime engine (Mule) supports the AS2 protocol through the Anypoint Connector for AS2 (AS2 Connector). AS2 Connector enables trading partners to transmit and receive AS2 messages with EDI-X12, EDIFACT, XML, or binary payloads.

MuleSoft maintains this connector under the Premium support policy, therefore it requires a separate license. Contact MuleSoft to evaluate or use this connector in production.

This connector leverages the AS2 protocol, which allows Mule applications to:

  • Send messages, signed or unsigned, over HTTP or HTTPS, following the AS2 protocol.

  • Receive messages, also over HTTP or HTTPS, following the protocol.

Read this user guide to understand how to set up and configure a basic flow using the connector. Track feature additions, compatibility, limitations, and API version updates with each release of the connector using the Connector Release Notes.

This document assumes that you are familiar with Mule, Anypoint connectors, and Anypoint Studio.

For hardware and software requirements, see the Connector Release Notes.

How to Install

You can install the connector in Anypoint Studio using the instructions in To Add Exchange Assets to Studio.

This connector requires Java Cryptography Extension (JCE) to be installed on your Java runtime for it to work.

About the Connector Namespace and Schema

In Anypoint Studio, when you drag the connector from the palette onto the Anypoint Studio canvas, Studio automatically populates the XML code with the connector namespace and schema location.

Namespace: http://www.mulesoft.org/schema/mule/as2
Schema Location* http://www.mulesoft.org/schema/mule/as2/current/mule-as2.xsd

If you are manually coding the Mule application in Studio’s XML editor or another text editor, define the namespace and schema location in the header of your Configuration XML, inside the <mule> tag.

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:as2="http://www.mulesoft.org/schema/mule/as2"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:spring="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	    xsi:schemaLocation="http://www.springframework.org/schema/beans
	    http://www.springframework.org/schema/beans/spring-beans-current.xsd
        http://www.mulesoft.org/schema/mule/core
	http://www.mulesoft.org/schema/mule/core/current/mule.xsd
        http://www.mulesoft.org/schema/mule/as2
	http://www.mulesoft.org/schema/mule/as2/current/mule-as2.xsd">
      <!-- put your global configuration elements and flows here -->

</mule>

Note: Use current in the schema path. Studio interprets this to the current Mule version.

Configure the Connector Global Element

Place the connector in your Mule flow as applicable for your use case.

To use AS2 Connector in your Mule application, create a global AS2 element. AS2 Connector provides the following global configuration parameters:

Key Description

Partner From - Name

Sender partner’s name.

Partner From - AS2 id

Sender partner’s ID.

Partner From - x509 alias

Sender alias as defined in the certificate file.

Partner From - Email

Sender partner’s email.

Partner To - Name

Receiver partner’s name.

Partner To - AS2 id

Receiver partner’s ID.

Partner To - x509 alias

Receiver alias as defined in the certificate.

Partner To - Email

Receiver partner’s email.

Partnership - Sender

The sender’s name.

Partnership - Receiver

The receiver’s name.

Partnership - Subject

The text used in email subject line.

Partnership - AS2 URL

The partners AS2 server’s URL.

Partnership - AS2 Receipt Option

The URL that the partner sends the MDN.

Partnership - Encrypt

The encryption algorithm for email header.

Partnership - Sign

The sign encryption of the message. None by default (message is not signed).

Partnership - Content transfer encoding

The content transfer encoding. Binary by default.

Partnership - Compression type

The compression type. ZLIB is the only supported compression/decompression. Disabled by default.

Partnership - Remove CMS algorithm protection attrib

Disable the OID from being sent.

AS2 Keystore - Keystore Path

The path of the keystore.

AS2 Keystore - Keystore Password

The password of the keystore.

Receive Module Ports - Receiver Port

The port used by the receive source.

Receive Module Ports - Secure Receiver Port

The secure port (SSL) used by the receive source.

Receive Module Ports - Secure Receiver Keystore Path

The path of the keystore with the SSL certificate for the receiver source.

Receive Module Ports - Secure Receiver Keystore Password

The password of the keystore.

MDN Receiver Module Ports - Receiver Port

The port for the MDN receiver.

MDN Receiver Module Ports - Secure Receiver Port

The secure port (SSL) for the MDN receiver.

MDN Receiver Module Ports - Secure Receiver Keystore Path

The path of the keystore with the SSL certificate for the MDN receiver.

MDN Receiver Module Ports - Secure Receiver Keystore Password

The password of the keystore.

Operations

  1. Send
    Sends a message through HTTP or HTTPS using the AS2 protocol.

  2. Receive
    Source that receives messages via HTTP or HTTPS using the AS2 protocol.

Using the Connector

To configure the connector you have to complete the connector’s global element properties with the required elements as described above.

as2 configuration 1

You can set placeholders in each property and define them in the mule-app.properties file.

Example of a Send Use Case

as2 sender flow demo

Example of a Receive Source Use Case

as2 receive flow demo

Proxy Bypass Configuration

To disable the proxy settings in Studio:

  1. In the Studio menu, select Run as > Mule Application (configure).

  2. Select your app and navigate to the Arguments tab.

  3. Add the following argument in the VM arguments field:
    -Dhttp.nonProxyHosts=YOURSERVERURLHERETOBYPASS

Arguments accept multiple values, including wildcards. Separate multiple arguments with a pipe (|), for example: *.local|127.0.0.1

View on GitHub