Written by: Preetham Reddy 8/12/2009 12:42 AM
In my last post, I gave a brief Introduction to Itineraries in ESB Toolkit 2.0. In this, lets just develop an Itinerary that makes use of an Orchestration to Transform the InBound Message, Route it to a WebService, Transform it back to the client format before sending it back. These 'Transformations' and 'Routing' can be done using an Orchestration Extender or a Messaging Extender. We'll save 'Messaging Extender' logic for another post... For now, let's use Orchestration Extender. Transformations could be done either using BizTalk Maps or using a .NET code. BizTalk makes it simple and very easy to transform InBound Messages using the logic embedded into it's Maps. It's a very powerful component and you could include pretty powerful logic into it with the help of Functoids. If you have an existing XSLT sheets that already has your transformation logic, you could tell the maps to use those sheets too... But here, I would like to demonstrate calling an external .NET code from an Orchestration. Hence, I am not going to use the BizTalk Maps. I am going to include all the tranformation logic in the .NET code and deploy the assembly in the GAC. Once we add a reference to this DLL in our BizTalk project, our Orchestration will be able to call it to perform the necessary transformations!!! Here is the list of things we need to do, to get things done : Write the .NET Transformation Function, that accepts two parameters : XLANG Message and XSLT FileName. Based on the XSLT FileName provided, it would pull the appropriate file from the database, and transform the XLANG Message and send it back to the caller. We need to assign the 'Strong Name Key' to the assembly and deploy it in the GAC. Create a New Orchestration, that calls the .NET code to transforms the InBound Message and forward it to the next Itinerary Step. Create another Orchestration that get the current Itinerary Step and fetches the 'Transport Type' and 'Transport Location' from it's 'Resolver'. Using this information, it routes the message to appropriate endpoint, get the response back and forward it to the next step in the Itinerary. Build and Deploy the BizTalk project containing these Orchestrations and start the Application using the Admin Console. Add two new Itinerary Services to the Esb.Config file, give them some meaningful names and point them to the two newly created Orchestrations. This would help us to find them in the 'Itinerary Service' Properties Box. Create an Itinerary using the designer that makes use of these orchestrations to perform transformation and routing!!! Use the Itinerary Test Client Application to send the message along with the Itinerary to test!!! Simple, Isn't it??? Okay then, Let's get started!!!
0 comment(s) so far...