You can use EDI studio to send EDI messages using the AS2 web app. To be able to do so, some specific setup is required.


Administrator Administrator Start Start Set up project web service application for AS2 Set up project web service application for AS2 Set up a web service application for the project that connects to the AS2 web app. For more information refer to: Set up web service application for project. For the web service application, use these settings: Field Setting Base URL The base URL of your AS2 web app. Usually, this URL looks like: https://[AS2 web app name].azurewebsites.net/ Authentication OAuth2 Enable AS2 Make sure this check box is cleared. Grant type Client credentials Skip resource Yes Scope Enter the Application ID URI of the registered app. This looks like: api://[Application (client) ID]/.default Set up web service action for AS2 Set up web service action for AS2 Set up the outbound web service actions to export data to the AS2 web app. With the mentioned settings, the web service action calls the send method of the AS2 web app to send the data to the EDI partner. For more information, refer to Set up web service action - Outbound. For the outbound web service actions for AS2, use these settings: Field Setting Acts as Outbound Request message Enter the desired EDI export message. For example, use one of the EDI tutorial export messages. Resource api/as2/senddata Client HTP class BisWsAs2ClientHttpRequest   For the outbound web service actions for AS2, set these attributes: Name Type Value or Custom Style Description AS2-Message-Id Custom BisTools::getGuid() Header Gets the unique message ID to be used in the message and file name. AS2-Subject Value For example: Invoice or Order. Header You can define a subject that is used in the file name. Define the subject based on the request message that is linked to web service action. AS2-Encoding Value Binary Header You can send the file content as binary to the AS2 web app. AS2-documentContentFormat Value PlainText or Base64String Header You can, optionally, send the document content format to the AS2web app. If no value is set, the default value PlainText is applied. If the attribute value is set to Base64String, the content is first decoded, and then processed. Set up document flows for AS2 Set up document flows for AS2 If you set up EDI to export data to the AS2 web app, for the outbound document flows, define a web service action instead of a message. Make sure the desired export message is defined for the web service action that you use in an outbound document flow. You can link, for example, the EDI tutorial export messages to a web service action that you define for an outbound document flow. End End

Activities

Name Responsible Description

Set up project web service application for AS2

Administrator

Set up a web service application for the project that connects to the AS2 web app.

For more information refer to: Set up web service application for project.

For the web service application, use these settings:

Field Setting
Base URL

The base URL of your AS2 web app. Usually, this URL looks like:

https://[AS2 web app name].azurewebsites.net/

Authentication OAuth2
Enable AS2 Make sure this check box is cleared.
Grant type Client credentials
Skip resource Yes
Scope

Enter the Application ID URI of the registered app. This looks like:

api://[Application (client) ID]/.default

Set up web service action for AS2

Administrator

Set up the outbound web service actions to export data to the AS2 web app. With the mentioned settings, the web service action calls the send method of the AS2 web app to send the data to the EDI partner.

For more information, refer to Set up web service action - Outbound.

For the outbound web service actions for AS2, use these settings:

Field Setting
Acts as Outbound
Request message Enter the desired EDI export message. For example, use one of the EDI tutorial export messages.
Resource api/as2/senddata
Client HTP class BisWsAs2ClientHttpRequest

 

For the outbound web service actions for AS2, set these attributes:

Name Type Value or Custom Style Description
AS2-Message-Id Custom BisTools::getGuid() Header Gets the unique message ID to be used in the message and file name.
AS2-Subject Value For example: Invoice or Order. Header You can define a subject that is used in the file name. Define the subject based on the request message that is linked to web service action.
AS2-Encoding Value Binary Header You can send the file content as binary to the AS2 web app.
AS2-documentContentFormat Value PlainText or Base64String Header You can, optionally, send the document content format to the AS2web app. If no value is set, the default value PlainText is applied. If the attribute value is set to Base64String, the content is first decoded, and then processed.

Set up document flows for AS2

Administrator

If you set up EDI to export data to the AS2 web app, for the outbound document flows, define a web service action instead of a message.

Make sure the desired export message is defined for the web service action that you use in an outbound document flow. You can link, for example, the EDI tutorial export messages to a web service action that you define for an outbound document flow.

See also

Provide feedback