Partilhar via


Create an AS2 bridge using BizTalk Services Portal

 

Important

Microsoft Azure BizTalk Services (MABS) is being retired, and replaced with Azure Logic Apps. If you currently use MABS, then Move from BizTalk Services to Logic Appsprovides some guidance on moving your integration solutions to Logic Apps.

If you're brand new to Logic Apps, then we suggest getting started here:

This topic shows how to create an AS2 bridge in Azure BizTalk Services. AS2 bridges are used to transfer messages over an AS2 protocol.

You can create bridges to process AS2 messages directly from the BizTalk Services Portal. Bridge configuration includes information such as which messaging transport to use, transforms (if required), and where the messages must be routed to. bridges are associated with the AS2 agreements at runtime and use the AS2 protocol-related settings that are defined as part of the agreement. See How do bridges resolve agreements at runtime?.

In this topic:

Create an AS2 bridge

Configure the AS2 Receive bridge settings

Configure the AS2 Send bridge settings

Create an AS2 bridge

  1. In the BizTalk Services Portal, click the Bridges tab, and then click Add.

  2. In the General Settings tab for Protocol, select AS2.

  3. Under Tracking, enter how you want to track the messages:

    Track Send side message properties

    Check this to store the message properties when the AS2 message is sent to the partner. Once stored, you can query this data by clicking Tracking on the BizTalk Services Portal home page.

    When enabled, you can also store the message body by checking Track Send side message body.

    Archive Send side encoded message

    When Track Send side message properties is enabled, stores encoded AS2 messages sent to a partner.

    For example, when an AS2 message is encrypted, decoding the message decrypts the message. The decrypted output is stored.

    For example, when an AS2 message is not encrypted, encoding the message encrypts the message. The encrypted message body is stored.

    Note

    Applies to Developer and Premium Editions only.

    Archive Send side decoded message

    When Track Send side message properties is enabled, stores decoded AS2 messages sent to a partner.

    For example, when an AS2 message is encrypted, decoding the message decrypts the message. The decrypted message body is stored.

    > [!NOTE]
    > <P>Applies to Developer and Premium Editions only.</P>
    

    Track Receive side message properties

    Check this to store the message properties when the AS2 message is received from a partner. Once stored, you can query this data by clicking Tracking on the BizTalk Services Portal home page.

    When enabled, you can also store the message body by checking Track Receive side message body.

    Archive Receive side encoded message

    When Track Recive side message properties is enabled, stores encoded AS2 messages received from a partner.

    For example, when an AS2 message is not encrypted, encoding the message encrypts the message. The encrypted message body is stored.

    > [!NOTE]
    > <P>Applies to Developer and Premium Editions only.</P>
    

    Archive Receive side decoded message

    When Track Recive side message properties is enabled, stores decoded AS2 messages received from a partner.

    For example, when an AS2 message is encrypted, decoding the message decrypts the message. The decrypted message body is stored.

    > [!NOTE]
    > <P>Applies to Developer and Premium Editions only.</P>
    
    1. Expand EDIFACT Delimiters and provide the relevant values. These values are used to parse the incoming EDIFACT message to retrieve partner identities, etc. Why do we only need EDIFACT delimiters and not X12? That’s because the ISA segment is mandatory in an X12 message and the bridge can extract the required delimiters from the ISA segment. For EDIFACT, a UNA segment is optional. So, the bridge needs to be aware of the delimiters to use for parsing the message, in case the incoming EDIFACT message does not have the UNA segment. If the incoming EDIFACT message includes a UNA segment, the values you enter here are ignored.

      UNA1 (Component data element separator)

      Enter a value for the component data element separator that separates simple data elements within composite data elements. Select Char for a character data element or Hex for a hexadecimal data element. The character you enter automatically changes if you change its format.

      UNA2 (Data element separator)

      Enter a value for the data element separator that separates composite data elements consisting of two or more simple data elements or simple data elements that are not part of a composite. Select Char for a character data element or Hex for a hexadecimal data element. The character you enter automatically changes if you change its format.

      UNA3 (Decimal notation)

      Specify whether you want to use a Comma or Decimal as the decimal notation to be used in the outgoing interchange.

      UNA4 (Release Indicator)

      Enter a value for the release indicator that indicates that the following character is not a syntax separator, terminator, or release character, but is part of the original data. Select Char for a character data element or Hex for a hexadecimal data element. The character you enter automatically changes if you change its format.

      UNA5 (Repetition Separator)

      Enter a value for the repetition separator that is used to separate segments that repeat within a transaction set. Select Char for a character data element or Hex for a hexadecimal data element. The character you enter automatically changes if you change its format.

      UNA6 (Segment Terminator)

      Enter a value for the segment terminator that indicates the end of an EDI segment. Select Char for a character data element or Hex for a hexadecimal data element. The character you enter automatically changes if you change its format.

      Suffix

      Specify whether you want to use carriage return (CR), line feed (LF), both, or none as the end-of-line character that is used with the segment terminator.

    2. Click Continue. Receive Settings and Send Settings tabs are added.

    Configure the AS2 Receive bridge settings

    In the receive settings, you enter the inbound URL and the route settings to receive messages over AS2.

    Inbound URL settings

    These settings define the endpoint where the hosted partner in an agreement receives incoming AS2 messages.

    On the Inbound URL page of the Receive Settings tab, enter the following values:

    URL Suffix

    Enter a unique URL suffix to append to the URL. The guest partner sends AS2 messages to the URL, which includes this suffix.

    URL

    This read-only field shows the endpoint URL at which the hosted partner receives incoming AS2 messages. The complete URL includes the URL suffix you provided.

    Route settings

    AS2 messages can be sent to a non-EDI destination or received from a non-EDI destination. An AS2 message can be routed to BizTalk Services bridges, Azure blobs, or Azure Service Bus. This section provides information on how to create routing rules to route to these destinations.

    1. On the Route page of the Receive Settings tab, expand Route Settings, and then click Add.

    2. In the dialog box that pops us, you specify three key routing configurations – routing condition, routing action, and routing destination.

      1. Enter a unique name for the routing rule.

      2. Route Rule: Enter the routing condition based on the properties you promoted earlier. You can either use the grid to specify the condition or provide a SQL 92 filter expression that specifies the condition. To understand this better, let us assume you promoted a property (CustName) whose value is set to John at runtime. To use this property as a routing condition, you can do either of the following:

        • Select the option for the grid, and then click the (+) icon to select the property you promoted. From the grid, select CustName, specify the Operation as (==), and set the value to John.

          OR

        • Select the Use advanced definitions option, and specify a SQL 92 expression, such as:

          CustName == ‘John’
          

          You can use this option to provide more detailed query expressions using other operators as well.

      3. Route action: If the route condition is met, at runtime the agreement stamps message headers based on the route actions you specify here. Under Route action, click the (+) icon, and specify the following values.

        Field Name

        Description

        Target Type

        Set this to SOAP or HTTP.

        Header

        Specifies the name of message header property to which a value will be assigned. You can also specify custom headers here.

        Namespace

        Specify the namespace of the SOAP header to which the value will be assigned. This field is disabled if you set the Target Type to HTTP.

        Value Type

        Select Constant if you want to assign a constant value to the header property. Select PromotedProperty if you want to the value of a promoted property to the header property.

        Constant Value

        If you set Value Type to Constant, specify the constant value that must be assigned to the message header property.

        Promoted Property

        If you set Value Type to PromotedProperty, selected the property whose value is assigned to the message header property.

      4. Route destination: Enter the destination where the messages are routed once they are processed by the agreement:

        Note

        Even if you do not enter a routing condition and a routing action, you must enter a routing destination.

        Azure BizTalk Bridge

        Enter the name of the bridge to route the message.

        The URL looks similar to the following:

        https://YourDeployment.biztalk.windows.net/default/BridgeName

        Azure Blobs

        Enter the Shared Access Signature URL to your Azure Blob. For example, enter:

        https://myAccount.blob.core.windows.net/ContainerName/BlobNamePolicyIndentifierSignature

        Managing Access to Containers, Blobs, Tables, and Queues provides more information on the Shared Access Signature URL.

        Azure Service Bus

        You can route to any of the following Service Bus entities:

        Queue

        Provide either the Shared Access Signature (SAS) or the shared secret for the queue.

        • If you choose the SAS option, provide the SAS connection string and the name of the queue to route to.

        • If you choose the shared secret name, provide the URL for the queue, Service Bus issuer name, and Service Bus issuer key.

        Topic

        Provide either the Shared Access Signature (SAS) or the shared secret for the topic.

        • If you choose the SAS option, provide the SAS connection string and the name of the topic to route to.

        • If you choose the shared secret name, provide the URL for the topic, Service Bus issuer name, and Service Bus issuer key.

        BasicHttpRelay

        Provide the URL for the relay endpoint, the Service Bus issuer name, and the Service Bus issuer key.

        WebHttpRelay

        Provide the URL for the relay endpoint, the Service Bus issuer name, and the Service Bus issuer key.

        NetTcpRelay

        Provide the URL for the relay endpoint, the Service Bus issuer name, and the Service Bus issuer key.

        Important

        If you choose to route to a Service Bus relay endpoint, make sure the relay endpoint hosts a two-way relay service. You cannot use EDI pipelines to route to a one-way relay service.

      5. Click Save to save the route settings.

        Note

        If more than one route rules are defined, evaluation is based on the first match. The order of executing the rules is defined by the order in which the rules are defined in the grid.

    Configure the AS2 Send bridge settings

    In the send settings, you enter the inbound URL and the route settings to send messages over AS2. You send a message to the inbound URL to be routed to the guest partner’s destination URL.

    Inbound URL settings

    These settings define the endpoint where the hosted partner receives AS2 messages to be sent to the guest partner.

    On the Inbound URL page of the Send Settings tab, enter the following values:

    URL Suffix

    Enter a unique URL suffix to append to the URL. The hosted partner receives AS2 messages at this endpoint URL, which includes this suffix.

    URL

    This read-only field shows the endpoint URL at which the hosted partner receives AS2 messages to be sent to a guest partner. The complete URL includes the URL suffix you provided.

    Transport settings

    AS2 messages can be routed to a destination URL endpoint. Basically, you configure the transport settings for the endpoint where the message must be routed to.

    On the Transport page of the Send Settings tab, enter a destination URL. This URL is used to send AS2 messages from the hosted partner to the guest partner.

    See Also

    Configuring EDI, AS2, and EDIFACT on BizTalk Services Portal