Using the WCF BizTalk Adapter for Windows Azure Storage Service to communicate with Windows Azure Blob

As we’ve talk on a previous post, due to our interest on the cloud computing,we (Maxime and I) decided to build a WCF Azure Adapter to interact with the Azure Storage.
This adapter is first designed for BizTalk but can also be used in C# (and we test all the steps with BizTalk and C# cases).

Maxime explains on his blog few things about consuming queues with the Adapter, I will focus my post on the Blob case.

BizTalk WCF Adapter – a WCF Lob Adapter

We’ve built this adapter using the WCF Lob Adapter SDK (the msdn explains all the steps to build, consume and host an WCF adapter and as Maxime said, it’s not really so complicated).

As the queue,once you’re connected to your storage, the adapter allow to browse the container available on your blob storage and the operations avaibable for the container.

For the selected operations, the adapter will build the xsd schemas for use in BizTalk and the Bindings configuration file:

the schema allows you to create a blob from string content or binary content (with specified encoding):

Then you can map you information using an orchestration, a map or using WCF Send Port configuration (that’s what I choose, we will use the Outbound WCF message body Property).

So here is the test case :

I want to take an image from a folder with BizTalk and put this image on a blob.

So I have to :

  • create a Receive port and receive location that poll the file
  • create a WCF Send Port that subscribe to the message of the Receive Port
  • configure the WCF Send Port like this

 Your account key have to be set in the azure bindings properties(for this test we use the development storage by using the URI property UseDevelopmentStorage=True) :

and then the messages properties

We specified the message body using the following template :

<ns0:AddBlob xmlns:ns0=\”http://schemas.biztalk.adapter/2011/\“>
   <ns0:Binary encoding=\”base64\”>
    <bts-msg-body xmlns=\”\” encoding=\”base64\”/>

The element bts-msg-body is used to copy the body of the message inside the Binary element. The attribute encoding is used by BizTalk to encode the Body content using special encoding.
The choices are : xml|string|base64|hex

If you want to transmit binary data, you can use base64 encoding. (For now the adapater support base64 and string encoding).

Here is the result, I upload a file in myfirstcontainer on my storage account :

(The tools used here is Azure Storage Explorer)

As said Maxime, we think that our adapter can be usefull for you if you use BizTalk and also to generate class for use with C#.

We plan to add some actions for the blob and support the personalization of the Blob Properties and Metadata using property context of BizTalk
We hope publishing the first release in a couple of days

Stay connected 😉

This entry was posted in Azure, BizTalk, Codeplex, Microsoft, Windows Azure Platform and tagged , , , , . Bookmark the permalink.

2 Responses to Using the WCF BizTalk Adapter for Windows Azure Storage Service to communicate with Windows Azure Blob

  1. Pingback: BizTalk adapter for Windows Azure Storage - Roberto Brunetti

  2. Pingback: BizTalk adapter for Windows Azure Storage | Roberto Brunetti

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s