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 sample filters, modifies, and transforms messages using code written in C#. You can use the .NETCompute node on Microsoft Windows® brokers to construct output messages and interact with the Microsoft .NET framework (.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 Word document. 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 Word, you can download and install the Microsoft Word Viewer and the Microsoft Office Compatibility Pack:
- Download Microsoft Word Viewer.
- Launch wordview_en-us.exe, accept the licence terms, click Continue, accept additional licence terms, and then click Next.
- Choose an install location or accept the default:
C:\Program Files\Microsoft Office\. - Wait for the installation to complete and then click OK twice to exit the installer.
- Download Microsoft Office Compatibility Pack.
- Launch FileFormatConverter.exe, accept the licence terms, and click Continue.
- Wait for the installation to complete and then click OK.






