Processing XML Document Types on webMethods.io B2B

 

Introduction

This article explains about processing XML document Types received from a Partner over AS2 Channel on webMethods.io B2B.

Use Case

Below diagram represents the use case explained in this article

  • ABCCorporation is a partner of ACMEOrganization. 
  • ABCCorporation would like send Purchase Order to ACMEOrganization.
  • ACMEOrganization is using webMethods.io (B2B, Integration) for receiving and processing the Purchase Order.
  • ABCCorporation is configured as partner profile and ACMEOrganization is configured as Enterprise on webMethods.io B2B.
  • ABCCorporation is identified as ABC and ACMEOrganization is identified as ACME over AS2.
  • Below is the purchase order XML sample.

<?xml version="1.0"?>
<PurchaseOrder PurchaseOrderNumber="1" OrderDate="2020/04/22">
<Metadata>
<Sender>ABC</Sender>
<Receiver>ACME</Receiver>
</Metadata>
<Address Type="shipping">
<Name>ABC Corporation</Name>
<Street>ABC Street</Street>
<City>ABC City</City>
<State>ABC Street</State>
<Zip>560037</Zip>
<Country>ABC</Country>
</Address>
<DeliveryNotes>Office</DeliveryNotes>
<Items>
<Item PartNumber="1">
<ProductName>ACME</ProductName>
<Quantity>10</Quantity>
<USPrice>1000</USPrice>
<Comment>ACME</Comment>
<ShipDate>2020/04/22</ShipDate>
</Item>
</Items>
</PurchaseOrder>

Implemenation Steps

Below diagram represents the configurations required for on webMethods.io B2B and Integration.

  • webMethods.io B2B is should be configured with enterprise with EDINT AS2 identifier as ACME and partner profile (ABC) should be created with EDINT AS2 identifier as ABC.
  • An inbound AS2 channel should be associated the Partner Profile to receive AS2 messages.
  • Partner user should be created and associated with the partner profile to send purchase order XML. 

Create Document from XML Sample on webMethods.io Integration

  • webMethods.io B2B can import the documents from webMethods.io Integration. Login to webMethods.io Integration -> Navigate to Project -> Configurations -> Pick Flow service -> Document Types -> Click on Add Document Type.

  • Create the document with the name purchaseOrder using the example from Use case section

Import the document to webMethods.io B2B

  • Login to webMethods.io Integration -> Navigate to Project -> Configurations -> Pick Flow service -> Document Types -> Click on Add Document Type.• Login to webMethods.io B2B - > Navigate to Documents -> Business Documents -> Add Document -> XML -> Provide Name as purchaseOrder -> Select Project Name where you created the XML document in the above step

  • Navigate to imported document and click on activate; configure the sender, receive identifiers. This can be configured from Attributes section of the document. Select the source field and add to identifiers. In this use case, Metadata fields in the sample represents the sender and receiver AS2 identifiers

Processing Rule for XML Document on webMethods.io B2B

  • Navigate to Processing Rules, create a Processing rule in the required order (Above/first/last) by selecting the existing processing rules. Processing rule criteria should be selected as
    • Sender -> Partner (ABCCorportation)
    • Receiver -> Enterprise
    • Document -> Purchase Order.

  • Select the action to send to a flowservice on webMethods.io Integration

  • Use “pkg_ac470505d6324d72acb81650845aad86_exported.zip” from the attachments if you are using flow editor as an example integration on webMethods.io Integration
  • Use “ReceiveXMLMessage.zip” from the attachments if you are using new flow tooling.

Send XML Message over AS2 from Postman

  • Testing from Postman requires below features to be turned-off on the channel.

  • Use the postman collection - https://www.getpostman.com/collections/186b1096086f600b39d8 to post the XML over AS2 inbound channel. You need to configure the below on postman before posting.
    • tenantname - > webMethods.io B2B Tenant Name
    • channelid -> Channel Unique identifier
    • AS2-From -> ABC in this use case, AS2 identifier of Partner
    • AS2-To -> ACME in this use case, AS2 identifier of Enterprise
    • Message-Id -> Unique identifier for the message
    • Authorization -> Partner User

pkg_ac470505d6324d72acb81650845aad86_exported.zip (8.53 KB)

ReceiveXMLMessage.zip (8.77 KB)

XMLProcessing_Export.zip (4.01 KB)