Upgrading and Migrating AS2 Connector to Version 6.x | MuleSoft Documentation
# Upgrading and Migrating AS2 Connector to Version 6.x
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 Version | To Version  
---|---  
## Changes
The connector now supports MDN Signatures that are Base64-encoded and have lines that exceed 76 characters.
Additional validations are now performed on the keystore and algorithm usage to address reported security vulnerabilities.
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 in the AS2 Connector Reference.
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 in the AS2 Connector Reference.
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 in the AS2 Connector Reference.
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.
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 and AS2 Connector Examples topics.
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.
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.
## 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 Name | 6.x Field Name | 5.x Type | 6.x Type  
---|---|---|---  
dispositionContent | dispositionContent | MultiMap<String, String> | DispositionNotificationReport  
DispositionNotificationReport.DispositionNotification.receivedContentMic  
mdnMicAlg | DispositionNotificationReport.DispositionNotification.receivedContentMicAlgorithm | HashAlgorithm | HashAlgorithm  
mdnProcessed | DispositionNotificationReport.DispositionNotification.dispositionType  
originalAS2MessageId | DispositionNotificationReport.DispositionNotification.originalMessageID  
reportText | Field Removed | 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
  * MuleSoft Help Center