Thursday, 30 January 2014

Using Windows Azure Biztalk Service to receive EDI file from multiple partner


This sample demonstrates how to use Windows Azure Biztalk Service (WABS) to receive EDI file , transform EDI  to XML. The EDI Bridge receives the EDI 832 file, transforms and sends it to Azure Service Bus Queue.
Use Message Receiver to retrieve messages from the Queue.

Business Scenario

Fabrikam, Northridge and Contoso are three business partners. Fabrikam and Northridge (the supplier) sends product catalog messages to Contoso (the retailer) in EDI format. Contoso maintains all the product catalog data in xml format within Contoso’s premises. Fabrikam and Northridge send EDI 832 messages to Contoso. Hence, Contoso has to implement a solution on Windows Azure, which enables the following: Contoso must expose end point from where it receive EDI 832 files from Fabrikam and Northridge
Contoso must process EDI 832, validates and transformed to XML format

To enable this scenario, Contoso does the following:

Create EDI and XML Schema, Mapping between EDI and XML.
Create and configure trading partner setup for Fabrikam, Northridge and Contoso
Create Queue on Azure service bus to store XML.

Step By Step.

Create Biztalk Services Artifacts Project in visual studio 2012.

Delete Default Map and Schema (Schema1, Schema2 and Map).
Add EDI 832 schema. (Download MicrosoftEDIxsdTemplate from msdn )
Create xml schema for price sales catalog.

Create Map.

Go to WABS portal and upload schema and Map.

Upload Map

Create 3 partners on the portal


Click on Save.
Similarly you can create profile for contoso and fabrikam.
Create agreements between
  • contoso and fabrikam
  • contoso and Northridge

Steps to create agreement between contoso and fabrikam.
Click on Agreements ->New.

Add partner name and Click on continue.
Select the transport type over which contoso want to receive EDI 832.
I am using transport type as HTTP for demo purpose.

Select Schema in the protocol section  

Select Map in the transport section
Now in the route section set routing settings.

Click on add to add routing actions

Set Service bus namespace, Issuer Name, Issuer Key and Queue Name.


Similarly do the send setting.

In Similar way we can create agreement for contoso and Northridge
After created two agreements, you can check 4 bridges deployed on portal 

Agreement/1/Receive – to receive EDI from fabrikam
Agreement/2/Receive – to receive EDI from Northridge
Agreement/1/Send-to sends EDI from contoso
Agreement/2/Send- to send EDI from contoso

Test the solution.

Download Biztalk Service Explorer.

Connect to your Biztalk services.
Using Biztalk services explorer to send EDI message to EDI bridges.

After send EDI message to bridge, you can check in tracking whether message is routed to success Queue or Error Queue.


if message is routed to success queue, then you can download XML from SuccessQueue
Read Message From SuccessQueue Queue.
Set the ConnectionString and Run MessagingWithQueue Sample, Download 

< add key="Microsoft.ServiceBus.ConnectionString" value="<ConnectionString Copy from portal>" />

Source Code

Download Source code from Here


  1. Biztalk Server Online Training - Biztalk Admin Online Training
    Introductions to Enterprise Application Patterns and BizTalk Server, Understanding BizTalk Framework, Setting up a BizTalk Server Environment, Messaging Architecture, Setting up a BizTalk Server Environment Engine, Business Activity Monitoring, WCF Services Schemas in BizTalk, Transformations in BizTalk, The BizTalk Messaging Engine and Pipelines, Adapters in BizTalk, Orchestrations, Advanced Orchestrations, Integration Patterns in BizTalkBizTalk Rules with BizTalk, Testing BizTalk Artifacts, BizTalk Server Instrumentation, Error Handling, and Deployment,Tracking and Deploying BizTalk Solutions, Monitoring and Maintenance, Administration, BizTalk Server Performance andTuning, BizTalk Tools, BizTalk 2013 Features, ESB Toolkit 2.
    If you are seeking training and support you can reach me on 91-9000444287.

  2. Hi, I am thankful to you for sharing this awesome article with this helpful knowledge.
    Biztalk Online Training Hyderabad