Thursday, May 31, 2007

BizTalk Challenge add namespace to message

Today I faced a new challenge with BizTalk Server, where I needed to add a namespace to an incoming message. Through Google I found an excellent post by Richard Seroter. If you had installed the BizTalk Adapters for Enterprise Applications, you’d find a Visual Studio.NET project located at:

C:\Program Files\Microsoft BizTalk Adapters for Enterprise Applications\Pipeline Component.

For me this is interesting since I am working with BizTalk Server 2006 on 64-bits and currently integrating with Oracle eBusiness Suite (see previous posts).
Pipeline component is called SetNSForMsg.










You can open solution, build project. One can encounter an error stating the Designer.cs is not present or is visual but with an exclamation mark (delete it). Change code in SetNSForMsg.cs class in IComponent
IBaseMessage Execute. Rest you can find in Richard Seroter post. Change if necessary the delayed signing into singing of the component and copy it to C:\Program Files\Microsoft BizTalk Server 2006\Pipeline Components. In VS2005 you can add pipeline through choose items in toolbox (see picture below).


















Technorati:

Monday, May 28, 2007

SOA Principles

Coming Wednesday I have another discussion with a couple of architects of Inter Access (my company) about SOA. We will discuss the principles of SOA. Some of the principles to be discussed are published by Stefan Tilkov in InfoQ and SOAWorld magazine April 2007. It is a good written piece and very useful in our discussion. In a previous post What is SOA? I also mentioned a discussion with the same architects. Together with my colleague architects we are currently working on a SOA framework, where definition, principles and so on are building blocks. In the end this framework can be used to guide our potential customers to set up a SOA. Some principles of SOA can be found here at eBiz or here. Have a look if you are interested by going through the links provided. If not you could try have a look at our new website build entirely with MOSS 2007.

Technorati:

Thursday, May 24, 2007

BizTalk Hotrod Magazine

Today I found out there is a new magazine for BizTalk. Thanks to a site called BizTalk 24 * 7 from Saravana Kumar. Great site I can recommend it if you want to find more BizTalk resources and so on. It out for a couple of weeks now and can be downloaded here. There some posting out there from a number of people like Bundy's .NET and BizTalk Server Blog, Tim Rayburn and Saravana himself. Have a look for yourself at BizTalk 24 * 7, if you haven't already. I am going to read the magazine now. Keep you all posted.

P.s. I found out there is another great list of resources by Brain H. Prince. (29 may 2007)

Technorati:

Wednesday, May 23, 2007

Working with BizTalk Adapters for Enterprise Applications on Windows 2003 R2 64-bit

Yesterday I was configuring a BizTalk production environment for a customer which involved the BizTalk Enterprise Adapters. In a previous post I mentioned how to set up an environment where one can integrate between Oracle eBusiness Suite and BizTalk. This environment was 32-bit and now I was facing 64-bit. This is a bit different in a way of configuring, so I did some googeling and found a very good blog post of Wade Wegner. He explains step by step what to do. There are some things I had to find out like to change from Program Files(x86) to Progr~2 since the adapter has some flaws (use good old dos command like dir /x). Another to note here is that registry settings for 64-bit are not found in the suggested article http://support.microsoft.com/?id=923650 (32-bit).















The registry key to update can be located here:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\BizTalkAdapters].

After that following the rest of the posting and you are all set to go.

Technorati:

Sunday, May 20, 2007

Services everywhere

Here you see me at gravity bar at 7th floor of the Guinness storehouse in Dublin. I spent a weekend with my wife and friends in Ireland (see other picture below). Besides Dublin I have been in Malahide, Lusk, Rush, Howth, Powercourt Waterfall and Glendaloch. I visited a couple of bars including the gravity bar and drank a lot of Guinness (one of my favorite's stouts). Yesterday evening I returned home again and was thinking that before this trip I used a couple of services like booking a flight and a hotel room. During the trip I used credit card to pay for tickets, meals and drink (there are a couple of services behind the transaction too). When I came home I ordered a pizza online that was brought to my home later on. Another of couple services used here. As so see a lot of things around use are services. If you ever thinking of going to Ireland start off with Guiness storehouse, a good experience and nice taste of Guinness at the top Gravity bar with a nice view over Dublin City. Then dive into town and visit Trinity College, Stephen's Green and Temple Bar for a drink. And if you have got the time drive around the surrounding of Dublin and enjoy the nice country side.


Technorati:

Tuesday, May 15, 2007

SOA Readings

Lately I have read some new SOA material like books and articles. Yesterday I finished reading a book from Sandy Carter about new business language. The book reads like a journey from innovation to don'ts of SOA. It contains a lot of case studies from companies around the world applying SOA and plenty of information collated from years of research done at IBM labs. Chapter 3 on Component business model lays the foundation for how an enterprise can link the business and IT alignment for success. Chapter 9 on the top 10 don'ts reflects some true real world experience and the easy to make mistakes when one undertakes SOA projects. ESBs to Governance are explained in terms that both business and IT execs can understand quickly while carrying enough content for the technology people to refer back. This book introduces the reader to many important aspects of SOA and shows how to use them to achieve business flexibility: component business modeling, the SOA reference architecture, the SOA lifecycle, SOA governance, and the SOA entry points. This is great information for explaining to the business why SOA matters and what the business (not just IT) needs to do.

Book is build up in three parts

Part I: Start at the Beginning–The Business
Chapter 1: The Innovation Imperative
Chapter 2: What Is Flex-pon-sive*?
Chapter 3: Deconstructing Your Business: Component Business Model

Part II: A Flexible Business Requires Flexible IT
Chapter 4: SOA as the DNA of a Flex-pon-sive* and Innovative Company
Chapter 5: SOA Key Concepts
Chapter 6: SOA Governance and Service Lifecycle
Chapter 7: Three Business-Centric SOA Entry Points
Chapter 8: What about Web 2.0 and SOA? Are They Related?

Part III: How to Implement Flex-pon-sive* in Your Business
Chapter 9: The Top 10 Don’ts!
Chapter 10: Case Study: IBM
Chapter 11: Putting It All Together

IBM Press; 1 edition (February 20, 2007), ISBN-10: 013195654X

It's a good reference book, which gave me a lot of insight in real world SOA. Besides reading this book I have subscribed myself to a two year subscription of SOA World magazine. I have read some articles and there nice like:

  • Enterprise Web 2.0 Solves the last Mile of SOA (good info, goes well with Chapter 8 of the book above) - BobBuffone;

  • SOA Architects and Models - David Linthicum.

  • Good reading, I recommended taking a subscription (electronic). It will cost you only round 130 US dollars for two years. That is around 5 US dollars a month. You also get access to back issues, so it is worth it. Last but not least I have also started reading the book of Dirk Krafzig which I mentioned in a previous post and have some chapters ahead of me to read.

    Technorati:

    Saturday, May 12, 2007

    SOA and Host Systems

    Microsoft recently released a white paper about leveraging value of host systems with real world SOA. The paper can be downloaded here. We from Microsoft Unit at Inter Access are now doing some researched based on this paper. We are trying for instance to call RPG code on AS/400. In a previous posts I mentioned I have been able to extract data from DB2 on AS/400, so connecting to AS/400 was easy. Same counts for connecting to a DB2 database. My colleague Hugo has written a nice tool to view data inside DB2 that helps to indentify tables, colums and so on.















    I must say he has done a nice job with only a few lines of code:

    MsDb2Connection con = new MsDb2Connection(textBox1.Text);
    MsDb2Command command = new MsDb2Command(textBox2.Text, con); MsDb2DataAdapter adapter = new MsDb2DataAdapter(command);
    MsDb2Transaction tran = null;
    DataSet ds = new DataSet();
    try

    {
    con.Open();
    tran = con.BeginTransaction(IsolationLevel.ReadCommitted);
    command.Transaction = tran;
    adapter.Fill(ds);
    dataGridView1.DataSource = ds.Tables[0];

    textBox3.Text = string.Format("Records selected: {0}", ds.Tables[0].Rows.Count.ToString());
    tran.Commit();

    }
    catch (Exception ex)
    {
    textBox3.Text = string.Format("Exception: " + ex.Source + " Message: " + ex.Message);
    tran.Rollback();
    }
    finally
    {
    command.Dispose();
    tran.Dispose();
    adapter.Dispose();
    con.Close();
    con.Dispose();
    }

    By using Microsofts Host Integration Server one can connect to back-end systems like AS/400. With this product from Microsoft functionality, data that resides on legacy systems can be exposed to outside world through services. So these systems can be still usefull inside an organisation and through services made available. Hence services can expose functionality/data from these systems a SOA is perfect. SOA provides capabilities to legacy systems to interact more with modern business process management and workflow tools. From Microsoft view this will be BizTalk Server and Workflow Foundation. More findings about our research will be posted later on.

    Technorati:

    Tuesday, May 08, 2007

    Integration Challenge: BizTalk Functoid Blues

    Recently I was facing an integration challenge by creating a custom functiod to use in a mapping. How do I create a custom functiod? Well one can look at a sample on a machine, where a BizTalk instance is present (usually C:\Program Files\Microsoft BizTalk Server 2006\SDK\Samples\XmlTools\CustomFunctoid). Important is to import the BizTalk assembly: Microsoft.BizTalk.BaseFunctoids. This one can be found on the server containing the BizTalk instance in folder: C:\Program Files\Microsoft BizTalk Server 2006\Developer Tools. So you can start creating a custom functoid by creating an empty solution. In that solution one adds an empty project. Why this way, well if you want to create a custom functoid the same way as in the sample, starting off with a class library template in Visual Studio will give you a different set of things like properties. After adding the empty project, change properties of project to class library. Next create a strong name through properties, the assembly will later be added to the GAC. Add namespace will useful name (assembly and default namespace, both the same). Add a class to the project and give it a useful name. Next is to add a couple of assemblies as reference, starting with Microsoft.BizTalk.BaseFunctoids, System and System.XMl and System.Data. These will be used in the class, together with some other. Finally before implementation an empty resource file has to be created. This can be done by downloading the following tool: resourcer found here. By adding an empty resource file to your project one can later add some string values and a bitmap. Why doing it this way, which may seem like a lot off overhead.
















    Creating a resource fill happens differently inside VS 2005 and System.Drawing has to be added and another file is added in the background resource.designer.cs, something you don’t want, because it will muck up adding the functoid in the end to your functoid toolbox (at least that is what I experienced).

    Implementation

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Reflection;
    using Microsoft.BizTalk.BaseFunctoids;


    namespace namespacename
    {
    ///
    /// myCustomFunctiod will assert if node from xml document contains an empty value (string).
    ///

    public class myCustomFunctiod : BaseFunctoid
    { public myCustomFunctiod () : base()
    { //ID for this functiod
    this.ID = 5001;

    // resource assembly must be ProjectName.ResourceName if building with
    // VS.Net
    SetupResourceAssembly("namespacename.ResourceFileName", Assembly.GetExecutingAssembly());

    //Setup the Name, ToolTip, Help Description, and the Bitmap for this functoid
    SetName("IDS_MYCUSTOMFUNCTOID_NAME");
    SetTooltip("IDS_MYCUSTOMFUNCTOID_TOOLTIP");
    SetDescription("IDS_MYCUSTOMFUNCTOID_DESCRIPTION");
    SetBitmap("IDB_MYCUSTOMFUNCTOID_BITMAP");

    //Set number of parameters
    this.SetMinParams(1);
    this.SetMaxParams(1);

    //set the function name that needs to be called when this Functoid is invoked. This
    //means that this Functoid assembly need to be present in GAC for its availability
    //during Test..Map and Runtime.
    SetExternalFunctionName(GetType().Assembly.FullName, "namespacename.myCustomFunctiod", "FunctionName");

    //category for this functoid. This functoid goes under the String Functoid Tab in
    //the VS.Net toolbox for functoids.

    this.Category = FunctoidCategory.String;
    this.OutputConnectionType = ConnectionType.AllExceptRecord;
    AddInputConnectionType(ConnectionType.AllExceptRecord); //first input
    }

    ///
    /// this is the function that gets called when the Map is executed which has this functoid.
    ///

    /// myParameter
    /// something
    public string FunctionName(type myParameter)
    { //myFunction Implementation }
    }
    }

    String values for the functoid like name, tooltip can be added by double clicking the resource file in the project inside VS 2005. Add the exact string name as in your code and use string values for name, tooltip and description. The bitmap can be custom made by for instance using paint.

    Deployment of functoid

    Before deploying your functoid go to project properties and click assembly information. One will get a form like picture below. Fill in title, description ect. Important here is GUID!!!! Create one by going to tools--> Create GUID. Build your solution/project after this. Add assembly to GAC and copy assembly to folder : C:\Program Files\Microsoft BizTalk Server 2006\Developer Tools\Mapper Extensions.



















    Deployment can be automated by using script like this:

    @SETLOCAL

    @CALL "%VS80COMNTOOLS%vsvars32.bat"

    @SET SolutionName=myCustomFunctoid.sln
    @SET AssemblyKeyFile=myCustomFunctoid.snk

    @ECHO.
    @ECHO If key files is not found, will generate a new key file...

    @IF NOT EXIST %AssemblyKeyFile% sn -k %AssemblyKeyFile%

    @ECHO.
    @ECHO Building the project...

    @DevEnv %SolutionName% /build Debug /Out Build.log

    @COPY bin\Debug\myCustomFunctoid.dll "..\..\..\..\Developer Tools\Mapper Extensions"

    @ECHO.
    @ECHO We need to GAC the .NET assembly that will be called
    @GacUtil /if bin\Debug\myCustomFunctoid.dll

    @ENDLOCAL

    @PAUSE


    Adding functoid to toolbox

    Final step is to add the functoid to the toolbox.




    I hope this will help to you to create functoids, when you need to create them. This can be the case, when functionality wanted in maps concerns a couple of out of the box functoids together and repeatedly. For better overview your map will not be crowded with numerous functoids when combining all functionality in one functoid; this can be helpful! Another reason might be functionality you want is not there. There is another great article on the web, where building a custom functoid is explained in case one needs some desired functionality that comes not from a out of the box functoid. Together with this post and that article you will have a great inside in developing your own functoids.

    Technorati:

    Tuesday, May 01, 2007

    SOA Deployments will grow !

    Today received an email containing article stating the SOA deployments will grow. So I googled around and found some more promising signs that SOA will be become big. It will be important for BI, click here. Gartner says it will grow more than fifty percent, nice. InfoWorld brings the same good news.. SOA World is very postive. The lists goes on, so happy times ahead for SOA. Good for us !!! Hype or no hype (see previous post).


    Technorati:

    Integration with Oracle eBusiness Suite and BizTalk 2006

    In this post I will give some pointers how to set up a couple of things so you are able to integrate Oracle database/Oracle eBusiness Suite with BizTalk Server 2006. The adapters can be downloaded here. To install and configure them Microsoft also released documentation. The adapter uses databases through ODBC and runs on W2K, W2K3 and XP. And Oracle client 9.2 at least is required which includes the Oracle ODBC Driver (update to driver 9.2.0.5.4). Installation of the client can be found in the documentation provided in the link above. After installation of the client, ODBC connection has to be setup. Here comes the tricky part. As soon one chooses System DSN, the name should exact ba as the TNS name i.e. mytnsname (TNS) mytnsname (DSN), see picture below.
















    As soon as this all behind you next thing to do is setting up a receive location to use the adapter. The following link gives you a very good explanation how to do this. At the end of this blog post a simple orchestration is shown.

    I have created a slightly different orchestration, where one can place the query xml message in a receive location (FILE) like:






    Query will be fired against Oracle database. The result will be received and bracket will be stripped, because they give problems with xpath queries or splitting the records in xml document into single messages using the splitter pattern. Using the log4net component one can log to database, file etcetera. Go to log4net to get that open-source project and the extension for BizTalk can be found at Scott Colestocks blog. Going through al this stuff I can now integrate easily with Oracle database/Oracle eBusiness Suite. One needs support though from an Oracle DBA to get the proper rights to schemas, where one want retrieve data from.

    Technorati: