Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
This week I gave a presentation to the Sydney BizTalk User Group on (Biz)Talking to the Cloud. I showed how we can quickly and easily configure a BizTalk Receive Port to consume services hosted in the cloud. In the demo, we configured BizTalk to participate in a multicast events scenario.
I have been playing further with BizTalk and Cloud services and in this post I will demonstrate how to expose BizTalk Orchestrations to the Cloud. To make it easy for you to build this on your own environment, I have used the now famous (or infamous) EchoService as the basis of this demo. This allows you to use the existing Microsoft .NET Services SDK sample to call the BizTalk Orchestration through the cloud.
Before You Begin
BizTalk DevelopmentIn this step we will create a simple orchestration that receives a generic message, pulls the "echo" text out, creates the response message, and sends it back out the two-way port. I have used System.Xml.XmlDocument types avoiding the need to create schemas and simplifying the demo.
// Retrieve the text sent in the request strText = xpath(msgRequest, "string(//*[local-name()='text'])"); // Construct the response strResponse = System.String.Format("<EchoResponse xmlns=\"http://samples.microsoft.com/ServiceModel/Relay/\"> <EchoResult>{0}</EchoResult></EchoResponse>", "BizTalk: " + strText); // Create the response document xmlDoc.LoadXml(strResponse); // Assign the response message variable msgResponse = xmlDoc;
BizTalk Application Configuration
In this step we will configure a WCF-Custom receive port to expose our newly created orchestration to the cloud.
Verify the Service is Exposed to the Cloud
In this step we will browse to your Microsoft .NET Services service registry feed and verify your service is exposed to the cloud.
Test Your Solution
What did we just do?
Using only the new WCF features that were installed in the Microsoft .NET Services SDK we were able to configure a request-response receive port in BizTalk that exposed our orchestration to the cloud. This is very cool .
At the very least, we could do away with the orchestration binding and just configure the receive port to drop messages into the BizTalk MsgBox. We then use content based routing to route the messages off to our existing orchestrations.
Think of the times you wanted to expose your BizTalk services to customers and clients outside your organisation, but had to jump all those hurdles the IT infrastructure team seams to magically come up with.
This is just the beginning...
Remember Me