Professional Documents
Culture Documents
Bus
Version 1.0
Feb 1, 2012
Document Name
ExposingBizTalkServiceToAzure.pdf
Contributor 1
Heena Parmar
Contributor 2
Contributor 3
Last save date
Stability
Version 1.0
Required Reviewers
1. Overview
This document gives a technical overview of how to expose a BizTalk WCF service to Azure using Azure
Service Bus. One example is used throughout the sections to explain the implementation details. To
understand this document, reader should have basic knowledge of Azure and BizTalk.
On clicking this tab, you can create a new service namespace. Here, you give a unique
namespace for your service bus.
Once you press Create, the portal will begin activating your new service namespace. After the
activation process is complete, you can begin using your new service namespace to host Service
Bus endpoints. The portal will indicate that the new service namespace is Active once its
ready to use.
If you click on the service namespace, you can view the service namespace details. This page
gives you specific information about your service namespace including things like the
management key, the Service Bus issuer name/key, the registry URL, the Access Control
endpoints, as well as other details.
The Default Key highlighted above has the issuer name and issuer Key which is used by service
bus to authenticate the client and service.
To start with, BizTalk Server should have latest Windows Azure SDK installed to leverage Service
Bus features.
Now you need to create a service with an operation which can take input (e.g. PurchaseOrder
standard schema). Using BizTalk WCF Service Publishing wizard you can publish this schema as
WCF service. You can specify any service name and operation name. (You need this step just to
get a WSDL for your service to generate proxy classes for use by client. You dont need to set it
in IIS as it can be hosted using BizTalk host (windows service.)
Next, after deploying the BizTalk schema, you need to create a service bus receive location in
your BizTalk application. For this purpose , you can use WCF-Custom adapter
Now, set the Azure Cloud address. Specify the address in this format sb://<servicebus
namespace>/<your servicename> . In the example case , the address looks like the following:
In the Binding tab, you can see the Relay Bindings for different protocols. Here, this example
uses netTcpRelayBinding.
In order to authenticate with Azure Cloud service endpoint, you need to define security theme.
For this example, add transportClientEndpointBehavior extension to EndpointBehavior and set
the credentialType to SharedSecret.
Set the Shared Secret Name and Key as shown below. (Note that the screenshot shows the
SharedSecretElement is filled under ClientCredentials which was used till SDK 1.4. SDK 1.5
onwards, SharedSecretElement is filled under TokenProvider which comes as sibling to
ClientCredentials.
As part of this example, you can create a send port which subscribes to PurchaseOrder message
and put it into the file share.
Now, as the receive location is enabled, you can try browsing
http://<namespace>.servicebus.windows.net/ . Your Service should now be visible here.
Note: Receive location with service bus settings can be created directly through BizTalk Server
WCF Service Publishing wizard in BizTalk Server 2010. This enhancement in tool is part of App
fabric Connect.
Add the proxy class of the BizTalk service to your console application.
In the Main method, call the method by passing the required PurchaseOrder input message.
In the application configuration, choose a matching binding and behavior as that of the service.
This is shown below:
Once this application is run, client should be successfully connected to cloud, transmit a
message and the Azure Service Bus should redirect(relay) that message securely to the BizTalk
Server. As a result of the example used, a PurchaseOrder file should be created in the folder
path specified in the BizTalk Server send port.
5. References