Table of Contents IntroductionWindows Azure Storage Create a Windows Azure Storage AccountCreate a container Configuring the WCF-WebHttp AdapterBizTalk Messaging SolutionWrap upCall for actionSee Also
Figure 1. Create a Windows Azure Storage Account.
Figure 2. Specify Windows Azure Storage Account details.
Figure 3. Create a container through the Windows Azure Portal.
Figure 4. New Container dialog box.
Figure 5. A newly created container.
Figure 6. Windows Azure Storage Services endpoints
Figure 7. WCF-WebHttp Transport Properties General Tab.
Figure 8. Variable Mapping of File Name variable.
Figure 9. Selection of a Behaviour Extension.
Figure 10. Specification of account key and name.
Figure 11. Manage the access keys.
Now that the WCF-WebHttp is configured we can look at the complete
BizTalk messaging solution that consists of a Send port and Receive port.
The messaging solution is a very basic (see figure 12). A file will be dropped into a folder and a BizTalk receive port that listen to that folder will pick the file up. It will then be routed to a send port that subscribes to the files coming in through
the receive port. The send port is configured with WCF-WebHttp adapter and will send according to its configuration the file to a container in Windows Azure Storage.
Figure 12. BizTalk Messaging solution to send a file to Windows Azure Blob Storage.
However the way the adapter is configured the name of the file will be containing the path of the folder and the file name. Something like
C:\foldername\filename. To prevent that from happening in a message based solution you will need a simple custom pipeline component that will strip off the path name. Below you can see the code to strip of the path from the
ReceivedFileName context property.
IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg)
contextReceivedFileName = pInMsg.Context;
value = contextReceivedFileName.Read(
filename only, strip path
fileString = file.Name;
updated value back to context
the message with modified context
Figure 13. XML files in the data container.
Read suggested related topics: