AS2 Listener to receive B2B transactions from trading partners

(2 reviews)
AS2 Listener to receive B2B transactions from trading partners



This example illustrates how to implement a secured AS2 listener to receive real-time B2B transactions from external trading partners such as customers, suppliers, and 3rd party logistics providers.

This example uses the AS2 Listener operation of the Drummond Group certified Anypoint AS2 connector to receive business-to-business transactions via a secured AS2 transport protocol & publishes the received AS2 message into an Anypoint MQ queue.

Setup the Example

  • Open the Example project in Anypoint Studio from Anypoint Exchange.
  • Install the latest version of Anypoint AS2 connector
  • The example project includes the required certificate / key pairs for the AS2 listener.
  • Update the configuration property file located in src/main/resources/ with the below values.
    • as2-keystore.password=test
    • tls-truststore.password=test
    • tls-keystore.password=muletest
  • Anypoint MQ configurations
    • Create a new Anypoint MQ queue as2-inbound-edi.q from Anypoint MQ console
    • Create a new client app in Anypoint MQ console
    • Update the below properties in file with the API URL, Client Id and Client Secret for the Anypoint MQ connection.
      • anypoint-mq.url
      • anypoint-mq.clientid
      • anypoint-mq.clientsecret
  • Update the below properties in file with the desired basic authentication credentials for the AS2 listener.
    • as2-basicauth.user
    • as2-basicauth.password
  • Deploy the project to CloudHub.

Run the Example

  • Leverage the example AS2 client application to send AS2 messages to the deployed AS2 listener.
  • Alternatively, you can also test the application by sending AS2 messages to the deployed URL from any AS2 client. Certificates/keys are included in the example project.
    • Receiver
      • AS2 certificate - mythical.cer
      • Private key - mythical.key (Passphrase: test)
      • AS2 identifier - mythical
    • Sender
      • AS2 certificate - nto.cer
      • Private key - nto.key (Passphrase: test)
      • AS2 identifier - nto
  • Received AS2 message is published to the Anypoint MQ as2-inbound-edi.q


Published by
MuleSoft Organization
Published onNov 2, 2020
Asset overview

Asset versions for 1.0.x

Asset versions


B2BEnterprise ITMessagingNo values left to add
Industry Vertical