Introduction
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 NorthridgeContoso 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.
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