Hybrid Integration can allow us to work and combine both on-premise and cloud integration. Moving everything to cloud might not be the best solution but making the use of hybrid integration will deliver flawless stability for enterprises that integrates data from on-premise to cloud data and guaranteeing that businesses have full benefit when going ahead.
We had a requirement from customer to send different file formats (.pdf, .txt, .zip, .pptx etc) to Azure Blob storage via BizTalk server 2013 R2.
For sending the customer files to Azure Blob storage we used WCF-WebHttp adapter along with the inbuild azureStorageBehaviour. This behaviour will help us to connect to Azure Blob storage.
Let’s walk through the various steps carried out during the process.
Create a Storage Account in Azure and a container – ‘biztalkfilescontainer’
Configuration of your BizTalk send port using WCF-WebHttp adapter and azureStorageBehaviour
- Use the HTTP URI for your Blob Storage
- Set HTTP URL method and URL mapping
- Variable mapping to get Filename from the context using file Property namespace
- Behaviour Configuration – Go to behaviour on your send port properties and select tab – Behaviour. Add extension “azureStorageBehaviour”.
- Specify azureAccountKey & azureAccountName ( You can get the Access Keys and Storage Account Name from the Azure Portal ).
- A receive port where the customer dropped all the necessary files. Our above send port subscribed to this receive port.
- Filter = BTS.ReceivePortName
While sending the customer files to Azure Blob storage we noticed that that in Azure the file was getting saved into folder structure because of the Received filed name context property “C:\Users\biztalk\CustomerFiles\Incoming\”.
In order to avoid this folder structure in Azure and just save the file name in container we had to write a pipeline component to extract only the file name from the context. The files were later saved as below in Azure blob storage container.