Contact Free trial Login

AS2 - Studio Configuration - Mule 4

To configure a connector in Anypoint Studio:

  1. Install the connector.

  2. Configure the connector.

  3. Configure an input source for the connector.

Add the Connector to a Studio Project

Anypoint Studio provides two ways to add the connector to your Studio project: from the Exchange button in the Studio taskbar or from the Mule Palette view.

Add the Connector Using Exchange

  1. In Studio, create a Mule project.

  2. Click the Exchange icon (X) in the upper-left of the Studio task bar.

  3. In Exchange, click Login and supply your Anypoint Platform username and password.

  4. In Exchange, search for "as2".

  5. Select the connector and click Add to project.

  6. Follow the prompts to install the connector.

Add the Connector in Studio

  1. In Studio, create a Mule project.

  2. In the Mule Palette view, click (X) Search in Exchange.

  3. In Add Modules to Project, type "as2" in the search field.

  4. Click this connector’s name in Available modules.

  5. Click Add.

  6. Click Finish.

Configure an Input Source

Configure an input source for the connector such as an operation for the AS2 connector, HTTP Listener, or Scheduler. You can put the following operations for the connector in the Source area of the Studio canvas.

Configure the Connector

The AS2 Connector reads data using repeatable streams. Data is read into memory until a configurable threshold is reached, at which point the data is written to disk. The default threshold for writing to disk is 64 KB. You can change this by using the system property com.mulesoft.connectors.as2.CachedOutputStream.Threshold. This property requires an integer value:

  • A positive value defines the maximum amount of data to read into memory in KB.

  • A zero value means that all data is written directly to disk.

  • A value of -1 means that the data is never written to disk, and is stored into memory.

By default, the data is written to temporary files in the directory set by java.io.tmpdir. To change the directory, set the System property com.mulesoft.connectors.as2.CachedOutputStream.OutputDirectory.