Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Using Microsoft .NET in WebSphere Message Broker V8: Part 2: Integrating with Microsoft Word

Ben Thompson (bthomps@uk.ibm.com), Consulting IT Specialist, IBM
Author photo
Ben Thompson is a Consulting IT Specialist working on the WebSphere Message Broker development team at the IBM Hursley Software Lab in the UK. He is currently working on the design and implementation of .NET support in Message Broker. In the past, he has worked for IBM Software Services for WebSphere designing and implementing WebSphere solutions for IBM customers worldwide. You can contact Ben at bthomps@uk.ibm.com.
(An IBM developerWorks Contributing Author)
Matthew Golby-Kirk (mgk@uk.ibm.com), Software Developer, IBM
Matthew Golby-Kirk photo
Matthew Golby-Kirk is a software developer working on the WebSphere Message Broker development team at the IBM Hursley Software Lab in the UK. He works on the design and implementation of the HTTP and Web services support, along with the ESQL language run time in WebSphere Message Broker. You can contact Matthew at mgk@uk.ibm.com.

Summary:  This series of four tutorials demonstrates the new support for Microsoft .NET in WebSphere Message Broker V8. Part 2 describes integration with Microsoft Word. Readers should be familiar with either Microsoft .NET or WebSphere Message Broker but need not be familiar with both.

View more content in this series

Date:  18 Jan 2012
Level:  Intermediate

Comments:  

Creating the message flow

Download the zip file at the bottom of the article and extract the contents into the directory C:\student\DOTNET\lab_msword.

  1. Assuming that the WebSphere Message Broker Toolkit has not yet been started, from the Start menu, choose Start => Programs => IBM WebSphere Message Broker Toolkit => IBM WebSphere Message Broker Toolkit 8.0 => WebSphere Message Broker Toolkit 8.0. You will be asked for the location of a workspace -- the rest of this tutorial assumes that you are using C:\student\DOTNET\lab_msword\workspace.
  2. Close the Welcome screen and from your empty workspace, launch the Quick Start wizard: Click Start from WSDL and/or XSD, as shown below with the red box. If you have chosen to use your own existing workspace, you can also launch the Quick Start menu by clicking on the New link at the top of the Broker Development view on the left side of the window:

    Quick Start menu
  3. The Quick Start wizard requires an application name for the application in which the message flow and Web service definition will be located. Specify the name App_DotNet_MSWord and click Next:

    Quick Start wizard
  4. On the next panel, select Use external resources and navigate to the artifacts provided in the download file. If you have followed the instructions so far, you will find them in the directory C:\student\DOTNET\lab_msword. Select the Order.wsdl file, which contains the Web service definition, and then click Next:

    Quick Start wizard
  5. On the final Binding Selection panel, accept the default settings, which will import the OrderSoapHttpBinding (the WSDL file contains only one binding!). Click Finish:

    Binding selection
  6. When the wizard completes, you will see that a new application that contains the imported WSDL file and the XML schema file that it references. In the next step, you will use the WSDL file to generate the message flow contents, as described by the pop-up box that the Message Broker Toolkit displays on completing the wizard:

    Drag and drop results
  7. The message flow file MyFlow.msgflow should already be open in the WebSphere Message Broker Toolkit. Drag the WSDL file Order.wsdl and drop it on to the message flow canvas. The Configure New Web Service Usage wizard opens. The WSDL file is used to describe an interface to the flow and expose it as a Web service. Leave all of the default settings and click Finish:

    Configure nNew Web service usage
  8. The Broker Toolkit generates a message flow that has been populated with a SOAP Input node, a SOAP Reply node, and a subflow named Order. The subflow extracts the body of the SOAP message and places it in the XMLNSC message domain, before returning to the main flow. In its current state, the message flow leaves a gap between the subflow and the SOAP Reply node. It is in this gap that you place a transformation that generates the Microsoft Word document, and also produces a reply message of the correct format, which is passed to the SOAP Reply node to send back to the Web service client:

    MyFlow.msgflow at creation time
  9. Place a .NETCompute node from the Transformation drawer of the flow palette into the message flow between the Order subflow node and the SOAPReply node. Wire the node terminals as shown below:

    MyFlow.msgflow with .NETCompute node added
  10. Right-click the .NETCompute node and select Open Microsoft Visual Studio to launch Microsoft Visual Studio, which you will use to develop the C# code that the .NETCompute node will use to integrate with the logical message tree and create the Microsoft Word document:

    Open Microsoft Visual Studio menu option

You will return to the message flow once you have written and built the C# code in Microsoft Visual Studio.

3 of 9 | Previous | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=785520
TutorialTitle=Using Microsoft .NET in WebSphere Message Broker V8: Part 2: Integrating with Microsoft Word
publish-date=01182012
author1-email=bthomps@uk.ibm.com
author1-email-cc=
author2-email=mgk@uk.ibm.com
author2-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).