Before you start
IBM® WebSphere® Message Broker V8 (hereafter called Message Broker) provides the capability to integrate with existing Microsoft® .NET® Framework (hereafter called .NET) applications. You can do this integration by wiring the new Message Broker .NETCompute node into a message flow, or by calling a .NET application from an ESQL Compute node. This series of tutorials shows you how to use the .NETCompute node integration technique.
This series of four tutorials shows you how to write and build C# code in Microsoft Visual Studio 2010 (either Express Edition or Professional Edition) using an embedded template provided by WebSphere Message Broker Toolkit. The four tutorials explore the following topics:
- Using the .NETCompute node sample
- Using the .NETCompute node to integrate with Microsoft Word
- Using the .NETCompute node to integrate with Microsoft Excel
- Using the .NETCompute node for exception handling
This .NETCompute node scenario receives inbound files and then uses code written in C# to interact with the logical message tree and a Microsoft Excel spreadsheet. You can use the .NETCompute node on Microsoft Windows brokers to construct output messages and to interact with .NET or Component Object Model (COM) applications.
WebSphere Message Broker enables you to host and run .NET code inside an execution group. The new .NETCompute node routes or transforms messages by using any Common Language Runtime (CLR) compliant .NET programming language, such as C#, Visual Basic (VB), F#, or C++/Common Language Infrastructure (CLI). This tutorial describes the new .NET API provided by WebSphere Message Broker, which enables .NET developers to interact with Message Broker's logical tree.
Prerequisites and system requirements
This tutorial is written for WebSphere Message Broker programmers who want to learn about the new .NETCompute node, and for .NET programmers who want to learn about using WebSphere Message Broker. If you have a general familiarity with C# or with Message Broker, then you should find the tutorial relatively easy to complete.
To build and execute the example in this tutorial, you will need:
- A Windows installation that includes Microsoft .NET Framework V4
- WebSphere Message Broker (Toolkit and Runtime) V8
- Microsoft Visual Studio 2010 (Express Edition or Professional Edition) to write and build the required C# code
The C# code in this tutorial takes data from the Message Broker logical tree and uses it to create a Microsoft Excel spreadsheet. The code uses the Open XML Format SDK (Version 2), which is an API for the .NET Framework that enables developers in both client and server environments to interact with Microsoft Word. Before starting the tutorial:
- Download Microsoft Open XML SDK V2.
- Launch OpenXMLSDKv2.msi, click Next on the splash panel, and accept the license agreement.
- Choose an install location or accept the default:
C:\Program Files\Open XML SDK\V2.0\. - Confirm the settings, wait for the installation to complete, and then click Close.
If you do not have a full copy of Microsoft Excel, you can download and install the Microsoft Excel Viewer and the Microsoft Office Compatibility Pack:
- Download the Microsoft Excel Viewer.
- Launch ExcelViewer.exe, accept the licence terms, click Next, accept additional licence terms, and then click Next.
- Use the suggested default install location:
C:\Program Files\Microsoft Office\and click Install. - Wait for the installation to complete and then click OK.
- Download the Microsoft Office Compatibility Pack.
- Launch FileFormatConverter.exe, accept the licence terms, and then click Continue.
- Wait for the installation to complete and then click OK.
This tutorial provides instructions to create and execute all elements of the scenario. To test the scenario, you can download test data at the bottom of the article. Unzip the download file and use it as explained below. No further downloads are required in order to complete this tutorial.



