# mulesoft AS2 Connector - Full Documentation --- product: AS2 Connector version: 6.9 --- # AS2 Connector 6.9 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Mule runtime engine (Mule) supports the AS2 protocol through 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, for example: - Send messages, signed or unsigned, over HTTP or HTTPS, using the AS2 protocol - Receive messages over HTTP or HTTPS, using the AS2 protocol - Receive asynchronous MDN for sent messages For compatibility information and fixed issues, see the AS2 Connector Release Notes. For a major or minor release, see [Upgrading and Migrating](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-upgrade-migrate). ## Before You Begin To use this connector, you must be familiar with: - The AS2 target resource - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - How to create a Mule app using Anypoint Studio (Studio) Before creating an app, you must have access to: - Credentials to access the AS2 target resource - Anypoint Platform - Anypoint Studio version 7.6 or later ## Common Use Cases for the Connector Common use cases for AS2 Connector include the following: - Send with sync MDN Sends a message through HTTP or HTTPS using the AS2 protocol requesting the partner for a synchronous MDN (receipt) - Send with async MDN Sends a message through HTTP or HTTPS using the AS2 protocol requesting the partner for an asynchronous MDN (receipt) - Listener Source that receives messages via HTTP or HTTPS using the AS2 protocol - MDN Listener Source that receives asynchronous MDN receipts via HTTP or HTTPS using the AS2 protocol - Non repudiation Listener Source that receives a signed copy of a receipt or a message for persistent non-repudiation storage ## Non-Repudiation Storage of AS2 Messages and MDNs If needed, you can configure non-repudiation storage for your AS2 operations to support regulatory or compliance requirements. Only signed messages and MDNs are eligible for non-repudiation. The following AS2 Connector sources and operations support the non-repudiation feature: - AS2 Send Sync operation - AS2 Send Async operation - AS2 Listener source - AS2 MDN Listener source ### Before You Begin for Non-Repudiation Storage To enable non-repudiation of a message in AS2 Connector, you must implement and configure a separate Mule flow that acts as a non-repudiation flow: - The non-repudiation flow must have access to the signed MIME message that is passed to it, along with appropriate non-repudiation specific attributes. - This non-repudiation-specific Mule flow is responsible for receiving, storing, and acting upon the messages and attributes it receives. - The name of this non-repudiation flow must be configured on an appropriate listener or operation that has non-repudiation storage enabled. ## Next Step After you complete the prerequisites, you are ready to create an app and configure the connector using [Anypoint Studio](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-studio). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 6.9 --- # AS2 Connector 6.9 Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The following examples show how to configure send and receive messages in Anypoint Connector for AS2 (AS2 Connector): - [Receiving AS2 Messages and Sending Back MDNs](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-example-receive-send) Configure the **As 2 listener** source to start receiving AS2 requests and the **Send with Sync MDN** and **Send with Async MDN** operations to start sending AS2 requests. - [Receiving AS2 MDN Messages](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-example-receiving-mdn-messages) Configure the **As 2 mdn listener** source to start receiving Messsage Disposition Notification (MDN) Messages. - [Sending AS2 Messages and Receiving MDNs](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-example-send) Configure the connector to send AS2 messages to a partner and handle both synchronous and asynchronous MDNs. - [Sending MDNs to Multiple Partners](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-example-multiple-partners) How to send MDNs to multiple partners. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 6.9 --- # AS2 Connector 6.9 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for AS2 (AS2 Connector) enables trading partners to transmit and receive AS2 messages that contain EDI-X12, EDIFACT, XML, or binary payloads. ## Configurations --- ### Listener Config #### General Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types for this configuration.

x

HTTP Listener

String

Reference to global HTTP Listener definition for our service endpoint used by partner for both action and signal messages.

x

Security Requirement Level

Enumeration, one of:

  • SIGNED

  • ENCRYPTED

  • SIGNED_ENCRYPTED

The security level required for any AS2 Listener using this configuration for all incoming messages. An error MDN response results if the security requirement is not met.

Keystore Password

String

The password of the provided keystore.

x

Keystore Path

String

The Absolute or relative path to the keystore containing certificates and private keys for self (this application) and the partner.

x

Private Key Password

String

Private key password, if the private key to use for signing the MDN is password protected.

Validate certificate expiration date

Boolean

If enabled, the connector can’t receive or send messages if the certificate is expired.

false

Warning before (days)

Number

The number of days before the certificate expiration date when the connector sends a warning message that the certificate is about to expire. For example, if the value of this field is 3, then the connector sends a warning message three days before the certificate expiration date.

This field applies only when the value of this field is greater than 0 and the Validate certificate expiration date field is enabled.

30

#### Partners Parameters
NameTypeDescriptionDefault ValueRequired

Inbound Request Authentication

Authentication method to use for verifying the incoming HTTP request when using dedicated mode.

Do not select this field if you are using shared mode or you will receive an error.

Self config - AS2 Partner Name

String

AS2 system identifier used for AS2-From and AS2-To headers.

x

Self config - x509 Alias

String

Certificate, private key alias, or both in the keystore. Required if using signing or encryption.

Self config - email

String

Email address used as the HTTP From header when sending AS2 messages.

x

Use different Alias for MDN Signature

Boolean

(Applies to the AS2 Listener source) Use the alias specified in Alias For MDN Signature to use a different keystore entry for the MDN signature.

true

Alias For MDN Signature

String

(Applies to the AS2 Listener source) Alias to use for the MDN signature if using a different alias for the MDN signature than for decryption. This field takes effect when Use different Alias for MDN Signature is true.

Private Key Password

String

Private key password, if the private key to use for signing the MDN is password protected.

Self config - Listener Mode

Enumeration, one of:

  • Dedicated mode

  • Shared mode

  • Dedicated mode

    Enables you to configure a single AS2 listener endpoint to receive messages from one partner only.

    If you select Dedicated mode, check Partner config (mandatory) and configure the partner using the Dedicated mode fields in this table.

  • Shared Mode

    Enables you to configure a single AS2 listener endpoint to receive messages from multiple partners.

    If you select Shared mode, uncheck Partner config (mandatory) and configure each partner using the Shared mode fields in this table.

Dedicated mode

x

Dedicated mode - Partner Config - AS2 Partner Name

String

AS2 system identifier used for AS2-From and AS2-To headers.

x

Dedicated mode - Partner Config - x509 Alias

String

Certificate, private key alias, or both in the keystore. Required if using signing or encryption.

Dedicated mode - Partner Config - email

String

Email address used as the HTTP From header when sending AS2 messages.

x

Shared mode - Partners

Enumeration, one of:

  • Expression

  • Inline

Indicates whether to add partner information by using an expression or by entering values inline.

Expression

x

Shared mode - Partners - AS2 Partner Name

String

AS2 system identifier used for AS2-From and AS2-To headers.

x

Shared mode - Partners - x509 Alias

String

Certificate, private key alias, or both in the keystore. Required if using signing or encryption.

Shared mode - Partners - email

String

Email address used as the HTTP From header when sending an AS2 message.

x

Shared mode - Inbound Request Authentication

Authentication method to use for verifying the incoming HTTP request.

#### Advanced Parameters
NameTypeDescriptionDefault ValueRequired

Check for duplicate messages

Checks for duplicate messages:

  • If selected, the connector checks to see if a new received message is duplicated, as determined by comparing the following values in the new message to those in existing messages:

    • Sender (from the AS2-From field)

    • Receiver (from the AS2-To field)

    • Message ID (from the Message-Id field)

    If all three values match an existing message, the connector rejects the duplicate message. If selected, you must:

    • Reference a global object store in the Object Store field. This object store will store the existing messages.

    • Add the object store dependency to your project by adding the ObjectStore component to the Studio canvas or adding it to the pom.xml, as follows:

      <dependency>
        <groupId>org.mule.connectors</groupId>
        <artifactId>mule-objectstore-connector</artifactId>
        <version>_latest-version_</version>
        <classifier>mule-plugin</classifier>
      </dependency>

      For the latest object store version, see the Object Store Connector Release Notes.

      If the MDN mode is AUTO, use the Idempotent Message Validator instead of the Check for duplicate messages field to check for duplicate messages. If the MDN mode is IMMEDIATE, the validator does not work. Therefore, in this circumstance, you must use the Check for duplicate messages field to check for duplicate messages. For more information, see Idempotent Message Validator.

    • If deselected, the connector accepts duplicate messages.

false

Object Store

Object Store

Object store where the connector stores new messages. This field is mandatory if the Check for duplicate messages field is selected.

For information about setting field values for this object store, see the Object Store Connector Reference.

You might experience limitations that are specific to the object store implementation you are using (Anypoint Object Store V2 (OSv2), CloudHub Object Store V1 (OSv1), or Mule Object Store), so configure the object store to suit your needs. For more information, see The Different Types of Object Stores Explained.

Expiration policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. Mule purges the instances as appropriate.

#### Connection Types ##### Async MDN Connection Provider ###### Parameters
NameTypeDescriptionDefault ValueRequired

Use Persistent Connections

Boolean

If false, each connection is closed after the first request completes.

false

Connection Timeout

Number

How long the connector waits before timing out when establishing a connection to the remote service. This value is qualified by the Connection Timeout Units field.

30

Connection Timeout Units

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the value of the Connection Timeout field.

SECONDS

Max Connections

Number

The maximum number of outbound connections to keep open at the same time. By default, the number of connections is unlimited.

-1

Connection Idle Timeout

Number

A timeout for how long a connection can remain idle before it is closed. The value of this attribute is only used when persistent connections are enabled. This value is qualified by the Connection Idle Timeout Units field.

30

Connection Idle Timeout Units

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the value of the Connection Idle Timeout field.

MINUTES

Retry Interval

Number

The interval between each retry, in seconds.

60

Retry Count

Number

The number of retries. A value of 0 means no retries.)

0

Proxy Config

One of:

Reusable configuration element for outbound connections through a proxy. A proxy element must define a host name and a port attributes, and optionally can define a username and password.

TLS Configuration

Reference to a TLS config element. This enables HTTPS for this configuration.

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, the deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

#### Associated Sources - [As2 Listener](#as2-listener) --- ### MDN Listener Config #### General Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x

HTTP Listener

String

Reference to global HTTP Listener definition for our service endpoint used by a partner for both action and signal messages.

x

Keystore Password

String

The password of the provided keystore.

x

Keystore Path

String

The Absolute or relative path to the keystore containing certificates and private keys for self(this application) and the partner.

x

Private Key Password

String

Private key password, if the private key to use for signing the MDN is password protected.

Validate certificate expiration date

Boolean

If enabled, the connector can’t receive or send messages if the certificate is expired.

false

Warning before (days)

Number

The number of days before the certificate expiration date when the connector sends a warning message that the certificate is about to expire. For example, if the value of this field is 3, then the connector sends a warning message three days before the certificate expiration date.

This field applies only when the value of this field is greater than 0 and the Validate certificate expiration date field is enabled.

30

#### Advanced Parameters
NameTypeDescriptionDefault ValueRequired

Expiration policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. Mule purges the instances as appropriate.

#### Partners Parameters
NameTypeDescriptionDefault ValueRequired

Self config - AS2 Partner Name

String

AS2 system identifier used for AS2-From and AS2-To headers.

x

Self config - x509 Alias

String

Certificate, private key alias, or both in the keystore. Required if using signing or encryption.

Self config - email

String

Email address used as the HTTP From header when sending 12 messages.

x

MDN Listener Mode

Enumeration, one of:

  • Mdn dedicated mode

  • Mdn shared mode

  • Mdn dedicated mode

    Enables you to configure a single AS2 listener endpoint to receive MDNs from one partner only.

    If you select Mdn dedicated mode, check Partner config (mandatory) and configure the partner using the Mdn dedicated mode fields in this table.

  • Mdn shared mode

    Enables you to configure a single AS2 listener endpoint to receive MDNs from multiple partners.

    If you select Mdn shared mode, uncheck Partner config (mandatory) and configure each partner using the Mdn shared mode fields in this table.

x

Mdn dedicated mode - Partner Config - AS2 Partner Name

String

AS2 system identifier used for AS2-From and AS2-To headers.

x

Mdn dedicated mode - Partner Config - x509 Alias

String

Certificate, private key alias, or both in the keystore. Required if using signing or encryption.

Dedicated mode

Mdn dedicated mode - Partner Config - email

String

Email address used as the HTTP From header when sending MDNs.

x

Mdn shared mode - Partners

Enumeration, one of:

  • Expression

  • Inline

Indicates whether to add partner information by using an expression or by entering values inline.

Expression

x

Mdn shared mode - Partners - AS2 Partner Name

String

AS2 system identifier used for AS2-From and AS2-To headers.

x

Mdn shared mode - Partners - x509 Alias

String

Certificate, private key alias, or both in the keystore. Required if using signing or encryption.

Mdn shared mode - Partners - email

String

Email address used as the HTTP From header when sending MDNs.

x

#### Associated Sources - [As2 Mdn Listener](#as2-mdn-listener) --- ### Send Config This class represents an extension configuration, values set in this class are commonly used across multiple operations since they represent something core from the extension. #### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types for this configuration.

x

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. Mule purges the instances as appropriate.

General - Transfer Mode Configuration

Enumeration, one of:

  • Chunked transfer mode

  • Identity transfer mode

  • Threshold transfer mode

The transfer mode applied when sending information:

  • Chunked transfer mode

    Sends the headers without the Content-Length property and modifies the message body to transfer it as a series of chunks.

  • Identity transfer mode

    Sends the headers with the Content-Length property and sends the whole message body.

  • Threshold transfer mode

    Sends the headers and message body according to the specified threshold.

    • If the message body is less than or equal to the threshold, the connector uses the Identity transfer mode option.

    • If the message body is greater than the threshold, the connector uses the Chunked transfer mode option.

Chunked transfer mode

Threshold

Number

Threshold used when the General - Transfer Mode Configuration field is set to Threshold transfer mode.

64

Threshold Unit

Enumeration, one of:

  • Byte

  • GB

  • KB

Unit associated with the Threshold field.

KB

General - Propagate Content Transfer Encoding

Boolean

Indicates whether to propagate the content transfer encoding on the AS2 message sent to the partner:

  • True: The main content transfer encoding is propagated to every MIME part of the resulting message.

  • False: Signed and encrypted MIME parts are encoded with Base64.

False

General - Custom Message ID

String

Enables the specification of a custom AS2 Message ID

Partner Config - AS2 Partner Name

String

AS2 system identifier (used for AS2-From and AS2-To headers)

x

Partner Config - x509 Alias

String

Certificate, private key alias, or both in the keystore (required if using signing or encryption)

Partner Config - email

String

Email address used as HTTP From header when sending

x

MDN Partner Config - Use different Alias for MDN Signature

Boolean

(Applies to the Send with Sync Mdn operation) Use the alias specified in Alias For MDN Signature as the alias for MDN signature validation.

true

MDN Partner Config - Alias For MDN Signature

String

(Applies to the Send with Sync Mdn operation) Alias to use for MDN signature validation if using a different alias for MDN signature validation than for encryption. This field takes effect when Use different Alias for MDN Signature is true.

Self config - AS2 Partner Name

String

AS2 system identifier (used for AS2-From and AS2-To headers)

x

Self config - x509 Alias

String

Certificate, private key alias or both in keystore (required if using signing or encryption)

Self config - email

String

Email address used as HTTP From header when sending

x

Subject

String

Free form text for MIME Subject header

MIC Signature Algorithm

Enumeration, one of:

  • MD5

  • SHA1

  • SHA224

  • SHA256

  • SHA384

  • SHA512

  • UNSIGNED

Algorithm to use when setting the message integrity check value.

UNSIGNED

MDN MIC Signature Algorithm

Enumeration, one of:

  • MD5

  • SHA1

  • SHA224

  • SHA256

  • SHA384

  • SHA512

  • UNSIGNED

Request partner to respond with a signed MDN using this algorithm for calculating MIC

UNSIGNED

Encryption Algorithm

Enumeration, one of:

  • DES

  • DES_EDE3

  • RC2

  • AES128_CBC

  • AES192_CBC

  • AES256_CBC

  • AES128_CCM

  • AES192_CCM

  • AES256_CCM

  • AES128_GCM

  • AES192_GCM

  • AES256_GCM

  • AES256_WRAP

  • CAST5

  • UNENCRYPTED

The Algorithm to use when encrypting the message to be sent

UNENCRYPTED

Content Transfer Encoding

Enumeration, one of:

  • BASE64

  • QUOTED_PRINTABLE

  • SEVEN_BIT

  • EIGHT_BIT

  • BINARY

The encoding to use on the content of AS2 message being sent.

BINARY

Request A Receipt

Enumeration, one of:

  • NONE

  • UNSIGNED

  • SIGNED_OPTIONAL

  • SIGNED_REQUIRED

How the connector behaves based on the received receipts.

UNSIGNED

Compression Type

Enumeration, one of:

  • NONE

  • ZLIB

The Compression type to use

NONE

Receipt Delivery URL

String

The asynchronous MDN delivery address to which the MDN is returned. This should be the fully formed URL to the As 2 mdn listener source, for example, https://example.com/mdn.

If a flow uses the Send With Async MDN operation, then either this field or the Receipt Delivery URL field associated with that operation is required. If both fields have values, the value for the operation overrides the value for the global configuration.

Keystore Password

String

The password of the provided keystore.

x

Keystore Path

String

The Absolute or relative path to the keystore containing certificates and private keys for self(this application) and the partner.

x

Private Key Password

String

Private key password, if the private key to use for signing the MDN is password protected.

Validate certificate expiration date

Boolean

If enabled, the connector can’t receive or send messages if the certificate is expired.

false

Warning before (days)

Number

The number of days before the certificate expiration date when the connector sends a warning message that the certificate is about to expire. For example, if the value of this field is 3, then the connector sends a warning message three days before the certificate expiration date.

This field applies only when the value of this field is greater than 0 and the Validate certificate expiration date field is enabled.

30

#### Connection Types ##### Outbound Connection Config ###### Parameters
NameTypeDescriptionDefault ValueRequired

Use Persistent Connections

Boolean

If false, each connection is closed after the first request completes.

false

Connection Timeout

Number

How long the connector waits before timing out when establishing a connection to the remote service. This value is qualified by the Connection Timeout Units field.

30

Connection Timeout Units

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the value of the Connection Timeout field.

SECONDS

Max Connections

Number

The maximum number of outbound connections to keep open at the same time. By default the number of connections is unlimited.

-1

Connection Idle Timeout

Number

A timeout for how long a connection can remain idle before it is closed. The value of this attribute is only used when persistent connections are enabled. This value is qualified by the value of the Connection Idle Timeout Units field.

30

Connection Idle Timeout Units

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the value of the Connection Idle Timeout field.

MINUTES

Proxy Config

One of:

Reusable configuration element for outbound connections through a proxy. A proxy element must define a host name and a port attributes, and optionally can define a username and a password.

Partner URL

String

Service endpoint URL to the partner.

x

Outbound Request Authentication

HttpRequestAuthentication

Authentication method to use for the HTTP request.

TLS Configuration

Reference to a TLS config element. This enables HTTPS for this configuration.

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, the deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

## Sources - [As2 Listener](#as2-listener) - [As2 Mdn Listener](#as2-mdn-listener) - [Non repudiation listener](#non-repudiation-listener) ### As2 Listener `` Represents a listener for AS2 sender requests. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Path

String

This path is appended to any path set in the listener configuration.

/

Connection Timeout

Number

An override for the timeout for establishing connections to the remote service as milliseconds. The default of 0 means this value is not used to override the configuration.

0

Non repudiation flow ref

String

The name of the configured flow that contains the Non repudiation listener source.

Mdn mode

Enumeration, one of:

  • AUTO

  • IMMEDIATE

MDN deliver mode:

  • AUTO: Sends an MDN at the end of the flow.

  • IMMEDIATE: Sends an MDN when the source receives a message.

IMMEDIATE

Output Mime Type

String

The MIME type of the payload that this operation outputs.

Output Encoding

String

The encoding of the payload that this operation outputs.

Primary Node Only

Boolean

Whether to execute this source on only the primary node when running in a cluster.

Streaming Strategy

Configures how Mule processes streams. The default is to use repeatable streams.

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Reconnection Strategy

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

#### Output

Type

Binary

Attributes Type

#### For Configurations - [Listener Config](#ListenerConfig) ### As2 Mdn Listener `` Listens for AS2 requests and automatically sends an MDN back to the receipt URL provided in the transmission when a request is received. > [!NOTE] If the receipt URL is inaccessible, the inbound AS2 message is not processed. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Path

String

This path is appended to any path set in the listener configuration.

/

Non repudiation flow ref

String

The name of the configured flow that contains the Non repudiation listener source.

Output Mime Type

String

The MIME type of the payload that this operation outputs.

Output Encoding

String

The encoding of the payload that this operation outputs.

Primary Node Only

Boolean

Whether to execute this source on only the primary node when running in a cluster.

Streaming Strategy

Configures how Mule processes streams. The default is to use repeatable streams.

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

#### Output

Type

Binary

Attributes Type

#### For Configurations - [MDN Listener Config](#MDNListenerConfig) ### Non repudiation listener `` Receives a signed copy of a receipt or a message for persistent non-repudiation storage. #### Parameters
NameTypeDescriptionDefault ValueRequired

Display Name

String

The name of this configuration. Connectors reference the configuration with this name.

x

Mime Type

String

The MIME type of the payload passed to this flow.

Encoding

String

The encoding of the payload passed to this flow.

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Streaming Strategy

Configures how Mule processes streams. The default is to use repeatable streams.

Primary Node Only

Boolean

Whether to execute this source on only the primary node when running in a cluster.

#### Output

Type

Binary

Attributes Type

Attributes Type

### For Configurations None. ## Operations - [Send With Async Mdn](#sendWithAsyncMdn) - [Send With Sync Mdn](#sendWithSyncMdn) ### Send With Async Mdn `` Performs the send async request using the configuration, client, and AS2 requester parameters, and completes the callback accordingly. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

General - Custom Message ID

String

Enables the specification of a custom AS2 Message ID.

Output Mime Type

String

The MIME type of the payload that this operation outputs.

Output Encoding

String

The encoding of the payload that this operation outputs.

Streaming Strategy

Configures how Mule processes streams. The default is to use repeatable streams.

AS2 MIME Type

String

The content type of the Document being sent via AS2 (for example, application/EDI-X12). There are no restrictions on the content-type that are supported.

#[payload.^mimeType]

Content Stream

Binary

The content InputStream to be sent.

#[payload]

Content Description

String

Content MIME part content description

File Name

String

Filename of the content stream. If not set, the content is transferred without a filename.

Request Receipt

Enumeration, one of:

  • NONE

  • UNSIGNED

  • SIGNED_OPTIONAL

  • SIGNED_REQUIRED

How the connector behaves based on the received receipts:

  • NONE: No receipt is expected.

  • SIGNED_OPTIONAL: Receipt can be signed or unsigned.

  • SIGNED_REQUIRED: Expects a signed receipt. The application fails if the receipt is unsigned.

  • UNSIGNED: Expects an unsigned receipt.

Require Processed

Boolean

Requires a processed response in the MDN to continue the flow. An error occurs if the response is unprocessed.

true

Connection Timeout

Number

Override for the timeout for establishing connections to the remote service as milliseconds. The default of 0 means this value is not used to override the configuration.

0

Non repudiation flow ref

String

Name of the configured flow that contains the Non repudiation listener source.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

Custom headers

String

Enables you to add custom keys to include in outbound AS2 messages. For each key to include, enter values for these name-value pairs:

  • Name

    Name of the key to send to outbound AS2 messages, formatted as Name:key-name

  • Value

    Content of the key to send to outbound AS2 messages, formatted as Value:key-value

Receipt Delivery URL

String

The asynchronous MDN delivery address to which the MDN is returned. This should be the fully formed URL to the As 2 mdn listener source, for example, https://example.com/mdn.

If a flow uses the Send With Async MDN operation, then either this field or the Receipt Delivery URL field associated with that operation is required. If both fields have values, the value for the operation overrides the value for the global configuration.

#### Output

Type

Binary

Attributes Type

### For Configurations - [Send Config](#send-config) #### Throws - AS2-MULE4:CONFIGURATION - AS2-MULE4:UNAUTHORIZED - AS2-MULE4:CONNECTIVITY - AS2-MULE4:RETRY\_EXHAUSTED ### Send With Sync Mdn `` Performs the send sync request using the configuration, client, and AS2 requester parameters, and completes the callback accordingly. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

General - Custom Message ID

String

Enables the specification of a custom AS2 Message ID.

Output Mime Type

String

The MIME type of the payload that this operation outputs.

Output Encoding

String

The encoding of the payload that this operation outputs.

Streaming Strategy

Configures how Mule processes streams. The default is to use repeatable streams.

AS2 MIME Type

String

The content type of the Document being sent via AS2 (for example, application/EDI-X12). There are no restrictions on the content-type that are supported.

#[payload.^mimeType]

Content Stream

Binary

The content InputStream to be sent.

#[payload]

Content Description

String

Content MIME part content description

File Name

String

Filename of the content stream. If not set, the content is transferred without a filename.

Request Receipt

Enumeration, one of:

  • NONE

  • UNSIGNED

  • SIGNED_OPTIONAL

  • SIGNED_REQUIRED

How the connector behaves based on the received receipts:

  • NONE: No receipt is expected.

  • SIGNED_OPTIONAL: Receipt can be signed or unsigned.

  • SIGNED_REQUIRED: Expects a signed receipt. The application fails if the receipt is unsigned.

  • UNSIGNED: Expects an unsigned receipt.

Require Processed

Boolean

Requires a processed response in the MDN to continue the flow. An error occurs if the response is unprocessed.

true

Require Processed

Boolean

Require Processed response in the MDN to continue the flow (otherwise there is an error)

true

Connection Timeout

Number

An override for the timeout for establishing connections to the remote service as milliseconds. The default of 0 means this value is not used to override the configuration.

0

Non repudiation flow ref

String

The name of the configured flow that contains the Non repudiation listener source.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

Custom headers

String

Enables you to add custom keys to include in outbound AS2 messages. For each key to include, enter values for these name-value pairs:

  • Name

    Name of the key to send to outbound AS2 messages, formatted as Name:key-name

  • Value

    Content of the key to send to outbound AS2 messages, formatted as Value:key-value

#### Output

Type

Binary

Attributes Type

### For Configurations - [Send Config](#send-config) #### Throws - AS2-MULE4:CONFIGURATION - AS2-MULE4:MIME\_PARSE - AS2-MULE4:UNAUTHORIZED - AS2-MULE4:CONNECTIVITY - AS2-MULE4:SIGNATURE\_VERIFY - AS2-MULE4:RETRY\_EXHAUSTED ## Types ### AS2 Basic Authentication
FieldTypeDescriptionDefault ValueRequired

Username

String

Username to authenticate.

x

Password

String

Password of user to authenticate.

x

### AS2 Listener Attributes
FieldTypeDescriptionDefault ValueRequired

As2 Message Id

String

AS2 unique message ID from receiver to sender.

x

filename

String

Received filename.

x

Mime Type

String

MIME type, for example, application/xml.

x

From Name

String

AS2 Receiver name.

x

Headers

Object

AS2 HTTP headers that elaborate the message format.

x

Mdn Delivery Status

Enumeration, one of:

  • NONE

  • SUCCESS

  • FAILURE

AS2 message validation status

x

To Name

String

AS2 Sender name

x

### AS2 Mdn Attributes
FieldTypeDescriptionDefault ValueRequired

As2 Message Id

String

AS2 unique message ID from receiver to sender.

x

Disposition Content

Object

AS2 processed MDN report as headers.

x

From Name

String

AS2 Receiver name

x

Headers

Object

AS2 HTTP headers that elaborate the message format.

x

Mdn Alg

Enumeration, one of:

  • MD5

  • SHA1

  • SHA224

  • SHA256

  • SHA384

  • SHA512

  • UNSIGNED

AS2 message integrity check algorithm used

x

Mdn Mic

String

AS2 message integrity check hashcode

x

Mdn Processed

Boolean

AS2 message validation status

false

Original AS2 Message Id

String

AS2 Message ID received

x

Report Text

String

MDN report text

x

To Name

String

AS2 Sender name

x

### AS2 Send Attributes
FieldTypeDescriptionDefault ValueRequired

As2 Mdn Attributes

AS2 returned MDN attribute group

x

As2 Message Id

String

AS2 unique message ID from receiver to sender

x

From Name

String

AS2 receiver name

x

Headers

Object

AS2 HTTP headers that elaborate the message format

x

Msg MIC

String

AS2 message integrity check hashcode

x

Msg MIC Alg

String

AS2 message integrity check algorithm used

x

To Name

String

AS2 sender name

x

### Crl File Specifies the location of the certification revocation list (CRL) file.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the CRL file.

### Custom Ocsp Responder Configures a custom OCSP responder for certification revocation checks.
FieldTypeDescriptionDefault ValueRequired

Url

String

URL of the OCSP responder.

Cert Alias

String

Alias of the signing certificate for the OCSP response. If specified, the alias must be in the truststore.

### Expiration Policy
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the value of the Max Idle Time field.

### Failure Status Code Validator
FieldTypeDescriptionDefault ValueRequired

Values

String

Comma-separated list of status codes that cause errors to be thrown.

x

### KeyStore Configures the keystore for TLS.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the keystore. Mule resolves the path relative to the current classpath and file system.

Type

String

Type of keystore.

Alias

String

Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file.

Key Password

String

Password used to protect the private key.

Password

String

Password used to protect the keystore.

Algorithm

String

Encryption algorithm that the keystore uses.

### NTLM Proxy
FieldTypeDescriptionDefault ValueRequired

Ntlm Domain

String

Domain of the NTLM proxy server.

x

Host

String

Hostname or IP address of the NTLM proxy server.

x

Port

Number

Port of the NTLM proxy server.

x

Username

String

Username to authenticate against the proxy server.

Password

String

Password to authenticate against the proxy server.

Non Proxy Hosts

String

NTLM hosts that the connector can access without using a proxy server.

### Proxy
FieldTypeDescriptionDefault ValueRequired

Host

String

Hostname or IP address of the proxy server.

x

Port

Number

Port of the proxy server.

x

Username

String

Username to authenticate against the proxy server.

Password

String

Password to authenticate against the proxy server.

Non Proxy Hosts

String

Hosts that the connector can access without using a proxy server.

### Reconnect Configures a standard reconnection strategy, which specifies how often to reconnect and how many reconnection attempts the connector source or operation can make.
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often to attempt to reconnect, in milliseconds.

Reconnection Attempts

Number

How many reconnection attempts to make.

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

### Reconnect Forever Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.
FieldTypeDescriptionDefault ValueRequired

Frequency (ms)

Number

How often to reconnect, in milliseconds

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

### Reconnection Configures a reconnection strategy for an operation.
FieldTypeDescriptionDefault ValueRequired

Fails Deployment

Boolean

What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy:

  • true: Allow the deployment to fail.

  • false: Ignore the results of the connectivity test.

Reconnection Strategy

The reconnection strategy to use.

### Redelivery Policy
FieldTypeDescriptionDefault ValueRequired

Max Redelivery Count

Number

The maximum number of times a message can be redelivered and processed unsuccessfully before triggering a process-failed message.

Use Secure Hash

Boolean

Whether to use a secure hash algorithm to identify a redelivered message.

Message Digest Algorithm

String

The secure hashing algorithm to use. If not set, the default is SHA-256.

Id Expression

String

Defines one or more expressions to use to determine when a message has been redelivered. This property can be set only if useSecureHash is false.

Object Store

Object Store

The object store where the redelivery counter for each message is stored.

### Repeatable File Store Stream
FieldTypeDescriptionDefault ValueRequired

In Memory Size

Number

Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance:

  • Configure a larger buffer size to avoid the number of times Mule needs to write the buffer on disk.

    This increases performance, but it also limits the number of concurrent requests your application can process, because it requires additional memory.

  • Configure a smaller buffer size to decrease memory load at the expense of response time.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which the value of In Memory Size is expressed

### Repeatable In Memory Stream Configures the in-memory streaming strategy by which the request fails if the data exceeds the value of the **MAX Buffer Size** field. Always run performance tests to find the optimal buffer size for your specific use case.
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by Buffer Size Increment, with an upper limit of the In Memory Size value.

Buffer Size Increment

Number

This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full.

Max Buffer Size

Number

Maximum size of the buffer. If the buffer size exceeds this value, Mule raises a STREAM_MAXIMUM_SIZE_EXCEEDED error. A value of less than or equal to 0 means no limit.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the Initial Buffer Size, Buffer Size Increment, and Max Buffer Size fields.

### Standard Revocation Check
FieldTypeDescriptionDefault ValueRequired

Only End Entities

Boolean

Only verify the last element of the certificate chain.

Prefer Crls

Boolean

Try CRL instead of OCSP first.

No Failback

Boolean

Do not use the secondary checking method, which is the method not specified in the Prefer Crls field.

Soft Fail

Boolean

Avoid verification failure when the revocation server cannot be reached or is busy.

### Success Status Code Validator
FieldTypeDescriptionDefault ValueRequired

Values

String

Comma-separated list of status codes that indicate success.

x

### TLS Configures TLS to provide secure communications for the Mule app.
FieldTypeDescriptionDefault ValueRequired

Enabled Protocols

String

Comma-separated list of protocols enabled for this context.

Enabled Cipher Suites

String

Comma-separated list of cipher suites enabled for this context.

Trust Store

Configures the TLS truststore.

Key Store

Configures the TLS keystore.

Revocation Check

Configures a revocation checking mechanism.

### Truststore Configures the truststore for TLS.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the truststore. Mule resolves the path relative to the current classpath and file system.

Password

String

Password used to protect the truststore.

Type

String

Type of truststore.

Algorithm

String

Encryption algorithm used by the truststore.

Insecure

Boolean

If true, Mule stops performing certificate validations. Setting this field to true can make connections vulnerable to attacks.

## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [AS2 Connector in Anypoint Exchange](https://www.mulesoft.com/exchange/com.mulesoft.connectors/mule-as2-connector/) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 6.9 --- # AS2 Connector 6.9 XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio. If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. When you install the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location. It also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/as2-mule4 http://www.mulesoft.org/schema/mule/as2/current/mule-as2-mule4.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml <[source,xml,linenums] ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule-as2-connector x.x.x mule-plugin ``` Replace `x.x.x` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `as2`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## Next Step After completing your namespace and `pom.xml` file, you can try the [examples](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-examples). ## See Also - \* [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 7.0 is-latest-version: true --- # AS2 Connector 7.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Mule runtime engine (Mule) supports the AS2 protocol through 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, for example: - Send messages, signed or unsigned, over HTTP or HTTPS, using the AS2 protocol - Receive messages over HTTP or HTTPS, using the AS2 protocol - Receive asynchronous MDN for sent messages For compatibility information and fixed issues, see the AS2 Connector Release Notes. For a major or minor release, see [Upgrading and Migrating](https://docs.mulesoft.com/as2-connector/latest/as2-connector-upgrade-migrate). ## Before You Begin To use this connector, you must be familiar with: - The AS2 target resource - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - How to create a Mule app using Anypoint Studio (Studio) Before creating an app, you must have access to: - Credentials to access the AS2 target resource - Anypoint Platform - Anypoint Studio version 7.6 or later ## Common Use Cases for the Connector Common use cases for AS2 Connector include the following: - Send with sync MDN Sends a message through HTTP or HTTPS using the AS2 protocol requesting the partner for a synchronous MDN (receipt) - Send with async MDN Sends a message through HTTP or HTTPS using the AS2 protocol requesting the partner for an asynchronous MDN (receipt) - Listener Source that receives messages via HTTP or HTTPS using the AS2 protocol - MDN Listener Source that receives asynchronous MDN receipts via HTTP or HTTPS using the AS2 protocol - Non repudiation Listener Source that receives a signed copy of a receipt or a message for persistent non-repudiation storage ## Non-Repudiation Storage of AS2 Messages and MDNs If needed, you can configure non-repudiation storage for your AS2 operations to support regulatory or compliance requirements. Only signed messages and MDNs are eligible for non-repudiation. The following AS2 Connector sources and operations support the non-repudiation feature: - AS2 Send Sync operation - AS2 Send Async operation - AS2 Listener source - AS2 MDN Listener source ### Before You Begin for Non-Repudiation Storage To enable non-repudiation of a message in AS2 Connector, you must implement and configure a separate Mule flow that acts as a non-repudiation flow: - The non-repudiation flow must have access to the signed MIME message that is passed to it, along with appropriate non-repudiation specific attributes. - This non-repudiation-specific Mule flow is responsible for receiving, storing, and acting upon the messages and attributes it receives. - The name of this non-repudiation flow must be configured on an appropriate listener or operation that has non-repudiation storage enabled. ## Next Step After you complete the prerequisites, you are ready to create an app and configure the connector using [Anypoint Studio](https://docs.mulesoft.com/as2-connector/latest/as2-connector-studio). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 7.0 is-latest-version: true --- # AS2 Connector 7.0 Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Mule applications using Anypoint Connector for AS2 (AS2 Connector) must include a global configuration to add external libraries specific to the active security mode. Only one external libs configuration is permitted per application, so you must configure this element manually in the examples. These examples show how to configure send and receive messages in AS2 Connector: - [Receiving AS2 Messages and Sending Back MDNs](https://docs.mulesoft.com/as2-connector/latest/as2-connector-example-receive-send) Configure the **As 2 listener** source to start receiving AS2 requests and the **Send with Sync MDN** and **Send with Async MDN** operations to start sending AS2 requests. - [Receiving AS2 MDN Messages](https://docs.mulesoft.com/as2-connector/latest/as2-connector-example-receiving-mdn-messages) Configure the **As 2 mdn listener** source to start receiving Messsage Disposition Notification (MDN) Messages. - [Sending AS2 Messages and Receiving MDNs](https://docs.mulesoft.com/as2-connector/latest/as2-connector-example-send) Configure the connector to send AS2 messages to a partner and handle both synchronous and asynchronous MDNs. - [Sending MDNs to Multiple Partners](https://docs.mulesoft.com/as2-connector/latest/as2-connector-example-multiple-partners) How to send MDNs to multiple partners. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 7.0 is-latest-version: true --- # AS2 Connector 7.0 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for AS2 (AS2 Connector) enables trading partners to transmit and receive AS2 messages that contain EDI-X12, EDIFACT, XML, or binary payloads. ## Configurations --- ### Listener Config #### General Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types for this configuration.

x

HTTP Listener

String

Reference to global HTTP Listener definition for our service endpoint used by partner for both action and signal messages.

x

Security Requirement Level

Enumeration, one of:

  • SIGNED

  • ENCRYPTED

  • SIGNED_ENCRYPTED

The security level required for any AS2 Listener using this configuration for all incoming messages. An error MDN response results if the security requirement is not met.

Keystore Password

String

The password of the provided keystore.

x

Keystore Path

String

The Absolute or relative path to the keystore containing certificates and private keys for self (this application) and the partner.

x

Private Key Password

String

Private key password, if the private key to use for signing the MDN is password protected.

Validate certificate expiration date

Boolean

If enabled, the connector can’t receive or send messages if the certificate is expired.

false

Warning before (days)

Number

The number of days before the certificate expiration date when the connector sends a warning message that the certificate is about to expire. For example, if the value of this field is 3, then the connector sends a warning message three days before the certificate expiration date.

This field applies only when the value of this field is greater than 0 and the Validate certificate expiration date field is enabled.

30

#### Partners Parameters
NameTypeDescriptionDefault ValueRequired

Inbound Request Authentication

Authentication method to use for verifying the incoming HTTP request when using dedicated mode.

Do not select this field if you are using shared mode or you will receive an error.

Self config - AS2 Partner Name

String

AS2 system identifier used for AS2-From and AS2-To headers.

x

Self config - x509 Alias

String

Certificate, private key alias, or both in the keystore. Required if using signing or encryption.

Self config - email

String

Email address used as the HTTP From header when sending AS2 messages.

x

Use different Alias for MDN Signature

Boolean

(Applies to the AS2 Listener source) Use the alias specified in Alias For MDN Signature to use a different keystore entry for the MDN signature.

true

Alias For MDN Signature

String

(Applies to the AS2 Listener source) Alias to use for the MDN signature if using a different alias for the MDN signature than for decryption. This field takes effect when Use different Alias for MDN Signature is true.

Private Key Password

String

Private key password, if the private key to use for signing the MDN is password protected.

Self config - Listener Mode

Enumeration, one of:

  • Dedicated mode

  • Shared mode

  • Dedicated mode

    Enables you to configure a single AS2 listener endpoint to receive messages from one partner only.

    If you select Dedicated mode, check Partner config (mandatory) and configure the partner using the Dedicated mode fields in this table.

  • Shared Mode

    Enables you to configure a single AS2 listener endpoint to receive messages from multiple partners.

    If you select Shared mode, uncheck Partner config (mandatory) and configure each partner using the Shared mode fields in this table.

Dedicated mode

x

Dedicated mode - Partner Config - AS2 Partner Name

String

AS2 system identifier used for AS2-From and AS2-To headers.

x

Dedicated mode - Partner Config - x509 Alias

String

Certificate, private key alias, or both in the keystore. Required if using signing or encryption.

Dedicated mode - Partner Config - email

String

Email address used as the HTTP From header when sending AS2 messages.

x

Shared mode - Partners

Enumeration, one of:

  • Expression

  • Inline

Indicates whether to add partner information by using an expression or by entering values inline.

Expression

x

Shared mode - Partners - AS2 Partner Name

String

AS2 system identifier used for AS2-From and AS2-To headers.

x

Shared mode - Partners - x509 Alias

String

Certificate, private key alias, or both in the keystore. Required if using signing or encryption.

Shared mode - Partners - email

String

Email address used as the HTTP From header when sending an AS2 message.

x

Shared mode - Inbound Request Authentication

Authentication method to use for verifying the incoming HTTP request.

#### Advanced Parameters
NameTypeDescriptionDefault ValueRequired

Check for duplicate messages

Checks for duplicate messages:

  • If selected, the connector checks to see if a new received message is duplicated, as determined by comparing the following values in the new message to those in existing messages:

    • Sender (from the AS2-From field)

    • Receiver (from the AS2-To field)

    • Message ID (from the Message-Id field)

    If all three values match an existing message, the connector rejects the duplicate message. If selected, you must:

    • Reference a global object store in the Object Store field. This object store will store the existing messages.

    • Add the object store dependency to your project by adding the ObjectStore component to the Studio canvas or adding it to the pom.xml, as follows:

      <dependency>
        <groupId>org.mule.connectors</groupId>
        <artifactId>mule-objectstore-connector</artifactId>
        <version>_latest-version_</version>
        <classifier>mule-plugin</classifier>
      </dependency>

      For the latest object store version, see the Object Store Connector Release Notes.

      If the MDN mode is AUTO, use the Idempotent Message Validator instead of the Check for duplicate messages field to check for duplicate messages. If the MDN mode is IMMEDIATE, the validator does not work. Therefore, in this circumstance, you must use the Check for duplicate messages field to check for duplicate messages. For more information, see Idempotent Message Validator.

    • If deselected, the connector accepts duplicate messages.

false

Object Store

Object Store

Object store where the connector stores new messages. This field is mandatory if the Check for duplicate messages field is selected.

For information about setting field values for this object store, see the Object Store Connector Reference.

You might experience limitations that are specific to the object store implementation you are using (Anypoint Object Store V2 (OSv2), CloudHub Object Store V1 (OSv1), or Mule Object Store), so configure the object store to suit your needs. For more information, see The Different Types of Object Stores Explained.

Expiration policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. Mule purges the instances as appropriate.

#### Connection Types ##### Async MDN Connection Provider ###### Parameters
NameTypeDescriptionDefault ValueRequired

Use Persistent Connections

Boolean

If false, each connection is closed after the first request completes.

false

Connection Timeout

Number

How long the connector waits before timing out when establishing a connection to the remote service. This value is qualified by the Connection Timeout Units field.

30

Connection Timeout Units

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the value of the Connection Timeout field.

SECONDS

Max Connections

Number

The maximum number of outbound connections to keep open at the same time. By default, the number of connections is unlimited.

-1

Connection Idle Timeout

Number

A timeout for how long a connection can remain idle before it is closed. The value of this attribute is only used when persistent connections are enabled. This value is qualified by the Connection Idle Timeout Units field.

30

Connection Idle Timeout Units

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the value of the Connection Idle Timeout field.

MINUTES

Retry Interval

Number

The interval between each retry, in seconds.

60

Retry Count

Number

The number of retries. A value of 0 means no retries.)

0

Proxy Config

Reusable configuration element for outbound connections through a proxy. A proxy element must define a host name and a port attributes, and optionally can define a username and password.

TLS Configuration

Reference to a TLS config element. This enables HTTPS for this configuration.

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, the deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

#### Associated Sources - [As2 Listener](#as2-listener) --- ### MDN Listener Config #### General Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x

HTTP Listener

String

Reference to global HTTP Listener definition for our service endpoint used by a partner for both action and signal messages.

x

Keystore Password

String

The password of the provided keystore.

x

Keystore Path

String

The Absolute or relative path to the keystore containing certificates and private keys for self(this application) and the partner.

x

Private Key Password

String

Private key password, if the private key to use for signing the MDN is password protected.

Validate certificate expiration date

Boolean

If enabled, the connector can’t receive or send messages if the certificate is expired.

false

Warning before (days)

Number

The number of days before the certificate expiration date when the connector sends a warning message that the certificate is about to expire. For example, if the value of this field is 3, then the connector sends a warning message three days before the certificate expiration date.

This field applies only when the value of this field is greater than 0 and the Validate certificate expiration date field is enabled.

30

#### Advanced Parameters
NameTypeDescriptionDefault ValueRequired

Expiration policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. Mule purges the instances as appropriate.

#### Partners Parameters
NameTypeDescriptionDefault ValueRequired

Self config - AS2 Partner Name

String

AS2 system identifier used for AS2-From and AS2-To headers.

x

Self config - x509 Alias

String

Certificate, private key alias, or both in the keystore. Required if using signing or encryption.

Self config - email

String

Email address used as the HTTP From header when sending 12 messages.

x

MDN Listener Mode

Enumeration, one of:

  • Mdn dedicated mode

  • Mdn shared mode

  • Mdn dedicated mode

    Enables you to configure a single AS2 listener endpoint to receive MDNs from one partner only.

    If you select Mdn dedicated mode, check Partner config (mandatory) and configure the partner using the Mdn dedicated mode fields in this table.

  • Mdn shared mode

    Enables you to configure a single AS2 listener endpoint to receive MDNs from multiple partners.

    If you select Mdn shared mode, uncheck Partner config (mandatory) and configure each partner using the Mdn shared mode fields in this table.

x

Mdn dedicated mode - Partner Config - AS2 Partner Name

String

AS2 system identifier used for AS2-From and AS2-To headers.

x

Mdn dedicated mode - Partner Config - x509 Alias

String

Certificate, private key alias, or both in the keystore. Required if using signing or encryption.

Dedicated mode

Mdn shared mode - Partners

Enumeration, one of:

  • Expression

  • Inline

Indicates whether to add partner information by using an expression or by entering values inline.

Expression

x

Mdn dedicated mode - Partner Config - email

String

Email address used as the HTTP From header when sending MDNs.

x

Mdn shared mode - Partners - AS2 Partner Name

String

AS2 system identifier used for AS2-From and AS2-To headers.

x

Mdn shared mode - Partners - x509 Alias

String

Certificate, private key alias, or both in the keystore. Required if using signing or encryption.

Mdn shared mode - Partners - email

String

Email address used as the HTTP From header when sending MDNs.

x

#### Associated Sources - [As2 Mdn Listener](#as2-mdn-listener) --- ### Send Config This class represents an extension configuration, values set in this class are commonly used across multiple operations since they represent something core from the extension. #### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types for this configuration.

x

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. Mule purges the instances as appropriate.

General - Transfer Mode Configuration

Enumeration, one of:

  • Chunked transfer mode

  • Identity transfer mode

  • Threshold transfer mode

The transfer mode applied when sending information:

  • Chunked transfer mode

    Sends the headers without the Content-Length property and modifies the message body to transfer it as a series of chunks.

  • Identity transfer mode

    Sends the headers with the Content-Length property and sends the whole message body.

  • Threshold transfer mode

    Sends the headers and message body according to the specified threshold.

    • If the message body is less than or equal to the threshold, the connector uses the Identity transfer mode option.

    • If the message body is greater than the threshold, the connector uses the Chunked transfer mode option.

Chunked transfer mode

Threshold

Number

Threshold used when the General - Transfer Mode Configuration field is set to Threshold transfer mode.

64

Threshold Unit

Enumeration, one of:

  • Byte

  • GB

  • KB

Unit associated with the Threshold field.

KB

General - Propagate Content Transfer Encoding

Boolean

Indicates whether to propagate the content transfer encoding on the AS2 message sent to the partner:

  • True: The main content transfer encoding is propagated to every MIME part of the resulting message.

  • False: Signed and encrypted MIME parts are encoded with Base64.

False

General - Custom Message ID

String

Enables the specification of a custom AS2 Message ID

Partner Config - AS2 Partner Name

String

AS2 system identifier (used for AS2-From and AS2-To headers)

x

Partner Config - x509 Alias

String

Certificate, private key alias, or both in the keystore (required if using signing or encryption)

Partner Config - email

String

Email address used as HTTP From header when sending

x

MDN Partner Config - Use different Alias for MDN Signature

Boolean

(Applies to the Send with Sync Mdn operation) Use the alias specified in Alias For MDN Signature as the alias for MDN signature validation.

true

MDN Partner Config - Alias For MDN Signature

String

(Applies to the Send with Sync Mdn operation) Alias to use for MDN signature validation if using a different alias for MDN signature validation than for encryption. This field takes effect when Use different Alias for MDN Signature is true.

Self config - AS2 Partner Name

String

AS2 system identifier (used for AS2-From and AS2-To headers)

x

Self config - x509 Alias

String

Certificate, private key alias or both in keystore (required if using signing or encryption)

Self config - email

String

Email address used as HTTP From header when sending

x

Subject

String

Free form text for MIME Subject header

MIC Signature Algorithm

Enumeration, one of:

  • MD5

  • SHA1

  • SHA224

  • SHA256

  • SHA384

  • SHA512

  • UNSIGNED

Algorithm to use when setting the message integrity check value.

UNSIGNED

MDN MIC Signature Algorithm

Enumeration, one of:

  • MD5

  • SHA1

  • SHA224

  • SHA256

  • SHA384

  • SHA512

  • UNSIGNED

Request partner to respond with a signed MDN using this algorithm for calculating MIC

UNSIGNED

Encryption Algorithm

Enumeration, one of:

  • DES

  • DES_EDE3

  • RC2

  • AES128_CBC

  • AES192_CBC

  • AES256_CBC

  • AES128_CCM

  • AES192_CCM

  • AES256_CCM

  • AES128_GCM

  • AES192_GCM

  • AES256_GCM

  • AES256_WRAP

  • CAST5

  • UNENCRYPTED

The Algorithm to use when encrypting the message to be sent

UNENCRYPTED

Content Transfer Encoding

Enumeration, one of:

  • BASE64

  • QUOTED_PRINTABLE

  • SEVEN_BIT

  • EIGHT_BIT

  • BINARY

The encoding to use on the content of AS2 message being sent.

BINARY

Request A Receipt

Enumeration, one of:

  • NONE

  • UNSIGNED

  • SIGNED_OPTIONAL

  • SIGNED_REQUIRED

How the connector behaves based on the received receipts.

UNSIGNED

Compression Type

Enumeration, one of:

  • NONE

  • ZLIB

The Compression type to use

NONE

Receipt Delivery URL

String

The asynchronous MDN delivery address to which the MDN is returned. This should be the fully formed URL to the As 2 mdn listener source, for example, https://example.com/mdn.

If a flow uses the Send With Async MDN operation, then either this field or the Receipt Delivery URL field associated with that operation is required. If both fields have values, the value for the operation overrides the value for the global configuration.

Keystore Password

String

The password of the provided keystore.

x

Keystore Path

String

The Absolute or relative path to the keystore containing certificates and private keys for self(this application) and the partner.

x

Private Key Password

String

Private key password, if the private key to use for signing the MDN is password protected.

Validate certificate expiration date

Boolean

If enabled, the connector can’t receive or send messages if the certificate is expired.

false

Warning before (days)

Number

The number of days before the certificate expiration date when the connector sends a warning message that the certificate is about to expire. For example, if the value of this field is 3, then the connector sends a warning message three days before the certificate expiration date.

This field applies only when the value of this field is greater than 0 and the Validate certificate expiration date field is enabled.

30

#### Connection Types ##### Outbound Connection Config ###### Parameters
NameTypeDescriptionDefault ValueRequired

Use Persistent Connections

Boolean

If false, each connection is closed after the first request completes.

false

Connection Timeout

Number

How long the connector waits before timing out when establishing a connection to the remote service. This value is qualified by the Connection Timeout Units field.

30

Connection Timeout Units

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the value of the Connection Timeout field.

SECONDS

Max Connections

Number

The maximum number of outbound connections to keep open at the same time. By default the number of connections is unlimited.

-1

Connection Idle Timeout

Number

A timeout for how long a connection can remain idle before it is closed. The value of this attribute is only used when persistent connections are enabled. This value is qualified by the value of the Connection Idle Timeout Units field.

30

Connection Idle Timeout Units

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the value of the Connection Idle Timeout field.

MINUTES

Proxy Config

Reusable configuration element for outbound connections through a proxy. A proxy element must define a host name and a port attributes, and optionally can define a username and a password.

Partner URL

String

Service endpoint URL to the partner.

x

Outbound Request Authentication

HttpRequestAuthentication

Authentication method to use for the HTTP request.

TLS Configuration

Reference to a TLS config element. This enables HTTPS for this configuration.

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, the deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

## Sources - [As2 Listener](#as2-listener) - [As2 Mdn Listener](#as2-mdn-listener) - [Non repudiation listener](#non-repudiation-listener) ### As2 Listener `` Represents a listener for AS2 sender requests. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Path

String

This path is appended to any path set in the listener configuration.

/

Connection Timeout

Number

An override for the timeout for establishing connections to the remote service as milliseconds. The default of 0 means this value is not used to override the configuration.

0

Non repudiation flow ref

String

The name of the configured flow that contains the Non repudiation listener source.

Mdn mode

Enumeration, one of:

  • AUTO

  • IMMEDIATE

MDN deliver mode:

  • AUTO: Sends an MDN at the end of the flow.

  • IMMEDIATE: Sends an MDN when the source receives a message.

IMMEDIATE

Output Mime Type

String

The MIME type of the payload that this operation outputs.

Output Encoding

String

The encoding of the payload that this operation outputs.

Primary Node Only

Boolean

Whether to execute this source on only the primary node when running in a cluster.

Streaming Strategy

Configures how Mule processes streams. The default is to use repeatable streams.

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Reconnection Strategy

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

#### Output

Type

Binary

Attributes Type

#### For Configurations - [Listener Config](#ListenerConfig) ### As2 Mdn Listener `` Listens for AS2 requests and automatically sends an MDN back to the receipt URL provided in the transmission when a request is received. > [!NOTE] If the receipt URL is inaccessible, the inbound AS2 message is not processed. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Path

String

This path is appended to any path set in the listener configuration.

/

Non repudiation flow ref

String

The name of the configured flow that contains the Non repudiation listener source.

Output Mime Type

String

The MIME type of the payload that this operation outputs.

Output Encoding

String

The encoding of the payload that this operation outputs.

Primary Node Only

Boolean

Whether to execute this source on only the primary node when running in a cluster.

Streaming Strategy

Configures how Mule processes streams. The default is to use repeatable streams.

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

#### Output

Type

Binary

Attributes Type

#### For Configurations - [MDN Listener Config](#MDNListenerConfig) ### Non repudiation listener `` Receives a signed copy of a receipt or a message for persistent non-repudiation storage. #### Parameters
NameTypeDescriptionDefault ValueRequired

Display Name

String

The name of this configuration. Connectors reference the configuration with this name.

x

Mime Type

String

The MIME type of the payload passed to this flow.

Encoding

String

The encoding of the payload passed to this flow.

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Streaming Strategy

Configures how Mule processes streams. The default is to use repeatable streams.

Primary Node Only

Boolean

Whether to execute this source on only the primary node when running in a cluster.

#### Output

Type

Binary

Attributes Type

Attributes Type

### For Configurations None. ## Operations - [Send With Async Mdn](#sendWithAsyncMdn) - [Send With Sync Mdn](#sendWithSyncMdn) ### Send With Async Mdn `` Performs the send async request using the configuration, client, and AS2 requester parameters, and completes the callback accordingly. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

General - Custom Message ID

String

Enables the specification of a custom AS2 Message ID.

Output Mime Type

String

The MIME type of the payload that this operation outputs.

Output Encoding

String

The encoding of the payload that this operation outputs.

Streaming Strategy

Configures how Mule processes streams. The default is to use repeatable streams.

AS2 MIME Type

String

The content type of the Document being sent via AS2 (for example, application/EDI-X12). There are no restrictions on the content-type that are supported.

#[payload.^mimeType]

Content Stream

Binary

The content InputStream to be sent.

#[payload]

Content Description

String

Content MIME part content description

File Name

String

Filename of the content stream. If not set, the content is transferred without a filename.

Request Receipt

Enumeration, one of:

  • NONE

  • UNSIGNED

  • SIGNED_OPTIONAL

  • SIGNED_REQUIRED

How the connector behaves based on the received receipts:

  • NONE: No receipt is expected.

  • SIGNED_OPTIONAL: Receipt can be signed or unsigned.

  • SIGNED_REQUIRED: Expects a signed receipt. The application fails if the receipt is unsigned.

  • UNSIGNED: Expects an unsigned receipt.

Require Processed

Boolean

Requires a processed response in the MDN to continue the flow. An error occurs if the response is unprocessed.

true

Connection Timeout

Number

Override for the timeout for establishing connections to the remote service as milliseconds. The default of 0 means this value is not used to override the configuration.

0

Non repudiation flow ref

String

Name of the configured flow that contains the Non repudiation listener source.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

Custom headers

String

Enables you to add custom keys to include in outbound AS2 messages. For each key to include, enter values for these name-value pairs:

  • Name

    Name of the key to send to outbound AS2 messages, formatted as Name:key-name

  • Value

    Content of the key to send to outbound AS2 messages, formatted as Value:key-value

Receipt Delivery URL

String

The asynchronous MDN delivery address to which the MDN is returned. This should be the fully formed URL to the As 2 mdn listener source, for example, https://example.com/mdn.

If a flow uses the Send With Async MDN operation, then either this field or the Receipt Delivery URL field associated with that operation is required. If both fields have values, the value for the operation overrides the value for the global configuration.

#### Output

Type

Binary

Attributes Type

### For Configurations - [Send Config](#send-config) #### Throws - AS2-MULE4:CONFIGURATION - AS2-MULE4:UNAUTHORIZED - AS2-MULE4:CONNECTIVITY - AS2-MULE4:RETRY\_EXHAUSTED ### Send With Sync Mdn `` Performs the send sync request using the configuration, client, and AS2 requester parameters, and completes the callback accordingly. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

General - Custom Message ID

String

Enables the specification of a custom AS2 Message ID.

Output Mime Type

String

The MIME type of the payload that this operation outputs.

Output Encoding

String

The encoding of the payload that this operation outputs.

Streaming Strategy

Configures how Mule processes streams. The default is to use repeatable streams.

AS2 MIME Type

String

The content type of the Document being sent via AS2 (for example, application/EDI-X12). There are no restrictions on the content-type that are supported.

#[payload.^mimeType]

Content Stream

Binary

The content InputStream to be sent.

#[payload]

Content Description

String

Content MIME part content description

File Name

String

Filename of the content stream. If not set, the content is transferred without a filename.

Request Receipt

Enumeration, one of:

  • NONE

  • UNSIGNED

  • SIGNED_OPTIONAL

  • SIGNED_REQUIRED

How the connector behaves based on the received receipts:

  • NONE: No receipt is expected.

  • SIGNED_OPTIONAL: Receipt can be signed or unsigned.

  • SIGNED_REQUIRED: Expects a signed receipt. The application fails if the receipt is unsigned.

  • UNSIGNED: Expects an unsigned receipt.

Require Processed

Boolean

Requires a processed response in the MDN to continue the flow. An error occurs if the response is unprocessed.

true

Require Processed

Boolean

Require Processed response in the MDN to continue the flow (otherwise there is an error)

true

Connection Timeout

Number

An override for the timeout for establishing connections to the remote service as milliseconds. The default of 0 means this value is not used to override the configuration.

0

Non repudiation flow ref

String

The name of the configured flow that contains the Non repudiation listener source.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

Custom headers

String

Enables you to add custom keys to include in outbound AS2 messages. For each key to include, enter values for these name-value pairs:

  • Name

    Name of the key to send to outbound AS2 messages, formatted as Name:key-name

  • Value

    Content of the key to send to outbound AS2 messages, formatted as Value:key-value

#### Output

Type

Binary

Attributes Type

### For Configurations - [Send Config](#send-config) #### Throws - AS2-MULE4:CONFIGURATION - AS2-MULE4:MIME\_PARSE - AS2-MULE4:UNAUTHORIZED - AS2-MULE4:CONNECTIVITY - AS2-MULE4:SIGNATURE\_VERIFY - AS2-MULE4:RETRY\_EXHAUSTED ## Types ### AS2 Basic Authentication
FieldTypeDescriptionDefault ValueRequired

Username

String

Username to authenticate.

x

Password

String

Password of user to authenticate.

x

### AS2 Listener Attributes
FieldTypeDescriptionDefault ValueRequired

As2 Message Id

String

AS2 unique message ID from receiver to sender.

x

filename

String

Received filename.

x

Mime Type

String

MIME type, for example, application/xml.

x

From Name

String

AS2 Receiver name.

x

Headers

Object

AS2 HTTP headers that elaborate the message format.

x

Mdn Delivery Status

Enumeration, one of:

  • NONE

  • SUCCESS

  • FAILURE

AS2 message validation status

x

To Name

String

AS2 Sender name

x

### AS2 Mdn Attributes
FieldTypeDescriptionDefault ValueRequired

As2 Message Id

String

AS2 unique message ID from receiver to sender.

x

Disposition Content

Object

AS2 processed MDN report as headers.

x

From Name

String

AS2 Receiver name

x

Headers

Object

AS2 HTTP headers that elaborate the message format.

x

Mdn Alg

Enumeration, one of:

  • MD5

  • SHA1

  • SHA224

  • SHA256

  • SHA384

  • SHA512

  • UNSIGNED

AS2 message integrity check algorithm used

x

Mdn Mic

String

AS2 message integrity check hashcode

x

Mdn Processed

Boolean

AS2 message validation status

false

Original AS2 Message Id

String

AS2 Message ID received

x

Report Text

String

MDN report text

x

To Name

String

AS2 Sender name

x

### AS2 Send Attributes
FieldTypeDescriptionDefault ValueRequired

As2 Mdn Attributes

AS2 returned MDN attribute group

x

As2 Message Id

String

AS2 unique message ID from receiver to sender

x

From Name

String

AS2 receiver name

x

Headers

Object

AS2 HTTP headers that elaborate the message format

x

Msg MIC

String

AS2 message integrity check hashcode

x

Msg MIC Alg

String

AS2 message integrity check algorithm used

x

To Name

String

AS2 sender name

x

### Crl File Specifies the location of the certification revocation list (CRL) file.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the CRL file.

### Custom Ocsp Responder Configures a custom OCSP responder for certification revocation checks.
FieldTypeDescriptionDefault ValueRequired

Url

String

URL of the OCSP responder.

Cert Alias

String

Alias of the signing certificate for the OCSP response. If specified, the alias must be in the truststore.

### Expiration Policy
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the value of the Max Idle Time field.

### Failure Status Code Validator
FieldTypeDescriptionDefault ValueRequired

Values

String

Comma-separated list of status codes that cause errors to be thrown.

x

### KeyStore Configures the keystore for TLS.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the keystore. Mule resolves the path relative to the current classpath and file system.

Type

String

Type of keystore.

Alias

String

Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file.

Key Password

String

Password used to protect the private key.

Password

String

Password used to protect the keystore.

Algorithm

String

Encryption algorithm that the keystore uses.

### NTLM Proxy
FieldTypeDescriptionDefault ValueRequired

Ntlm Domain

String

Domain of the NTLM proxy server.

x

Host

String

Hostname or IP address of the NTLM proxy server.

x

Port

Number

Port of the NTLM proxy server.

x

Username

String

Username to authenticate against the proxy server.

Password

String

Password to authenticate against the proxy server.

Non Proxy Hosts

String

NTLM hosts that the connector can access without using a proxy server.

### Proxy
FieldTypeDescriptionDefault ValueRequired

Host

String

Hostname or IP address of the proxy server.

x

Port

Number

Port of the proxy server.

x

Username

String

Username to authenticate against the proxy server.

Password

String

Password to authenticate against the proxy server.

Non Proxy Hosts

String

Hosts that the connector can access without using a proxy server.

### Reconnect Configures a standard reconnection strategy, which specifies how often to reconnect and how many reconnection attempts the connector source or operation can make.
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often to attempt to reconnect, in milliseconds.

Reconnection Attempts

Number

How many reconnection attempts to make.

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

### Reconnect Forever Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.
FieldTypeDescriptionDefault ValueRequired

Frequency (ms)

Number

How often to reconnect, in milliseconds

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

### Reconnection Configures a reconnection strategy for an operation.
FieldTypeDescriptionDefault ValueRequired

Fails Deployment

Boolean

What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy:

  • true: Allow the deployment to fail.

  • false: Ignore the results of the connectivity test.

Reconnection Strategy

The reconnection strategy to use.

### Redelivery Policy
FieldTypeDescriptionDefault ValueRequired

Max Redelivery Count

Number

The maximum number of times a message can be redelivered and processed unsuccessfully before triggering a process-failed message.

Use Secure Hash

Boolean

Whether to use a secure hash algorithm to identify a redelivered message.

Message Digest Algorithm

String

The secure hashing algorithm to use. If not set, the default is SHA-256.

Id Expression

String

Defines one or more expressions to use to determine when a message has been redelivered. This property can be set only if useSecureHash is false.

Object Store

Object Store

The object store where the redelivery counter for each message is stored.

### Repeatable File Store Stream
FieldTypeDescriptionDefault ValueRequired

In Memory Size

Number

Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance:

  • Configure a larger buffer size to avoid the number of times Mule needs to write the buffer on disk.

    This increases performance, but it also limits the number of concurrent requests your application can process, because it requires additional memory.

  • Configure a smaller buffer size to decrease memory load at the expense of response time.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which the value of In Memory Size is expressed

### Repeatable In Memory Stream Configures the in-memory streaming strategy by which the request fails if the data exceeds the value of the **MAX Buffer Size** field. Always run performance tests to find the optimal buffer size for your specific use case.
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by Buffer Size Increment, with an upper limit of the In Memory Size value.

Buffer Size Increment

Number

This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full.

Max Buffer Size

Number

Maximum size of the buffer. If the buffer size exceeds this value, Mule raises a STREAM_MAXIMUM_SIZE_EXCEEDED error. A value of less than or equal to 0 means no limit.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the Initial Buffer Size, Buffer Size Increment, and Max Buffer Size fields.

### Standard Revocation Check
FieldTypeDescriptionDefault ValueRequired

Only End Entities

Boolean

Only verify the last element of the certificate chain.

Prefer Crls

Boolean

Try CRL instead of OCSP first.

No Failback

Boolean

Do not use the secondary checking method, which is the method not specified in the Prefer Crls field.

Soft Fail

Boolean

Avoid verification failure when the revocation server cannot be reached or is busy.

### Success Status Code Validator
FieldTypeDescriptionDefault ValueRequired

Values

String

Comma-separated list of status codes that indicate success.

x

### TLS Configures TLS to provide secure communications for the Mule app.
FieldTypeDescriptionDefault ValueRequired

Enabled Protocols

String

Comma-separated list of protocols enabled for this context.

Enabled Cipher Suites

String

Comma-separated list of cipher suites enabled for this context.

Trust Store

Configures the TLS truststore.

Key Store

Configures the TLS keystore.

Revocation Check

Configures a revocation checking mechanism.

### Truststore Configures the truststore for TLS.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the truststore. Mule resolves the path relative to the current classpath and file system.

Password

String

Password used to protect the truststore.

Type

String

Type of truststore.

Algorithm

String

Encryption algorithm used by the truststore.

Insecure

Boolean

If true, Mule stops performing certificate validations. Setting this field to true can make connections vulnerable to attacks.

## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [AS2 Connector in Anypoint Exchange](https://www.mulesoft.com/exchange/com.mulesoft.connectors/mule-as2-connector/) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 7.0 is-latest-version: true --- # AS2 Connector 7.0 XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio. If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. When you install the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location. It also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/as2-mule4 http://www.mulesoft.org/schema/mule/as2/current/mule-as2-mule4.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml <[source,xml,linenums] ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule-as2-connector x.x.x mule-plugin ``` Replace `x.x.x` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `as2`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## Next Step After completing your namespace and `pom.xml` file, you can try the [examples](https://docs.mulesoft.com/as2-connector/latest/as2-connector-examples). ## See Also - \* [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 6.9 --- # Receiving AS2 MDNs > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The following example shows how to use Anypoint Connector for AS2 (AS2 Connector) to receive AS2 MDN (Message Disposition Notification) messages from a trading partner and, for every received MDN, log a message that contains the message payload to the Studio console. This example is similar to the [Receiving AS2 Messages](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-example-receive-send#receiving-messages) example, except that in this example: - You use the **AS2 mdn listener** source instead of the **As 2 listener** source and set the path to `/receiveMDN`. - On the **Logger** properties window, you set the **Message** field to `MDN Received: #[payload]`. The following screenshot shows the Anypoint Studio app flow for this example: ![Receive MDN Messages Example App Flow](/mulesoft/current/en-us/as2-connector/6.9/_images/as2-connector-example-mdn-listener-flow.png) To test this example: 1. Run this app. 2. Run the app configured in the [Sending Asynchronous AS2 MDNs](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-example-receive-send#asynchronous-mdns) example. In the Studio console in this app, you should see a message for each received AS2 MDN that was sent asynchronously. For example: ```console INFO 2022-09-09 17:15:46,409 [[MuleRuntime].uber.06: [as2-basic-example].ReceiveAsyncMDN.CPU_LITE @1369de96] [processor: ReceiveAsyncMDN/processors/0; event: 30609f70-307c-11ed-8f5a-38f9d3713331] org.mule.runtime.core.internal.processor. LoggerMessageProcessor: MDN Received! ``` > [!NOTE] If the **Receipt delivery url** field is not configured for the **Send with Async MDN** > source and you are using an HTTP request, the header `Receipt-Delivery-Option` must be included > with the **As 2 mdn listener** endpoint (`http://localhost:8082/receiveMDN`). ## XML for the Receiving AS2 MDNs Example Paste this code into your Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ## See Also - [AS2 Connector Examples](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-examples) - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 7.0 is-latest-version: true --- # Receiving AS2 MDNs > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The following example shows how to use Anypoint Connector for AS2 (AS2 Connector) to receive AS2 MDN (Message Disposition Notification) messages from a trading partner and, for every received MDN, log a message that contains the message payload to the Studio console. This example is similar to the [Receiving AS2 Messages](https://docs.mulesoft.com/as2-connector/latest/as2-connector-example-receive-send#receiving-messages) example, except that in this example: - You use the **AS2 mdn listener** source instead of the **As 2 listener** source and set the path to `/receiveMDN`. - On the **Logger** properties window, you set the **Message** field to `MDN Received: #[payload]`. The following screenshot shows the Anypoint Studio app flow for this example: ![Receive MDN Messages Example App Flow](/mulesoft/current/en-us/as2-connector/latest/_images/as2-connector-example-mdn-listener-flow.png) To test this example: 1. Run this app. 2. Run the app configured in the [Sending Asynchronous AS2 MDNs](https://docs.mulesoft.com/as2-connector/latest/as2-connector-example-receive-send#asynchronous-mdns) example. In the Studio console in this app, you should see a message for each received AS2 MDN that was sent asynchronously. For example: ```console INFO 2022-09-09 17:15:46,409 [[MuleRuntime].uber.06: [as2-basic-example].ReceiveAsyncMDN.CPU_LITE @1369de96] [processor: ReceiveAsyncMDN/processors/0; event: 30609f70-307c-11ed-8f5a-38f9d3713331] org.mule.runtime.core.internal.processor. LoggerMessageProcessor: MDN Received! ``` > [!NOTE] If the **Receipt delivery url** field is not configured for the **Send with Async MDN** > source and you are using an HTTP request, the header `Receipt-Delivery-Option` must be included > with the **As 2 mdn listener** endpoint (`http://localhost:8082/receiveMDN`). ## XML for the Receiving AS2 MDNs Example Paste this code into your Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ## See Also - [AS2 Connector Examples](https://docs.mulesoft.com/as2-connector/latest/as2-connector-examples) - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 6.9 --- # Receiving AS2 Messages and Sending Back MDNs > For the full documentation index, see: https://docs.mulesoft.com/llms.txt These examples show how to use Anypoint Connector for AS2 (AS2 Connector) to receive AS2 messages from a trading partner and send MDNs (Message Disposition Notifications) to that partner in response: - [Receiving AS2 Messages](#receiving-messages) Receive AS2 messages from your partner and, for every received message, log a message that contains the message payload to the Studio console. - [Sending Synchronous AS2 MDNs](#synchronous-mdns) Send a synchronous AS2 MDN in response to each received AS2 message. - [Sending Asynchronous AS2 MDNs](#asynchronous-mdns) Send an asynchronous AS2 MDN in response to each received AS2 message. ## Receiving AS2 Messages Creating this example involves creating a new Mule project and configuring the **As 2 Listener** source and **Logger** component. The following screenshot shows the Anypoint Studio app flow for this example: ![Receive AS2 Messages App Flow](/mulesoft/current/en-us/as2-connector/6.9/_images/as2-connector-example-listener-flow.png) ### Create a Flow to Receive the Message Configure the **AS 2 Listener** source to initiate a Mule flow when a call is made to the `/as2-receive` path on local host port `8081`: 1. In Anypoint Studio, create a new Mule project. 2. In the **Mule Palette** view, select the **As 2 listener** source and drag it to the canvas. 3. On the **As 2 listener** properties screen, optionally change the value of the **Display Name** field. 4. Set the **Path** field to `/as2-receive`. 5. Click the plus sign (**+**) next to the **Connector configuration** field to configure a global element that can be used by all instances of the **As 2 listener** source in the app. 6. On the **General** tab, click the plus sign (**+**) next to the **HTTP Listener** field. 7. Accept the defaults and click **OK**. 8. On the **General** tab, configure the keystore that contains the certificates and keys:
FieldValue

Keystore Password

test

Keystore Path

as2/partnera.p12

Private Key Password

test

9. On the **Partners** tab, specify the self and partner credentials. For the self credentials, configure these fields:
FieldValue

AS2 Partner Name

partnera

x509 Alias

partnera

email

support@partnera.com

For the partner credentials, configure these fields:
FieldValue

AS2 Partner Name

partnerb

x509 Alias

partnerb

email

support@partnerb.com

### Add the Logger Component Add the **Logger** component to the flow and configure it to log a message that includes the payload of the received message: 1. From the **Mule Palette** view, select **Core** and drag the **Logger** component next to **As 2 listener**. 2. In the Logger properties screen, set the **Message** field to `Message Received: #[payload]`. ### Save and Test the Mule App 1. Save the project. 2. Run the app by clicking the project name in **Package Explorer** and then clicking **Run** > **Run As** > **Mule Application**. If the application starts correctly, the console displays this message: `Mule is up and kicking` 3. Test the app by opening `http://localhost:8081/as2-receive` from a browser or an app like Postman and adding the required credentials. For each new request, the Studio console displays the received message. For example: ```console INFO 2022-09-09 17:15:46,409 [[MuleRuntime].uber.06: [as2-basic-example].AS2Listener.CPU_LITE @1369de96] [processor: AS2Listener/processors/0; event: 30609f70-307c-11ed-8f5a-38f9d3713331] org.mule.runtime.core.internal.processor. LoggerMessageProcessor: Message Received: Test Message ``` ### XML for the Receiving AS2 Messages Example Paste this code into your Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ## Sending Synchronous AS2 MDNs When your trading partner uses an AS2 listener, like in the [Receiving AS2 Messages](#receiving-messages-example) example, the listener’s MDN mode controls when a synchronous MDN is returned. The AS2 listener supports these configurations for managing synchronous MDN delivery timing: - **Immediate** The listener returns the MDN as soon as the incoming message is parsed and validated. The receiver’s business flow continues as a separate process after the MDN is sent. This is the default MDN Mode. - **Auto** The listener returns the MDN only after its internal business flow completes. This ensures that if the flow fails, a negative MDN is returned to the sender to signal a processing error. For this configuration, set the MDN mode to `AUTO` on the AS2 listener. ## Sending Asynchronous AS2 MDNs The AS2 listener validates the presence of the `Disposition-Notification-To` and `Receipt-Delivery-Option` headers when receiving an asynchronous MDN request. The listener immediately returns an `HTTP 200 OK` to acknowledge the inbound message. The listener uses the URL in the `Receipt-Delivery-Option` header to return the MDN via a new HTTP connection. The AS2 listener supports these configurations for managing asynchronous MDN delivery timing: - **Immediate** The listener posts the MDN to the `Receipt-Delivery-Option` URL as soon as the inbound message is parsed and validated. This is the default MDN Mode. - **Auto** The listener posts the MDN to the `Receipt-Delivery-Option` URL only after its business flow completes, allowing a negative MDN to be sent if the flow fails. For this configuration, set the MDN mode to `AUTO` on the AS2 listener. ## See Also - [AS2 Connector Examples](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-examples) - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 7.0 is-latest-version: true --- # Receiving AS2 Messages and Sending Back MDNs > For the full documentation index, see: https://docs.mulesoft.com/llms.txt These examples show how to use Anypoint Connector for AS2 (AS2 Connector) to receive AS2 messages from a trading partner and send MDNs (Message Disposition Notifications) to that partner in response: - [Receiving AS2 Messages](#receiving-messages) Receive AS2 messages from your partner and, for every received message, log a message that contains the message payload to the Studio console. - [Sending Synchronous AS2 MDNs](#synchronous-mdns) Send a synchronous AS2 MDN in response to each received AS2 message. - [Sending Asynchronous AS2 MDNs](#asynchronous-mdns) Send an asynchronous AS2 MDN in response to each received AS2 message. ## Receiving AS2 Messages Creating this example involves creating a new Mule project and configuring the **As 2 Listener** source and **Logger** component. The following screenshot shows the Anypoint Studio app flow for this example: ![Receive AS2 Messages App Flow](/mulesoft/current/en-us/as2-connector/latest/_images/as2-connector-example-listener-flow.png) ### Create a Flow to Receive the Message Configure the **AS 2 Listener** source to initiate a Mule flow when a call is made to the `/as2-receive` path on local host port `8081`: 1. In Anypoint Studio, create a new Mule project. 2. In the **Mule Palette** view, select the **As 2 listener** source and drag it to the canvas. 3. On the **As 2 listener** properties screen, optionally change the value of the **Display Name** field. 4. Set the **Path** field to `/as2-receive`. 5. Click the plus sign (**+**) next to the **Connector configuration** field to configure a global element that can be used by all instances of the **As 2 listener** source in the app. 6. On the **General** tab, click the plus sign (**+**) next to the **HTTP Listener** field. 7. Accept the defaults and click **OK**. 8. On the **General** tab, configure the keystore that contains the certificates and keys:
FieldValue

Keystore Password

test

Keystore Path

as2/partnera.p12

Private Key Password

test

9. On the **Partners** tab, specify the self and partner credentials. For the self credentials, configure these fields:
FieldValue

AS2 Partner Name

partnera

x509 Alias

partnera

email

support@partnera.com

For the partner credentials, configure these fields:
FieldValue

AS2 Partner Name

partnerb

x509 Alias

partnerb

email

support@partnerb.com

### Add the Logger Component Add the **Logger** component to the flow and configure it to log a message that includes the payload of the received message: 1. From the **Mule Palette** view, select **Core** and drag the **Logger** component next to **As 2 listener**. 2. In the Logger properties screen, set the **Message** field to `Message Received: #[payload]`. ### Save and Test the Mule App 1. Save the project. 2. Run the app by clicking the project name in **Package Explorer** and then clicking **Run** > **Run As** > **Mule Application**. If the application starts correctly, the console displays this message: `Mule is up and kicking` 3. Test the app by opening `http://localhost:8081/as2-receive` from a browser or an app like Postman and adding the required credentials. For each new request, the Studio console displays the received message. For example: ```console INFO 2022-09-09 17:15:46,409 [[MuleRuntime].uber.06: [as2-basic-example].AS2Listener.CPU_LITE @1369de96] [processor: AS2Listener/processors/0; event: 30609f70-307c-11ed-8f5a-38f9d3713331] org.mule.runtime.core.internal.processor. LoggerMessageProcessor: Message Received: Test Message ``` ### XML for the Receiving AS2 Messages Example Paste this code into your Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ## Sending Synchronous AS2 MDNs When your trading partner uses an AS2 listener, like in the [Receiving AS2 Messages](#receiving-messages-example) example, the listener’s MDN mode controls when a synchronous MDN is returned. The AS2 listener supports these configurations for managing synchronous MDN delivery timing: - **Immediate** The listener returns the MDN as soon as the incoming message is parsed and validated. The receiver’s business flow continues as a separate process after the MDN is sent. This is the default MDN Mode. - **Auto** The listener returns the MDN only after its internal business flow completes. This ensures that if the flow fails, a negative MDN is returned to the sender to signal a processing error. For this configuration, set the MDN mode to `AUTO` on the AS2 listener. ## Sending Asynchronous AS2 MDNs The AS2 listener validates the presence of the `Disposition-Notification-To` and `Receipt-Delivery-Option` headers when receiving an asynchronous MDN request. The listener immediately returns an `HTTP 200 OK` to acknowledge the inbound message. The listener uses the URL in the `Receipt-Delivery-Option` header to return the MDN via a new HTTP connection. The AS2 listener supports these configurations for managing asynchronous MDN delivery timing: - **Immediate** The listener posts the MDN to the `Receipt-Delivery-Option` URL as soon as the inbound message is parsed and validated. This is the default MDN Mode. - **Auto** The listener posts the MDN to the `Receipt-Delivery-Option` URL only after its business flow completes, allowing a negative MDN to be sent if the flow fails. For this configuration, set the MDN mode to `AUTO` on the AS2 listener. ## See Also - [AS2 Connector Examples](https://docs.mulesoft.com/as2-connector/latest/as2-connector-examples) - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 6.9 --- # Sending AS2 Messages and Receiving MDNs > For the full documentation index, see: https://docs.mulesoft.com/llms.txt These examples show how to use Anypoint Connector for AS2 (AS2 Connector) to send AS2 messages to a trading partner and receive Message Disposition Notifications (MDNs) in response: - [Send with Synchronous MDN](#send-with-synchronous-mdn) Send an AS2 message and receive a synchronous MDN in response. - [Send with Asynchronous MDN](#send-with-asynchronous-mdn) Send an AS2 message and receive an asynchronous MDN in response. ## Send with Synchronous MDN To create this example, start a new Mule project and configure the `http:listener` source and the Logger component. The image shows the Anypoint Studio flow for this example: ![Anypoint Studio flow for sending AS2 messages and receiving synchronous MDNs](/mulesoft/current/en-us/as2-connector/6.9/_images/as2-connector-example-sync-flow.png) ### Create a Flow to Send an AS2 Message Follow these steps to configure the `http:listener` source to initiate a Mule flow when a call is made to the `/sendSyncFlow` path on localhost port 8082: 1. Drag the HTTP listener from the Mule Palette onto the canvas. 2. Optionally, change the display name on the properties window for the listener and click **OK**. 3. Set the **Path** field to `/sendSyncFlow`. 4. Click the plus sign (**+**) next to the **Connector configuration** field to configure a global element that can be used by all instances of the HTTP listener. 5. On the **General** tab, accept the defaults and click **OK**. ### Add the Send with Synchronous MDN Operation Follow these steps to add the **Send with Sync MDN** operation and configure it to send MDNs to the receiving endpoint of `partnera`: 1. Drag the **Send with Sync MDN** operation next to the listener component on the canvas. 2. Click the plus sign (**+**) next to the **Connector configuration** field to configure a global element for the **Send with Sync MDN** operation. 3. Configure the connection by setting the **Partner URL** field to `http://localhost:8081/as2-receive` on the **General** tab. 4. Specify the self and partner credentials. Configure these fields in the **Self Config** section:
FieldValue

AS2 Partner Name

partnerb

x509 Alias

partnerb

email

support@partnerb.com

Configure these fields in the **Partner Config** section:
FieldValue

AS2 Partner Name

partnera

x509 Alias

partnera

email

support@partnera.com

5. If you want to use algorithms, configure them in the **Requester Config** section. 6. In the **Keystore** section, apply these values to the keystore that contains the certificates and keys:
FieldValue

Keystore Password

test

Keystore Path

as2/partnerb.p12

Private Key Password

test

### Add the Logger Component Add the logger component and configure it to log a message when the app sends an AS2 message and receives a synchronous MDN. 1. From the Mule Palette, select **Core** and drag the logger component next to the **Send with Sync MDN** operation. 2. Set the message for the logger to `Message Sent and MDN Received!`. ### Save and Test the Mule App Follow these steps to deploy your application locally and verify that it correctly sends AS2 requests and receives synchronous MDNs. 1. Save the project. 2. Run the app by clicking the project name in **Package Explorer** and then clicking **Run** > **Run As** > **Mule Application**. If the application starts correctly, the console shows a success message. 3. Test the app by opening `http://localhost:8082/sendSyncFlow` from a browser or an app like Postman. You can now send AS2 requests to the endpoint configured in the [Receiving AS2 Messages and Sending Back MDNs](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-example-receive-send#receiving-messages-example) example. With the example running, you can observe the message sent by the **Send with Sync MDN** operation. ### XML for the Sending Synchronous AS2 MDNs Example Paste this code into your Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ## Send with Async MDN This example follows the same structure as the [Send with Sync MDN](#send-with-synchronous-mdn) example but incorporates these changes: - The **Send with Async MDN** operation is used instead of the **Send with Sync MDN** operation. - A value is specified for the **Receipt delivery url** field. The field can be configured in the global element for the **Send with Async MDN** operation or in the properties window. The image shows the Anypoint Studio flow for this example: ![Anypoint Studio flow for sending AS2 messages and receiving asynchronous MDNs](/mulesoft/current/en-us/as2-connector/6.9/_images/as2-connector-example-async-flow.png) ### XML for the Sending AS2 Asynchronous MDNs Example Paste this code into your Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ### Save and Test the Mule App Follow these steps to deploy your application locally and verify that it correctly sends AS2 requests and receives asynchronous MDNs. 1. Save the project. 2. Run the app by clicking the project name in **Package Explorer** and then clicking **Run** > **Run As** > **Mule Application**. If the application starts correctly, the console shows a success message. 3. Test the app by opening `http://localhost:8082/sendAsyncFlow` from a browser or an app like Postman. You can now send AS2 requests to the endpoint configured in the [Receiving AS2 Messages and Sending Back MDNs](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-example-receive-send#receiving-messages-example) example. With the example running, you can observe the message sent by the **Send with Async MDN** operation. The MDN is omitted from the logs because it’s routed to the `receiptDeliveryUrl` shown in the [Receiving AS2 MDNs](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-example-receiving-mdn-messages) example. ## See Also - [AS2 Connector Examples](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-examples) - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 7.0 is-latest-version: true --- # Sending AS2 Messages and Receiving MDNs > For the full documentation index, see: https://docs.mulesoft.com/llms.txt These examples show how to use Anypoint Connector for AS2 (AS2 Connector) to send AS2 messages to a trading partner and receive Message Disposition Notifications (MDNs) in response: - [Send with Synchronous MDN](#send-with-synchronous-mdn) Send an AS2 message and receive a synchronous MDN in response. - [Send with Asynchronous MDN](#send-with-asynchronous-mdn) Send an AS2 message and receive an asynchronous MDN in response. ## Send with Synchronous MDN To create this example, start a new Mule project and configure the `http:listener` source and the Logger component. The image shows the Anypoint Studio flow for this example: ![Anypoint Studio flow for sending AS2 messages and receiving synchronous MDNs](/mulesoft/current/en-us/as2-connector/latest/_images/as2-connector-example-sync-flow.png) ### Create a Flow to Send an AS2 Message Follow these steps to configure the `http:listener` source to initiate a Mule flow when a call is made to the `/sendSyncFlow` path on localhost port 8082: 1. Drag the HTTP listener from the Mule Palette onto the canvas. 2. Optionally, change the display name on the properties window for the listener and click **OK**. 3. Set the **Path** field to `/sendSyncFlow`. 4. Click the plus sign (**+**) next to the **Connector configuration** field to configure a global element that can be used by all instances of the HTTP listener. 5. On the **General** tab, accept the defaults and click **OK**. ### Add the Send with Synchronous MDN Operation Follow these steps to add the **Send with Sync MDN** operation and configure it to send MDNs to the receiving endpoint of `partnera`: 1. Drag the **Send with Sync MDN** operation next to the listener component on the canvas. 2. Click the plus sign (**+**) next to the **Connector configuration** field to configure a global element for the **Send with Sync MDN** operation. 3. Configure the connection by setting the **Partner URL** field to `http://localhost:8081/as2-receive` on the **General** tab. 4. Specify the self and partner credentials. Configure these fields in the **Self Config** section:
FieldValue

AS2 Partner Name

partnerb

x509 Alias

partnerb

email

support@partnerb.com

Configure these fields in the **Partner Config** section:
FieldValue

AS2 Partner Name

partnera

x509 Alias

partnera

email

support@partnera.com

5. If you want to use algorithms, configure them in the **Requester Config** section. 6. In the **Keystore** section, apply these values to the keystore that contains the certificates and keys:
FieldValue

Keystore Password

test

Keystore Path

as2/partnerb.p12

Private Key Password

test

### Add the Logger Component Add the logger component and configure it to log a message when the app sends an AS2 message and receives a synchronous MDN. 1. From the Mule Palette, select **Core** and drag the logger component next to the **Send with Sync MDN** operation. 2. Set the message for the logger to `Message Sent and MDN Received!`. ### Save and Test the Mule App Follow these steps to deploy your application locally and verify that it correctly sends AS2 requests and receives synchronous MDNs. 1. Save the project. 2. Run the app by clicking the project name in **Package Explorer** and then clicking **Run** > **Run As** > **Mule Application**. If the application starts correctly, the console shows a success message. 3. Test the app by opening `http://localhost:8082/sendSyncFlow` from a browser or an app like Postman. You can now send AS2 requests to the endpoint configured in the [Receiving AS2 Messages and Sending Back MDNs](https://docs.mulesoft.com/as2-connector/latest/as2-connector-example-receive-send#receiving-messages-example) example. With the example running, you can observe the message sent by the **Send with Sync MDN** operation. ### XML for the Sending Synchronous AS2 MDNs Example Paste this code into your Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ## Send with Async MDN This example follows the same structure as the [Send with Sync MDN](#send-with-synchronous-mdn) example but incorporates these changes: - The **Send with Async MDN** operation is used instead of the **Send with Sync MDN** operation. - A value is specified for the **Receipt delivery url** field. The field can be configured in the global element for the **Send with Async MDN** operation or in the properties window. The image shows the Anypoint Studio flow for this example: ![Anypoint Studio flow for sending AS2 messages and receiving asynchronous MDNs](/mulesoft/current/en-us/as2-connector/latest/_images/as2-connector-example-async-flow.png) ### XML for the Sending AS2 Asynchronous MDNs Example Paste this code into your Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ### Save and Test the Mule App Follow these steps to deploy your application locally and verify that it correctly sends AS2 requests and receives asynchronous MDNs. 1. Save the project. 2. Run the app by clicking the project name in **Package Explorer** and then clicking **Run** > **Run As** > **Mule Application**. If the application starts correctly, the console shows a success message. 3. Test the app by opening `http://localhost:8082/sendAsyncFlow` from a browser or an app like Postman. You can now send AS2 requests to the endpoint configured in the [Receiving AS2 Messages and Sending Back MDNs](https://docs.mulesoft.com/as2-connector/latest/as2-connector-example-receive-send#receiving-messages-example) example. With the example running, you can observe the message sent by the **Send with Async MDN** operation. The MDN is omitted from the logs because it’s routed to the `receiptDeliveryUrl` shown in the [Receiving AS2 MDNs](https://docs.mulesoft.com/as2-connector/latest/as2-connector-example-receiving-mdn-messages) example. ## See Also - [AS2 Connector Examples](https://docs.mulesoft.com/as2-connector/latest/as2-connector-examples) - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 6.9 --- # Sending MDNs to Multiple Partners > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The following example shows how to send Message Disposition Notifications (MDNs) to multiple partners. This example contains two flows: - The first flow configures an AS2 listener endpoint to receive inbound AS2 messages. - The second flow receives message payloads and AS2 sender and receiver information via HTTP. It then uses the **Send with Sync MDN** operation to send outbound AS2 messages to a target AS2 endpoint. This example is similar to the [Receiving AS2 Messages and Sending Back MDNs](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-example-receive-send) example, except that for this example: - The partner information must already exist in the configured keystore. - You must configure the partner information as follows in the **Partners** tab of the global element: - Set the **Listener Mode** field to **Shared mode** and specify details for the additional partner. - Leave the **Partner config** section of this tab blank or the connector will returns errors. The following screenshot highlights this section. ![Do not configure fields in the highlighted section of the AS2 Connector Listener config screen](/mulesoft/current/en-us/as2-connector/6.9/_images/as2-connector-example-multi-caveat.png) ## Configuring an AS2 Listener Endpoint to Receive Inbound AS2 Messages This flow listens for inbound AS2 messages from AS2 Connector send operations and other sources, such as mendelson AS2 software and HTTP requests: ![Flow for exposing the AS2 listener endpoint](/mulesoft/current/en-us/as2-connector/6.9/_images/as2-connector-example-mdn1.png) You can specify partner information in **shared mode** either by entering it directly or by using an inline expression. Paste this code into your Studio XML editor to quickly load the flow for this example into your Mule app. In this XML code, the partner information is entered directly: ```xml ``` To specify partner information with an inline expression, use this XML code: ```xml ``` ## Sending Outbound AS2 Messages to the Configured AS2 Endpoint This flow listens for messages, logs a message and its payload, and then uses the **Send with Sync MDN** operation to forward the message to the exposed AS2 endpoint: ![Flow for forwarding AS2 messages to the exposed endpoint](/mulesoft/current/en-us/as2-connector/6.9/_images/as2-connector-mdn2-example.png) Paste this code into your Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ## See Also - [AS2 Connector Examples](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-examples) - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 7.0 is-latest-version: true --- # Sending MDNs to Multiple Partners > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The following example shows how to send Message Disposition Notifications (MDNs) to multiple partners. This example contains two flows: - The first flow configures an AS2 listener endpoint to receive inbound AS2 messages. - The second flow receives message payloads and AS2 sender and receiver information via HTTP. It then uses the **Send with Sync MDN** operation to send outbound AS2 messages to a target AS2 endpoint. This example is similar to the [Receiving AS2 Messages and Sending Back MDNs](https://docs.mulesoft.com/as2-connector/latest/as2-connector-example-receive-send) example, except that for this example: - The partner information must already exist in the configured keystore. - You must configure the partner information as follows in the **Partners** tab of the global element: - Set the **Listener Mode** field to **Shared mode** and specify details for the additional partner. - Leave the **Partner config** section of this tab blank or the connector will returns errors. The following screenshot highlights this section. ![Do not configure fields in the highlighted section of the AS2 Connector Listener config screen](/mulesoft/current/en-us/as2-connector/latest/_images/as2-connector-example-multi-caveat.png) ## Configuring an AS2 Listener Endpoint to Receive Inbound AS2 Messages This flow listens for inbound AS2 messages from AS2 Connector send operations and other sources, such as mendelson AS2 software and HTTP requests: ![Flow for exposing the AS2 listener endpoint](/mulesoft/current/en-us/as2-connector/latest/_images/as2-connector-example-mdn1.png) You can specify partner information in **shared mode** either by entering it directly or by using an inline expression. Paste this code into your Studio XML editor to quickly load the flow for this example into your Mule app. In this XML code, the partner information is entered directly: ```xml ``` To specify partner information with an inline expression, use this XML code: ```xml ``` ## Sending Outbound AS2 Messages to the Configured AS2 Endpoint This flow listens for messages, logs a message and its payload, and then uses the **Send with Sync MDN** operation to forward the message to the exposed AS2 endpoint: ![Flow for forwarding AS2 messages to the exposed endpoint](/mulesoft/current/en-us/as2-connector/latest/_images/as2-connector-mdn2-example.png) Paste this code into your Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ## See Also - [AS2 Connector Examples](https://docs.mulesoft.com/as2-connector/latest/as2-connector-examples) - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 6.9 --- # Upgrading and Migrating AS2 Connector to Version 6.x > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Upgrade Anypoint Connector for AS2 (AS2 Connector) from version 5.x to 6.x to take advantage of new features and functionality. ## Supported Upgrade Paths
From VersionTo Version

5.x

6.x

## Changes ### 6.9 The connector now supports MDN Signatures that are Base64-encoded and have lines that exceed 76 characters. ### 6.8 Additional validations are now performed on the keystore and algorithm usage to address reported security vulnerabilities. ### 6.7 When using the **AS2 Listener** source, you can now use a different alias to sign the MDN than the alias used for decryption. To support this functionality, the release contains two new fields: **Use different Alias for MDN Signature** and **Alias For MDN Signature**. For more information, see the [Listener Config section](https://docs.mulesoft.com/as2-connector/latest/as2-connector-reference#ListenerConfig) in the AS2 Connector Reference. ### 6.6 When using the **Send with Sync Mdn** operation, you can now use a different alias to validate the MDN signature than the alias used for encryption. To support this functionality, the release contains two new fields: **Use different Alias for MDN Signature Validation** and **x509 Alias For MDN Signature**. For more information, see the [Send Config section](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-reference#send-config) in the AS2 Connector Reference. ### 6.5 AS2 Connector 6.5 contains new functionality that enables you to check for duplicate incoming messages when using the **As 2 listener** source. This new functionality includes the use of a MuleSoft object store, which stores received messages. To support this new functionality, the release contains a new **Advanced** tab in the **As 2 listener** source global configuration. To see field descriptions for this tab, see the [Listener Config’s Advanced Parameters section](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-reference#listener-config-advanced) in the AS2 Connector Reference. ### 6.4 AS2 Connector 6.4 contains the following changes: - You can now configure the **As 2 listener** to send the MDN at the end of the flow by using the **Mdn mode** option `AUTO`. - You can now configure retries to ensure the delivery of the MDN by using the **Retry interval** and **Retry count** fields in the **Async MDN Connection Provider** global configuration. - A new field named **Validate certificate date** enables you to enable or disable the certificate date validation. - The connector logs a warning message in the console when a certificate is near its expiration date or if it is expired. You can use the new **Warning before (days)** field in the **Listener Config**, **MDN Listener Config**, and **KeyStore Config** **Send Config** configurations to configure when the warning message is logged. For more information, see the [AS2 Connector Reference](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-reference). ### 6.3 AS2 Connector 6.3 contains the following changes: - You can now configure a single AS2 listener endpoint to receive messages from multiple partners. To implement this feature, a new tab named **Partners** was added to the **As 2 listener** and **As 2 mdn listener** global elements. This tab contains fields that were moved from the **Partner Config** section of the **General** tab, as well as some new fields. The value of the **Listener Mode** field determines whether the listener can receive messages from one partner only (**Dedicated Mode**) or from multiple partners (**Shared mode**). - You can now pass custom headers on outbound AS2 messages by using the new **Custom headers** field when configuring the **Send with Sync MDN** and **Send with Async MDN** operations. For more information, see the [AS2 Connector Reference](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-reference) and [AS2 Connector Examples](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-examples) topics. ### 6.2 AS2 Connector 6.2 contains the following new fields: - The **Custom Message ID** field enables you to specify a custom message ID for AS2 **Send** operations. - The **Propagate Content Transfer Encoding** field enables you to define whether to propagate the content transfer encoding on the AS2 message sent to the partner. Both of these fields are on the **General** tab. ### 6.1 AS2 Connector 6.1 also contains the following changes: The **Transfer Mode Configuration** Field was added to the `Send Config` class so that you can enable and disable chunked transfer of data when using the **Send** operation. \* Digitally signed copies of outgoing and received messages and their corresponding receipts can be saved for non-repudiation purposes as long as they are configured and enabled on AS2 Connector operations and sources. \* The new Mule source `Non repudiation listener` must be user-configured to persist the non-repudiation information provided by any of the AS2 Connector operations and sources via a user-defined persistence strategy. \* Certain attribute object fields are renamed and deprecated fields are removed. These changes are outlined in [Upgrade Steps](#upgrade-steps). ## Requirements Ensure that you meet the following requirements before you migrate: - Mule 4.3.0 or later - Java 8 ## Upgrade Steps Follow these steps to perform the upgrade to AS2 version 6.x: 1. Download AS2 Connector 6.x.x from Exchange. 2. Place the appropriate source or operation in the Mule flow you are upgrading. ### Changes for AS2 Listener and AS2 MDN Listener There are no changes to the way AS2 Listener and AS2 MDN Listener are used or configured. ### Changes for Send with Sync MDN and Send with Async MDN operations The `Send with Sync MDN` and `Send with Async MDN` operations have the following changes: - An attribute object of type `com.mulesoft.connector.as2.api.AS2MdnAttributes` is changed in version 6.1.0: The field `com.mulesoft.connector.as2.api.AS2SendAttributes.as2MdnAttributes` is of type `com.mulesoft.connector.as2.api.AS2MdnAttributes`. - The MultiMap `dispositionContent` is converted into an object called `DispositionNotification` that splits the information of the disposition-notification part of the MDN into parameters. The `DispositionNotification` is in the `DispositionNotificationReport` object. Amend Mule flows that are using these attributes accordingly. ### Changes in AS2 MDN Attributes
5.x Field Name6.x Field Name5.x Type6.x Type

dispositionContent

dispositionContent

MultiMap<String, String>

DispositionNotificationReport

mdnMic

DispositionNotificationReport.DispositionNotification.receivedContentMic

String

String

mdnMicAlg

DispositionNotificationReport.DispositionNotification.receivedContentMicAlgorithm

HashAlgorithm

HashAlgorithm

mdnProcessed

DispositionNotificationReport.DispositionNotification.dispositionType

boolean

String

originalAS2MessageId

DispositionNotificationReport.DispositionNotification.originalMessageID

String

String

reportText

Field Removed

String

Field Removed

### Post Upgrade Steps After you perform the upgrade steps, follow these steps to complete the upgrade: 1. Verify that the connector is working by making sure there are no exceptions on startup and test it against your AS2 partner. 2. Notify your partners of any new URL (port) configurations that correspond to the HTTP Listener you are using. ## Troubleshooting If there are problems with caching the parameters and caching the metadata, try restarting Studio. ## Revert the Upgrade If it is necessary to revert to the previous version of as2MdnAttributes Connector, change the `as2-connector` dependency version in the project’s `pom.xml` file to the previous version. You must update the project’s `pom.xml` file in Anypoint Studio. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 7.0 is-latest-version: true --- # Upgrading and Migrating AS2 Connector to Version 7.x > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Upgrade Anypoint Connector for AS2 (AS2 Connector) from version 6.x to 7.x to take advantage of FIPS-compliant cryptographic support and other improvements. ## Supported Upgrade Paths
From VersionTo Version

6.x

7.x

## Before You Begin Before you upgrade to AS2 Connector 7.x, make sure you have: - Mule runtime 4.4.0 or later. See the Mule runtime release notes for FIPS support by version. - AS2 Connector version 7.0.0 or later. - AS2 Support Libraries version 3.0.0 or later. - For non-FIPS mode, Bouncy Castle Java Cryptography Extension (JCE) provider designed for JDK 1.8 or higher. This configuration requires the `bcprov-jdk18on` and `bcpkix-jdk18on` libraries. Version 1.82 is recommended. - For FIPS modes, Bouncy Castle FIPS (BCFIPS) libraries as required by your Mule runtime and security model. - For FIPS 140-3, Java 17 or later with FIPS-capable JVM if required by your deployment. ## Supported Security Modes AS2 Connector 7.x supports these security modes, which are controlled by the `mule.security.model` system property: - **non-FIPS (default)** This is the default security mode for Mule applications that don’t require FIPS compliance. AS2 Connector uses the standard cryptographic libraries `bcprov-jdk18on` and `bcpkix-jdk18on`, which aren’t FIPS compliant. Don’t set the system property as the default mode. - **FIPS 140-2 Compliant Mode** Enable this security mode to configure AS2 Connector to use FIPS 140-2 approved cryptographic providers. - **FIPS 140-3 Compliant Mode** Enable this security mode to configure AS2 Connector to use FIPS 140-3 approved cryptographic providers. If the `mule.security.model` property begins with `fips140-`, then AS2 Connector activates FIPS mode and applies the corresponding security controls, as shown in the example. ```bash -Dmule.security.model=fips140-3 ``` ## Configure External Libraries Mule applications using AS2 Connector require a Global Element configuration that includes the necessary AS2 support and cryptographic libraries for each security mode. The table shows the global configuration and required libraries for each security mode. Use only one security mode per application. For FIPS modes, the Mule runtime and BCFIPS requirements apply.
Security ModeGlobal ConfigurationDefault NameRequired Library Maven Coordinates

non-FIPS

AS2 Connector External Libs - Non FIPS

AS2_Connector_External_Libs___Non_FIPS

com.mulesoft.connectors:as2-bc-non-fips-impl:3.0.0, org.bouncycastle:bcpkix-jdk18on:1.82, org.bouncycastle:bcprov-jdk18on:1.82

FIPS 140-2

AS2 Connector External Libs - FIPS 140-2

AS2_Connector_External_Libs___FIPS_140_2

com.mulesoft.connectors:as2-bc1-fips-impl:3.0.0

FIPS 140-3

AS2 Connector External Libs - FIPS 140-3

AS2_Connector_External_Libs___FIPS_140_3

com.mulesoft.connectors:as2-bc2-fips-impl:3.0.0

![Connector configurations that are used for creating Global Elements](/mulesoft/current/en-us/as2-connector/latest/_images/as2-connector-upgrade-global-element-config.png) ## Upgrade Steps Follow these steps to upgrade from AS2 Connector 6.x to 7.x. Use the configuration that applies to your selected security mode. ### Step 1: Update the Connector Dependency 1. Update your project’s `pom.xml` file to use AS2 Connector 7.x: ```xml com.mulesoft.connectors mule-as2-connector 7.0.0 mule-plugin ``` 2. Rebuild the project and resolve API or configuration changes reported by the build. ### Step 2: Add a Connector Configuration Global Element Include only one external library global configuration. Follow the global element configuration steps for your selected security mode. #### Configure a Global Element for the non-FIPS Security Mode 1. Add the external library global configuration and don’t set the runtime property. Also, make sure the BouncyCastle jdk18on library version 1.82 is available to add as an external library. 2. Configure the global element as a Mule app in Anypoint Studio: 1. In the **Package Explorer** or Anypoint Studio canvas, open your Mule flow or configuration. 2. Click **Global Elements**. Or click **Create global element**, and then click the plus icon next to Global Elements. 3. Click **Create**, and then search for the `AS2` or `External Libs` option and select **AS2 Connector External Libs - Non FIPS**. 1. Name the configuration. 2. Click **Configure** > **Add recommended libraries**. 3. Click **OK** to include the libraries as dependencies and shared libraries in the Mule application `pom.xml` file. 4. Verify that your project has the required dependencies for your selected security mode. Add the dependencies via Maven if they aren’t added automatically. ![The Connector Configuration Global Element and the configurations for non-FIPS security mode](/mulesoft/current/en-us/as2-connector/latest/_images/as2-connector-upgrade-non-fips-config.png) To configure the global element manually in XML (Maven or standalone): 1. Open your main Mule configuration file, such as `src/main/mule/` or `src/main/resources/`. 2. Add the `as2-mule4:external-libs-non-fips-config` global element to the Mule configuration file. 3. Add the `AS2 Connector External Libs - Non FIPS` global configuration to your Mule configuration file, as shown in the example: ```xml ``` 4. Add the required Maven dependencies to the `pom.xml` file. Refer to the [AS2 Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/as2-connector-release-notes-mule-4) for the compatible versions of the dependencies. ```xml org.bouncycastle bcpkix-jdk18on ${bouncy.castle.jdk18on.version} org.bouncycastle bcprov-jdk18on ${bouncy.castle.jdk18on.version} com.mulesoft.connectors as2-bc-non-fips-impl ${as2.support.library.version} ``` 5. Update the `mule-maven-plugin` by including the shared libraries in the **build** > **plugins** > **plugin** section of the `pom.xml` file. ```xml com.mulesoft.connectors as2-bc-non-fips-impl org.bouncycastle bcpkix-jdk18on org.bouncycastle bcprov-jdk18on ``` #### Configure a Global Element for the FIPS 140-2 Security Mode 1. Add the external library global configuration and set the runtime property. Also, make sure BouncyCastle FIPS (BCFIPS) is available as required by your Mule runtime. Configure BCFIPS in Java Security. For FIPS 140-2, follow the [FIPS 140-2 Compliance Support](https://docs.mulesoft.com/mule-runtime/latest/fips-140-2-compliance-support) documentation. 2. Configure the global element as a Mule app in Anypoint Studio: 1. In the **Package Explorer** or Anypoint Studio canvas, open your Mule flow or configuration. 2. Click **Global Elements**. Or click **Create global element**, and then click the plus icon next to Global Elements. 3. Click **Create**, and then search for the `AS2` or `External Libs` option and select **AS2 Connector External Libs - FIPS 140-2**. 1. Name the configuration. 2. Click **Configure** > **Add recommended libraries**. 3. Click **OK** to include the libraries as dependencies and shared libraries in the Mule application `pom.xml` file. 4. Verify that your project has the required dependencies for your selected security mode. Add the dependencies via Maven if they aren’t added automatically. ![The Connector Configuration Global Element and the configurations for FIPS 140-2 security mode](/mulesoft/current/en-us/as2-connector/latest/_images/as2-connector-upgrade-fips140-2-config.png) To configure the global element manually in XML (Maven or standalone): 1. Open your main Mule configuration file, such as `src/main/mule/` or `src/main/resources/`. 2. Add the `as2-mule4:external-libs-fips140-2-config` global element to the Mule configuration file. 3. Add the `AS2 Connector External Libs - FIPS 140-2` global configuration to your Mule configuration file, as shown in the example. ```xml ``` 4. Add the required Maven dependencies to the `pom.xml` file. Refer to the [AS2 Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/as2-connector-release-notes-mule-4) for the compatible versions of the dependencies. ```xml com.mulesoft.connectors as2-bc1-fips-impl ${as2.support.library.version} ``` 5. Update the `mule-maven-plugin` by including the shared libraries in the **build** > **plugins** > **plugin** section of the `pom.xml` file. ```xml com.mulesoft.connectors as2-bc1-fips-impl ``` 6. In JVM or Mule runtime, set the security model to FIPS 140-2. ```bash -Dmule.security.model=fips140-2 ``` 7. Restrict BCFIPS to use only FIPS-approved algorithms. ```bash -Dorg.bouncycastle.fips.approved_only=true ``` This example shows the Mule runtime startup configuration for FIPS 140-2: ```bash java -Dmule.security.model=fips140-2 \ -Dorg.bouncycastle.fips.approved_only=true \ -jar mule-standalone.jar ``` #### Configure a Global Element for the FIPS 140-3 Security Mode 1. Add the external library global configuration and set the runtime property. Also: - Make sure BouncyCastle FIPS (BCFIPS) is available as required by your Mule runtime. - Configure BCFIPS in Java Security or by following the Mule runtime FIPS documentation for your version. - Make sure you have Java 17 or later as required for FIPS 140-3 support in your deployment. 2. Configure the global element as a Mule app in Anypoint Studio: 1. In the **Package Explorer** or Anypoint Studio canvas, open your Mule flow or configuration. 2. Click **Global Elements**. Or click **Create global element**, and then click the plus icon next to Global Elements. 3. Click **Create**, and then search for the `AS2` or `External Libs` option and select **AS2 Connector External Libs - FIPS 140-3**. 1. Name the configuration. 2. Click **Configure** > **Add recommended libraries**. 3. Click **OK** to include the libraries as dependencies and shared libraries in the Mule application `pom.xml` file. 4. Verify that your project has the required dependencies for your selected security mode. Add the dependencies via Maven if they aren’t added automatically. ![The Connector Configuration Global Element and the configurations for FIPS 140-3 security mode](/mulesoft/current/en-us/as2-connector/latest/_images/as2-connector-upgrade-fips140-3-config.png) To configure the global element manually in XML (Maven or standalone): 1. Open your main Mule configuration file, such as `src/main/mule/` or `src/main/resources/`. 2. Add the `as2-mule4:external-libs-fips140-3-config` global element to the Mule configuration file. 3. Add the `AS2 Connector External Libs - FIPS 140-3` global configuration to your Mule configuration file, as shown in the example: ```xml ``` 4. Add the required Maven dependencies to the `pom.xml` file. Refer to the [AS2 Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/as2-connector-release-notes-mule-4) for the compatible versions of the dependencies. ```xml com.mulesoft.connectors as2-bc2-fips-impl ${as2.support.library.version} ``` 5. Update the `mule-maven-plugin` by including the shared libraries in the **build** > **plugins** > **plugin** section of the `pom.xml` file. ```xml com.mulesoft.connectors as2-bc2-fips-impl ``` 6. In JVM or Mule runtime, set the security model to FIPS 140-3. ```bash -Dmule.security.model=fips140-3 ``` 7. Restrict BCFIPS to use only FIPS-approved algorithms. ```bash -Dorg.bouncycastle.fips.approved_only=true ``` This example shows the Mule runtime startup configuration for FIPS 140-3: ```bash java -Dmule.security.model=fips140-3 \ -Dorg.bouncycastle.fips.approved_only=true \ -jar mule-standalone.jar ``` > [!NOTE] The `org.bouncycastle.fips.approved_only` property is JVM-wide and must be set in your > system or runtime configuration when running in FIPS mode. > > If you use BCFIPS in FIPS mode, key and algorithm restrictions apply. Only approved algorithms > supported by the BCFIPS provider are allowed. ### Step 3: Verify Keystore and Algorithm Compatibility 1. Verify that keystores and certificates are compatible with your selected security mode. Some FIPS modes require FIPS-approved algorithms. 2. Review the Mule and BCFIPS documentation for approved algorithms if you use BCFIPS in FIPS mode, since key and algorithm restrictions apply. ### Step 4: Verify Connector Usage in Flows 1. Verify that partner certificates and algorithms are compatible with your selected security mode. 2. If you use AS2 Connector operations in your flows, verify that the connector configuration also exists in your Mule app. ## AS2 Connector Startup Validation When an AS2 listener, AS2 MDN listener, or Send operation starts, AS2 Connector validates that the external library configuration and runtime settings are correct. Validation fails if the Mule application includes listener, MDN listener, or Send operations that don’t meet these requirements: - The application must include one external library. An error occurs if more than one external library is included or if none are included. - The `mule.security.model` system property must match the selected external library configuration: - For non-FIPS, `mule.security.model` must be disabled. If it’s enabled, remove the property. - For FIPS 140-2, `mule.security.model` must be set to `fips140-2`. If the property is configured incorrectly, a message is logged to correct the setting to `-Dmule.security.model=fips140-2`. - For FIPS 140-3, `mule.security.model` must be set to `fips140-3`. If the property is configured incorrectly, a message is logged to correct the setting to `-Dmule.security.model=fips140-3`. - The implementation library for the selected security mode must be on the same `classpath`. If the library is missing, startup fails. To resolve the issue, review the error log to find the conflicting library and remove it from the `classpath`. Use the implementation library that applies to your security mode: - non-FIPS: `as2-bc-non-fips-impl` - FIPS 140-2: `as2-bc1-fips-impl` - FIPS 140-3: `as2-bc2-fips-impl` - AS2 Connector instantiates the cryptographic implementation for the selected security mode at startup. If this fails, for example due to missing or incompatible libraries, an error is logged that includes the security profile and the cause. ## Post-Upgrade Steps 1. Verify that the application starts without errors and that AS2 Connector initializes correctly for your selected security mode. 2. Test the AS2 listener, MDN listener, and Send operations against your AS2 partners. 3. Confirm that certificates and algorithms are accepted in FIPS mode if applicable. 4. Notify partners of URL or port changes if you modified the HTTP Listener configuration. ## System Properties Reference The table details the system-level properties that are required to configure AS2 Connector’s security modes and BCFIPS compliance within the Mule runtime or JVM.
PropertyDescriptionValuesDefaultScope

mule.security.model

Security mode used by the connector

fips140-2 or fips140-3

non-FIPS (when not set)

Mule runtime or JVM

org.bouncycastle.fips.approved_only

Restricts BCFIPS to FIPS-approved algorithms only. Required for FIPS compliance when using BCFIPS.

true, false

false

JVM-wide

The `org.bouncycastle.fips.approved_only` property affects the entire JVM. When the application runs in FIPS mode, the system administrator must configure the property. For more information, see the **FIPS 140-2 Compliance Support** section on the [Security](https://docs.mulesoft.com/mule-runtime/latest/securing) page in the Mule runtime documentation. ## Migrate Existing Deployments AS2 Connector 7.x introduces a Global Connector Configuration and supports configurable security modes including non-FIPS, FIPS 140-2, and FIPS 140-3 via the `mule.security.model` system property. Follow the [Upgrade Steps](#upgrade-steps) to make the necessary changes to your Mule app. AS2 Connector’s cryptographic behavior is determined by the global configuration, which provides the required libraries and defines the runtime security model. Existing 6.x flows remain functional without requiring code changes. ### Migrate Deployments from FIPS 140-2 or 140-3 Environments 1. Verify that BCFIPS and FIPS-related settings are configured correctly for your Mule runtime version. For more information, see the **FIPS 140-2 Compliance Support** section on the [Security](https://docs.mulesoft.com/mule-runtime/latest/securing) page in the Mule runtime documentation. 2. Set `mule.security.model` to `fips140-2` or `fips140-3` as appropriate for your compliance requirements. 3. Set `org.bouncycastle.fips.approved_only` to `true` if required by your runtime for compliance. 4. Test your configuration in a non-production environment by running your flows with the AS2 listener, MDN listener, and Send operations. 5. Deploy the application to production and monitor the error log to verify a successful startup and AS2 message exchange. ## Troubleshooting These common error messages and issues indicate configuration or `classpath` problems that prevent AS2 Connector from operating in the selected security mode. Follow the recommendations to resolve the issues. - **AS2 Connector requires at least one External Libs configuration** Add `AS2 Connector External Libs - Non FIPS`, `AS2 Connector External Libs - FIPS 140-2`, or `AS2 Connector External Libs - FIPS 140-3` to your application. See [AS2 Connector Startup Validation](#startup-validation). - **Only one External Libs configuration is allowed per application** Remove the additional external library configurations so that you only have one. - **Detected 'as2-bc-non-fips-impl' but system property 'mule.security.model' is …​** For non-FIPS mode, disable `mule.security.model` or remove it from the JVM arguments or runtime configuration. - **Detected 'as2-bc1-fips-impl' but system property …​ Set -Dmule.security.model=fips140-2** Add `-Dmule.security.model=fips140-2` if you’re using `AS2 Connector External Libs - FIPS 140-2`. - **Detected 'as2-bc2-fips-impl' but system property …​ Set -Dmule.security.model=fips140-3** Add `-Dmule.security.model=fips140-3` if you’re using `AS2 Connector External Libs - FIPS 140-3`. - **External Libs - …​ configuration selected, but '…​' is not on the classpath** Add the correct implementation dependency for your selected security mode or make sure the external library configuration imports the dependency. If you receive a warning, make sure only the library for your active security mode remains on the `classpath` by removing any additional AS2 cryptographic implementations. - **Startup or Crypto Errors in FIPS Mode** Make sure `mule.security.model` matches your runtime FIPS setup and that BCFIPS is installed and registered. Set `org.bouncycastle.fips.approved_only` to `true` if required. - **Tests or Flows that Relied on non-FIPS Behavior** If your application is running with `mule.security.model=fips140-2` or `fips140-3`, some algorithms or key usages are restricted. Align keystores and partner expectations with FIPS-approved algorithms. - **Caching or Metadata Issues** If Anypoint Studio or Anypoint Design Center shows a stale configuration, try restarting the IDE or clearing your cache. ## Revert the Upgrade To revert to AS2 Connector 6.x: 1. Change the `mule-as2-connector` dependency in your project’s `pom.xml` file to the desired 6.x version. 2. Remove the external library global configuration. 3. Remove the libraries that were added as dependencies and shared libraries from the `pom.xml` file. 4. Remove or adjust 7.x system properties, such as `mule.security.model`, if they aren’t being used by other components. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [AS2 Connector Reference](https://docs.mulesoft.com/as2-connector/latest/as2-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 6.9 --- # Using Anypoint Studio to Configure AS2 Connector 6.9 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure an input source for the connector’s flow](#configure-input-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). When you run the connector, you can view the app log to check for problems, as described in [View the App Log](#view-app-log). If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [AS2 Connector Reference](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add AS2 Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In **Add Modules to Project**, type `as2` in the search field. 3. Click **AS2** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure a Source A source initiates a flow when a specified condition is met. You can configure one of these input sources to use with AS2 Connector: - **As 2 listener** Listens for AS2 `send` requests - **As 2 mdn listener** MDN listener that listens for AS2 listener requests - **Non repudiation listener** Listens for signed messages and MDNs that are configured for non-repudiation storage - **HTTP Listener** Initiates a flow each time it receives a request on the configured host and port - **Scheduler** Initiates a flow when a time-based condition is met For example, to configure an **HTTP Listener**, follow these steps: 1. In the **Mule Palette** view, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. On the **Listener** configuration screen, optionally change the value of the **Display Name** field. 4. Specify a value for the **Path** field. 5. Click the plus sign (+) next to the **Connector configuration** field to configure a global element that can be used by all instances of the HTTP listener in the app. 6. On the **General** tab, specify the connection information for the connector. 7. On the **TLS** tab, optionally specify the TLS information for the connector. 8. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 9. Click **Test Connection** to confirm that Mule can connect with the specified server. 10. Click **OK**. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you immediately define a specific operation for that connector to perform. To add an operation for AS2 Connector, follow these steps: 1. In the **Mule Palette** view, select **AS2 Connector** and then select the desired operation. 2. Drag the operation onto the Studio canvas to the right of the input source. ## Configure a Global Element for the Connector When you configure a connector, it’s best to configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials the connector uses to access the target AS2 system. To configure the global element for AS2 Connector, follow these steps: 1. Select the name of the connector in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **Authentication** tab, configure the authentication method for the outbound request. You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. ## View the App Log To check for problems, you can view the app log as follows: - If you’re running the app from Anypoint Platform, the output is visible in the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log is visible in your OS console. Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the app log in the default location `MULE_HOME/logs/.log`. ## Next Step After you configure a global element and connection information, configure the other fields for the connector. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [AS2 Reference](https://docs.mulesoft.com/as2-connector/6.9/as2-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: AS2 Connector version: 7.0 is-latest-version: true --- # Using Anypoint Studio to Configure AS2 Connector 7.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure an input source for the connector’s flow](#configure-input-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). 6. [Configure a Global Element for External Libraries](#configure-external-libraries). When you run the connector, you can view the app log to check for problems, as described in [View the App Log](#view-app-log). If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [AS2 Connector Reference](https://docs.mulesoft.com/as2-connector/latest/as2-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add AS2 Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In **Add Modules to Project**, type `as2` in the search field. 3. Click **AS2** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure a Source A source initiates a flow when a specified condition is met. You can configure one of these input sources to use with AS2 Connector: - **As 2 listener** Listens for AS2 `send` requests - **As 2 mdn listener** MDN listener that listens for AS2 listener requests - **Non repudiation listener** Listens for signed messages and MDNs that are configured for non-repudiation storage - **HTTP Listener** Initiates a flow each time it receives a request on the configured host and port - **Scheduler** Initiates a flow when a time-based condition is met For example, to configure an **HTTP Listener**, follow these steps: 1. In the **Mule Palette** view, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. On the **Listener** configuration screen, optionally change the value of the **Display Name** field. 4. Specify a value for the **Path** field. 5. Click the plus sign (+) next to the **Connector configuration** field to configure a global element that can be used by all instances of the HTTP listener in the app. 6. On the **General** tab, specify the connection information for the connector. 7. On the **TLS** tab, optionally specify the TLS information for the connector. 8. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 9. Click **Test Connection** to confirm that Mule can connect with the specified server. 10. Click **OK**. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you immediately define a specific operation for that connector to perform. To add an operation for AS2 Connector, follow these steps: 1. In the **Mule Palette** view, select **AS2 Connector** and then select the desired operation. 2. Drag the operation onto the Studio canvas to the right of the input source. ## Configure a Global Element for the Connector When you configure a connector, it’s best to configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials the connector uses to access the target AS2 system. To configure the global element for AS2 Connector, follow these steps: 1. Select the name of the connector in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **Authentication** tab, configure the authentication method for the outbound request. You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. ## Configure a Global Element for External Libraries Mule applications using AS2 Connector must contain only one global element configuration to provide the external libraries required for the selected security mode. To configure the global element for AS2 Connector and add external libraries, follow these steps: 1. In **Package Explorer** or Anypoint Studio canvas, open your Mule flow or configuration. 2. Click **Global Elements**. Or click **Create global element**, and then click the plus icon next to Global Elements. 3. Click **Create**, and then search for the `AS2` or `External Libs` option and select **AS2 Connector External Libs - Non FIPS 140-3**. 4. Name the configuration. 5. Click **Configure** > **Add recommended libraries**. 6. Click **OK** to include the libraries as dependencies and shared libraries in the Mule application `pom.xml` file. 7. Verify that your project has the required dependencies for your security mode. Add the dependencies via Maven if they aren’t added automatically. For configuration instructions for other security modes, see [Configure External Libraries](https://docs.mulesoft.com/as2-connector/latest/as2-connector-upgrade-migrate#configure-external-libraries). ## View the App Log To check for problems, you can view the app log as follows: - If you’re running the app from Anypoint Platform, the output is visible in the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log is visible in your OS console. Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the app log in the default location `MULE_HOME/logs/.log`. ## Next Step After you configure a global element and connection information, configure the other fields for the connector. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [AS2 Reference](https://docs.mulesoft.com/as2-connector/latest/as2-connector-reference) - [Salesforce Help](https://help.salesforce.com)