Vishal Modi

Architect

  Home  |   Contact  |   Syndication    |   Login
  44 Posts | 0 Stories | 84 Comments | 0 Trackbacks

News

Tag Cloud


Archives

Post Categories

Blogs

Links

Tags

Hey folks,
 
Recently, Tellago Studios released its first product SO-Aware, A WCF RESTful Service Metadata Repository. Now talking about WCF Services and how can we forget them being used extensively by BizTalk Server. Let’s check it out with a simple scenario.
 
Say you are using SO-Aware as a central repository for all your Web Services. Some of those services are also integrated with BizTalk. Now on one hand you have a central repository for your services and your life is going smooth but when it comes to integrate with BizTalk, you have to again deal with that pain of identifying your service location, its URI, bindings etc. Naah…!!
 
Well “THERE’S A SO-AWARE RESOLVER FOR THAT.”
 
SCENARIO: Msg In -- Itinerary Selector -- Transform -- Route -- Msg Out to WCF Service registered with SO-Aware.
 
STEPS:
 
o   First of all you will have to run the msi file for the SO Aware ESB Resolver from the SO Aware SDK folder. This will register the SO Aware resolver for ESB Toolkit. Open the ESB.Config file to verify that you do see SO Aware configuration in there.
o   Assuming that you have already registered your WCF Service with SO Aware. In this case I have a very simple WCF Service which takes in any message in and dumps out a xml body to a file location. This Video which shows how you can register WCF Services in SO-Aware. Below are few screenshots of the WCF Sample Service registered in SO-Aware.
 
 
 
 
 
o   Next create a new BizTalk Project and add couple of schemas and a map for sample. Below are the screenshots.
 
 
 
o   Lets open up BTS Admin Console and create a Receive Port and Send Port for a new BizTalk Application say “SoAwareBizTalkESBSample”. You can choose any BizTalk Adapter for the incoming message but I choose File for now to make it simple. Below is the screenshot of my Receive Port and Send Port(Make sure you choose a Dynamic Send Port). Select the SendPort filters as shown in snapshot. Let’s do the Pipeline configuration later and keep the default one for now.
 
 
 
 
 
 
o   Next thing lets configure BRE for the SO-Aware Sample. So open up Business Rules Composer. Create Business couple of Policies, one which resolves the Itinerary, second which resolves the Map. Below are screen shots. Make sure you specify the fully qualified name for the Map.
 
  
 
o   Now let’s build an Itinerary for the above scenario. Assuming you have successfully installed and configured ESB Toolkit on your machine. Open a New Class Library Project and delete the Class.cs file from it. Click Add New Itinerary and name it “OneWaySample”.
o   From the ESB Toolbox, add a OnRamp, OffRamp and 3 Itinerary Service to the Itinerary Designer window.
o   Configure the OnRamp and Off Ramp for the above configured BizTalk Application.
 
 
 
 
o   Configure the first Itinerary Service as shows in screenshot. The first Itinerary Service is basically for the message transformation based on BRE Resolver.
 
 
 
o   Now the Second Itinerary Service is for the Routing. This Itinerary Service will be using the SO Aware Resolver to fetch the destination service Routing Information
o   When you choose the Resolver Implementation as Custom SO Aware Resolver, the Seaware Resolver properties will be available. In the properties, the ServiceURL is not the destination Service URL but it’s the SO Aware ServiceRepository(a RESTful Service) URL. And the Service Name is the name of your WCF Service which you previously registered in SO Aware UI.
 
 
 
 
o   Configure the third Itineary Service Shape as shown in the screen shot.
 
 
o   Finally connect all the shapes, select the exporter model as Database exporter and Export the Itinerary. Just to verify, open up EsbItineraryDB and in the Itinerary table check if you see your itinerary present.
 
 
o   Make sure you have published and deployed your Business Rules.
o   Last but not the least lets open up the BTS Admin Console again and configure the Pipeline. So before we do that, for your current SoAware.BiztalkESBSample Application, add reference to Microsoft.Practices.ESB Application.
o   Open up the Receive Location and for the pipeline select ItinearySelectReceiveXml Pipeline. Configure the Pipeline properties as shown in the snapshot. Also open up SendPort and select the SendPort pipeline as ItinerarySendPassthough. Keep the properties as default in it.
 
 
 
o   Finally, start up the BizTalk Application, paste a message in the File Location for the Receive Location and if you have ESB Tracking turned on, you can open up DebugView and see the entire message flow.
 
You can download the SO Aware SDK for TellagoStudios.
 
 
Thanks and Happy SOAwaring.
 
 
Vishal Mody
 
 

 

posted on Thursday, August 5, 2010 11:26 AM