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/app.properties with the below values.
- 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 app.properties file with the API URL, Client Id and Client Secret for the Anypoint MQ connection.
- Update the below properties in app.properties file with the desired basic authentication credentials for the AS2 listener.
- 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.
- AS2 certificate - mythical.cer
- Private key - mythical.key (Passphrase: test)
- AS2 identifier - mythical
- 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