TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter...

37
TIBCO ActiveMatrix® Adapter Service Engine for WebSphere MQ Examples Software Release 6.0 April 2009

Transcript of TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter...

Page 1: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

TIBCO ActiveMatrix® Adapter Service Engine for WebSphere MQ

ExamplesSoftware Release 6.0April 2009

Page 2: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

Important Information

SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED OR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (OR PROVIDE LIMITED ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THE EMBEDDED OR BUNDLED SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANY OTHER TIBCO SOFTWARE OR FOR ANY OTHER PURPOSE.USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS AND CONDITIONS OF A LICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTED SOFTWARE LICENSE AGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THE CLICKWRAP END USER LICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOAD OR INSTALLATION OF THE SOFTWARE (AND WHICH IS DUPLICATED IN LICENSE.PDF) OR IF THERE IS NO SUCH SOFTWARE LICENSE AGREEMENT OR CLICKWRAP END USER LICENSE AGREEMENT, THE LICENSE(S) LOCATED IN THE “LICENSE” FILE(S) OF THE SOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMS AND CONDITIONS, AND YOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND AN AGREEMENT TO BE BOUND BY THE SAME.This document contains confidential information that is subject to U.S. and international copyright laws and treaties. No part of this document may be reproduced in any form without the written authorization of TIBCO Software Inc.TIB, TIBCO, TIBCO Adapter, TIBCO ActiveMatrix, Predictive Business, Information Bus, The Power of Now, TIBCO ActiveMatrix BusinessWorks, TIBCO Rendezvous, TIBCO Administrator, TIBCO Designer, TIBCO Runtime Agent, TIBCO Hawk, TIBCO Enterprise Message Service, TIBCO Designer Add-in for TIBCO Business Studio, TIBCO ActiveMatrix Service Grid, TIBCO ActiveMatrix Service Bus, TIBCO ActiveMatrix BusinessWorks Service Engine, TIBCO ActiveMatrix Administrator, TIBCO ActiveEnterprise, and TIBCO Business Studio, are either registered trademarks or trademarks of TIBCO Software Inc. in the United States and/or other countries.EJB, Java EE, J2EE, and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.All other product and company names and marks mentioned in this document are the property of their respective owners and are mentioned for identification purposes only.THIS SOFTWARE MAY BE AVAILABLE ON MULTIPLE OPERATING SYSTEMS. HOWEVER, NOT ALL OPERATING SYSTEM PLATFORMS FOR A SPECIFIC SOFTWARE VERSION ARE RELEASED AT THE SAME TIME. SEE THE README.TXT FILE FOR THE AVAILABILITY OF THIS SOFTWARE VERSION ON A SPECIFIC OPERATING SYSTEM PLATFORM.THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCO SOFTWARE INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME.THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY OR INDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE, INCLUDING BUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.Copyright © 1999-2009 TIBCO Software Inc. ALL RIGHTS RESERVED.TIBCO Software Inc. Confidential Information

Page 3: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

| iii

Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v

Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viTIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Documentation . . . . . . . . . . . . . . . . . . . . viOther TIBCO Product Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiThird-Party Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii

Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii

How to Contact TIBCO Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi

Chapter 1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Chapter 2 Running the Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Example for Configuring an Eclipse Project and Wiring It with SOAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Example Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Setting Up the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Running the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Example for Configuring an Eclipse Project and Wiring It with BWSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Example Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Setting Up the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Running the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Expected Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 4: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

iv | Contents

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 5: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

| v

Preface

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ enables WebSphere MQ applications to exchange data with applications configured for the TIBCO environment. This document describes the scenarios and operations used in the examples and explains how to run the examples.

Topics

• Related Documentation, page vi

• Typographical Conventions, page viii

• How to Contact TIBCO Support, page xi

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 6: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

vi | Related Documentation

Related Documentation

This section lists documentation resources you may find useful.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ DocumentationThe following documents form the TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ documentation set:

• TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Installation Read this manual for instructions on how to install and uninstall the adapter SE on Windows and UNIX platforms.

• TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Configuration and Deployment Read this manual to learn how to create and configure adapter projects. Information on deploying adapter projects is also included.

• TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples Read this manual to work through the examples provided with the adapter SE.

• TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Release Notes Read the release notes for information about new features, changed features, and open and closed issues.

Before TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ can be installed and used, you must install TIBCO ActiveMatrix Adapter for WebSphere MQ. The following documents form the TIBCO ActiveMatrix Adapter for WebSphere MQ documentation set:

• TIBCO ActiveMatrix Adapter for WebSphere MQ Concepts Read this manual before reading any other book in the documentation set. This manual describes the adapter, adapter features, and the applications with which the adapter interacts.

• TIBCO ActiveMatrix Adapter for WebSphere MQ Installation Read this manual for instructions on how to install and uninstall the standalone adapter on Windows and UNIX platforms.

• TIBCO ActiveMatrix Adapter for WebSphere MQ Configuration and Deployment Read this manual to learn how to create and configure standalone adapter projects. Information on deploying adapter projects is also included.

• TIBCO ActiveMatrix Adapter for WebSphere MQ Examples Read this manual to work through the examples provided with the adapter.

• TIBCO ActiveMatrix Adapter for WebSphere MQ Release Notes Read the release notes for information about new features, changed features, and open and closed issues.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 7: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

Preface | vii

Other TIBCO Product DocumentationYou may find it useful to read the documentation for the following TIBCO products:

• TIBCO ActiveMatrix® Administrator

• TIBCO ActiveMatrix BusinessWorks™

• TIBCO ActiveMatrix BusinessWorks™ Service Engine

• TIBCO ActiveMatrix® Service Grid

• TIBCO ActiveMatrix® Service Bus

• TIBCO Business Studio™

• TIBCO Enterprise Message Service™

• TIBCO Hawk®

• TIBCO Rendezvous®

• TIBCO Runtime Agent™

Third-Party DocumentationYou may also find it useful to read the following IBM WebSphere MQ documentation:

• WebSphere MQ Quick Beginnings

• WebSphere MQ System Administration

• WebSphere MQ Application Programming Reference

• WebSphere MQ Application Programming Guide

• WebSphere MQ MQSC Command Reference

• WebSphere MQ Clients

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 8: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

viii | Typographical Conventions

Typographical Conventions

The following typographical conventions are used in this manual.

Table 1 General Typographical Conventions

Convention Use

TIBCO_HOME

ENV_HOME

AMX_HOME

ADMQS_HOME

Many TIBCO products must be installed within the same home directory. This directory is referenced in documentation as TIBCO_HOME. The value of TIBCO_HOME depends on the operating system. For example, on Windows systems, the default value is C:\tibco .

Other TIBCO products are installed into an installation environment. Incompatible products and multiple instances of the same product are installed into different installation environments. The directory into which such products are installed is referenced in documentation as ENV_HOME. The value of ENV_HOME depends on the operating system. For example, on Windows systems the default value is C:\tibco.

TIBCO ActiveMatrix installs into a directory within TIBCO_HOME. This directory is referenced in documentation as AMX_HOME. The value of AMX_HOME depends on the operating system. For example on Windows systems, the default value is C:\tibco\amx\ .

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ installs in a directory within AMX_HOME.

TIBCO ActiveMatrix Adapter for WebSphere MQ installs into a directory within TIBCO_HOME. This directory is referenced in documentation as ADMQS_HOME. The value of ADMQS_HOME depends on the operating system. For example on Windows systems, the default value is C:\tibco\adapter\admqs\6.0 .

code font Code font identifies commands, code examples, filenames, pathnames, and output displayed in a command window. For example:

Use MyCommand to start the foo process.

bold code

font

Bold code font is used in the following ways:

In procedures, to indicate what a user types. For example: Type admin .

In large code samples, to indicate the parts of the sample that are of particular interest.

In command syntax, to indicate the default parameter for a command. For example, if no parameter is specified, MyCommand is enabled: MyCommand [enable | disable]

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 9: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

Preface | ix

italic font Italic font is used in the following ways:

To indicate a document title. For example: See TIBCO ActiveMatrix BusinessWorks Concepts.

To introduce new terms For example: A portal page may contain several portlets. Portlets are mini-applications that run in a portal.

To indicate a variable in a command or code syntax that you must replace. For example: MyCommand PathName

Key combinations

Key name separated by a plus sign indicate keys pressed simultaneously. For example: Ctrl+C.

Key names separated by a comma and space indicate keys pressed one after the other. For example: Esc, Ctrl+Q.

The note icon indicates information that is of special interest or importance, for example, an additional action required only in certain circumstances.

The tip icon indicates an idea that could be useful, for example, a way to apply the information provided in the current section to achieve a specific result.

The warning icon indicates the potential for a damaging situation, for example, data loss or corruption if certain steps are taken or not taken.

Table 1 General Typographical Conventions (Cont’d)

Convention Use

Table 2 Syntax Typographical Conventions

Convention Use

[ ] An optional item in a command or code syntax.

For example:

MyCommand [optional_parameter] required_parameter

| A logical OR that separates multiple items of which only one may be chosen.

For example, you can select only one of the following parameters:

MyCommand para1 | param2 | param3

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 10: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

x | Typographical Conventions

{ } A logical group of items in a command. Other syntax notations may appear within each logical group.

For example, the following command requires two parameters, which can be either the pair param1 and param2 , or the pair param3 and param4 .

MyCommand {param1 param2} | {param3 param4}

In the next example, the command requires two parameters. The first parameter can be either param1 or param2 and the second can be either param3 or param4 :

MyCommand {param1 | param2} {param3 | param4}

In the next example, the command can accept either two or three parameters. The first parameter must be param1 . You can optionally include param2 as the second parameter. And the last parameter is either param3 or param4 .

MyCommand param1 [param2] {param3 | param4}

Table 2 Syntax Typographical Conventions

Convention Use

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 11: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

Preface | xi

How to Contact TIBCO Support

For comments or problems with this manual or the software it addresses, please contact TIBCO Support as follows.

• For an overview of TIBCO Support, and information about getting started with TIBCO Support, visit this site:

http://www.tibco.com/services/support

• If you already have a valid maintenance or support contract, visit this site:

https://support.tibco.com

Entry to this site requires a user name and password. If you do not have a user name, you can request one.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 12: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

xii | How to Contact TIBCO Support

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 13: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

Introduction | 1

Chapter 1 Introduction

The examples in this manual demonstrate how to deploy and run the adapter in the TIBCO ActiveMatrix Environment.

Topics

• Overview, page 2

• Prerequisites, page 3

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 14: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

2 | Chapter 1 Introduction

Overview

There are two services per instance:

• The Subscriber example uses None as its conversion type.

• The RPC Server example uses None as both its request conversion type and reply conversion type.

Subscriber

1. Get the inbound message.

2. Put the message in the WebSphere MQ queue Q2 in QManager as defined in the inbound message.

RPC Server

1. Get the inbound message.

2. Put the message in the WebSphere MQ queue Q4 in QManager as defined in the inbound message.

3. Get the message from the WebSphere MQ queue Q5 in QManager as defined in the inbound message., then put the message in TIBCO environment.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 15: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

Prerequisites | 3

Prerequisites

To run the examples, install the following software:

• WebSphere MQ Client/Server

• TIBCO Rendezvous

• TIBCO ActiveMatrix BusinessWorks

• TIBCO Enterprise Message Service

• TIBCO ActiveMatrix Adapter for WebSphere MQ

• TIBCO Hibernate

• TIBCO ActiveMatrix Service Grid

• TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ

• TIBCO Designer Add-in for TIBCO business Studio (BWSE example only)

• TIBCO ActiveMatrix BusinessWorks Service Engine (BWSE example only)

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 16: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

4 | Chapter 1 Introduction

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 17: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

| 5

Chapter 2 Running the Examples

This chapter explains how to run the pre configured examples. These examples ship with Readme files that explain the scenarios and usage of the examples. The examples are available at AMX_HOME\extensions\admqse\6.0\samples .

Topics

• Example for Configuring an Eclipse Project and Wiring It with SOAP, page 6

• Example for Configuring an Eclipse Project and Wiring It with BWSE, page 15

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 18: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

6 | Chapter 2 Running the Examples

Example for Configuring an Eclipse Project and Wiring It with SOAP

Example DescriptionThis example shows how to configure a WebSphere MQ Adapter project in TIBCO Business Studio, wire it with SOAP services and run it in TIBCO ActiveMatrix Administrator. The example is available at AMX_HOME\extensions\admqse\6.0\samples\AMX_SOAP.

Setting Up the ExampleTo set up the environment for the example, you need complete the following tasks:

• Task A, Configure the environment variable, page 6

• Task B, Create Queue Manager and queues, page 7

• Task C, Configure the Environment for TIBCO ActiveMatrix, page 7

• Task D, Import Adapter project and SOA project, page 8

To create a new SOA project instead of using the pre configured one, proceed with Task E to Task H.

• Task E, Create a SOA Project, page 9

• Task F, Generate the Adapter WSDL, page 9

• Task G, Configure the SOA project, page 9

• Task H, Create Service Assembly, page 10

Task A Configure the environment variable

1. Select Start > Control Panel. Double-click System.

2. In the System Properties dialog, click the Advanced tab.

3. Click the Environment Variables button.

4. Select the user variable named PATH and click Edit. If the PATH variable does not exist, click New and define a variable named PATH .

5. In the variable value field, enter the directories of the TIBCO Rendezvous bin and the IBM WebSphere MQ bin. For example, TIBCO_HOME\tibrv\8.1\bin;C:\Program Files\IBM\WebSphere MQ\bin . Click OK.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 19: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

Example for Configuring an Eclipse Project and Wiring It with SOAP | 7

6. Click OK and OK again to exit.

Task B Create Queue Manager and queues

1. Start WebSphere MQ Explorer.

2. Create a Queue Manager named QManager if it does not already exist.

3. Under QManager, create six queues named Q1 , Q2 , Q3 , Q4 , Q5 , and ErrorQ if they do not already exist.

4. Launch a tool that can get a request message from queue Q4 and put a reply message in queue Q5 .

You can use the MqGetPut.exe file in the directory ADMQS_HOME\6.0\examples\DynamicQueue_SubAndRpc\MQappForRPC . This tool is only available for WebSphere MQ Server (Windows only).

Or

You can compile the file yourself. For details, see the HowToCompile.txt file in the following directory:

ADMQS_HOME\6.0\examples\DynamicQueue_SubAndRpc\MQappForRPC\src

Task C Configure the Environment for TIBCO ActiveMatrix

If the environment for TIBCO ActiveMatrix has not been configured, do the following:

1. Start HSQLDB.

— Run AMX_HOME\amx\hsqldb\bin\amx-db.exe .

Or

— (Windows only) Select start > All Programs > TIBCO > TIBCO ActiveMatrix 2.1 > Start HSQLDB Server.

2. Create a TIBCO ActiveMatrix Administrator Server with Admin Server Creation Wizard if it is the first time for you to configure the environment.

3. Start Management Daemon.

— Run AMX_HOME\managementdaemon\2.0\bin\managementdaemon.exe .

Or

— (Windows only) Select start > All Programs > TIBCO > TIBCO Management Daemon 2.0 > Management Daemon.

4. Start TIBCO ActiveMatrix Administrator.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 20: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

8 | Chapter 2 Running the Examples

Run AMX_HOME\amxadministrator\2.1\bin\amx_admin.bat .

5. Start the TIBCO ActiveMatrix Administrator Server in a web browser:

— Run AMX_HOME\amxadministrator\data\bootstrap.html .

Or

— (Windows only) Select start > All Programs > TIBCO > TIBCO ActiveMatrix 2.1 > Administrator Servers.

After starting the TIBCO ActiveMatrix Administrator Server, create your admin environment and node with Administrator Server Creation Wizard or in a web browser. The following steps are about how to do it in a web browser.

6. Create an Environment in a web browser:

a. Click Perspective and select Configure Enterprise Assets.

b. Click New to create a new Environment.

c. Click the new environment, and then click Messaging Bus.

d. Click Add to create an Messaging Server for each node.

e. Click Machines to associate this environment with a machine.

f. Verify the containers in the Machines area. It should include six types of containers: SOAP, Service Bus Mediation , JMS , Adapter for WebSphere MQ , Java , and .NET.

7. Create a Node for Environment in a web browser:

a. Click Perspective and select Configure an Environment.

b. Choose the Environment.

c. Click New to create a new node. Enter relational information for the node. The highlighted text boxes are mandatory.

d. Click Default Connector to modify the connector port.

e. Verify the container for the node.

f. Click Install.

Task D Import Adapter project and SOA project

To import the Adapter project and SOA project into the TIBCO Business Studio:

If ActiveMatrix Service Grid is installed within TIBCO Runtime Agent, the AMX_HOME should be TIBCO_HOME.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 21: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

Example for Configuring an Eclipse Project and Wiring It with SOAP | 9

1. Start TIBCO Business Studio.

2. From the File menu, select Import.

3. In the Import dialog, select General > Existing Projects into Workspace. Click Next.

4. In the Import dialog, check the Select archive file radio button, browse to find and select the archive file, DynamicQueueProjects.zip , at the example’s directory. Click OK.

5. Ensure that the Adapter Project DynamicQueue and the SOA Project SoaDynamicQueue have been selected in the Projects pane. Click Finish.

If you want to create a new SOA project instead of using the pre configured one, proceed with following tasks.

Task E Create a SOA Project

To create a new SOA project, do the following:

1. From the File menu, select New > Project.

2. In the New Project dialog, expand TIBCO ActiveMatrix > ActiveMatrix SOA Project, click Next.

3. Name the SOA Project as SoaDynamicQueue . Click Next.

4. Click Finish.

Task F Generate the Adapter WSDL

1. In the Project Explorer, right-click the WebSphereMQAdapterConfigurationSubRpc.admqmodel item under the imported Designer project DynamicQueue .

2. Select Generate Adapter WSDL from the shortcut menu.

3. In the Target Project dialog, select the SOA project as the matching resource. Click OK.

Task G Configure the SOA project

1. In the Project Explorer, select the SOA project SoaDynamicQueue , expands the Composites folder, and then double-click SoaDynamicQueue.composite.

2. In the editor view of the composite, drag an MQAdapter component from the Palette to the Components column. Name the MQAdapter component MQAdapter.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 22: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

10 | Chapter 2 Running the Examples

3. Associate the MQAdapter component with the MQAdapter services.

a. In the editor view of the composite, select the MQAdapter component.

b. In the Properties view, click the Services tab.

c. Click Add and select the corresponding WSDL file. Click OK.

4. Drag a SOAP Service from the Palette to the Services column, name it as Sub . Drag another SOAP Service and name it as Rpc .

5. Associate SOAP Service with Subscriber and RPC Server in the MQAdapter component. Ensure that the different SOAP services are associated with the correct MQAdapter Service.

6. Right-click the Shared Resources folder, expand New > HTTP Server, and then click Finish. Change the HTTP Server port to avoid conflict if necessary.

7. Configure the Composite Shared Resource.

a. Double-click the Composite file SoaDynamicQueue.composite.

b. Select the Shared Resource Profiles from the left hand list of Composite Properties page.

c. Create a new Profiles record which is targeted to the HTTP Server shared resource created previously.

8. Generate WSDL from the SOAP Services Sub and Rpc . These WSDL files will be used for configuring processes in Designer Project.

For each SOAP Service:

a. Select the service.

b. In the Properties perspective, select Binding.

c. Click Generate WSDL.

Create two WSDL Activities Sub_WSDL and Rpc_WSDL in TIBCO Designer. Overwrite the WSDL Activities file text with the corresponding WSDL file's text created in the step above.

Task H Create Service Assembly

1. In the Project Explorer, right-click the composite file SoaDynamicQueue.composite, and then select Service Assembly from the shortcut menu. Save the composite if prompted.

In this example, the processes have previously been configured, so you can skip this step.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 23: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

Example for Configuring an Eclipse Project and Wiring It with SOAP | 11

2. Expand the Deployment Packages folder, right-click SoaDynamicQueue.saf, and then select Build Archive from the shortcut menu. Save the file if prompted.

When the building process finished, you can see an SoaDynamicQueue.zip file created in the Deployment packages folder. This is the SA Project to be deployed to TIBCO ActiveMatrix Administrator.

Running the ExampleTo run the example, you need complete the following tasks:

• Task A, Start TIBCO Enterprise Message Service Server, page 11

• Task B, Deploy an SA File, page 11

• Task C, Start Node and Install Shared Resources, page 12

• Task D, Install and Start the SA Project, page 12

• Task E, Import the Designer Project, page 12

• Task F, Run the processes included in the project, page 13

Task A Start TIBCO Enterprise Message Service Server

To start TIBCO Enterprise Message Service Server:

1. Go to the EMS_HOME\bin directory.

2. Run the following command at the command prompt:

tibemsd.exe

Task B Deploy an SA File

To deploy the SA project (the ZIP file) in TIBCO ActiveMatrix Administrator:

1. Select the Deploy to an Environment perspective.

2. Choose the Environment, and then click Upload Service Assembly.

You can also use the SoaDynamicQueue.zip file located in the folder instead of creating a new one.

Before proceeding, ensure that the HSQLDB, Management Daemon, TIBCO ActiveMatrix Administrator, and TIBCO ActiveMatrix Administrator Server in a web browser are running.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 24: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

12 | Chapter 2 Running the Examples

3. In the Name field, enter a name for the SA.

4. Click Browse to select an archived ZIP file (the SA project) which was generated in TIBCO Business Studio.

5. Select the Import Shared Resource Definitions check box to create the shared resources definitions.

6. Click OK.

7. In the Service Assemblies panel, select the service assembly.

8. Click Service Units.

9. For each service unit in the service assembly, do the following:

a. Select a service unit in the Service Units table.

b. In the Node Mapping tab, select the nodes that you want to deploy the service unit to in the Available Nodes list, and then click the right arrow button. The nodes will appear in the Mapped Nodes list.

c. Click Save.

Task C Start Node and Install Shared Resources

If an ActiveMatrix Service (JMS, SOAP, or AMX) is included in the SA project, you need install the corresponding Shared Resource for the appropriate node.

1. In the web browser, select Configure an Environment in the Perspective drop-down list, and then select the appropriate Environment.

2. In the Nodes table, select the appropriate node. Click Start.

3. In the Node Detail panel, select Shared Resources.

4. Enable the corresponding shared resource HTTP Server Shared Resource and install it.

Task D Install and Start the SA Project

1. Select the SA Project in TIBCO ActiveMatrix Administrator, and then click Install.

2. Ensure that the status of the SA project is installed/stop . Select the SA project, and then click Start.

Task E Import the Designer Project

1. Start TIBCO Designer.

2. Create a new, empty project.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 25: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

Example for Configuring an Eclipse Project and Wiring It with SOAP | 13

3. From the Project menu, select Import Full Project.

4. In the Import Project dialog, click the ZIP Archive tab, and then browse to select the BW.zip file. Click OK.

5. In the Import - Options dialog, select the Replace existing global variables with those in import and Overwrite on name conflict radio buttons. Click Apply.

6. Save the project.

Task F Run the processes included in the project

1. In TIBCO Designer, select the Tester panel.

2. Run the process SubscriptionServiceProcess.

3. Run the process RequestResponseServiceProcess.

Expected ResultsThe expected results are as following:

• The processes defined in Designer Project work well.

• The data has been put into the corresponding queue and has returned a corresponding reply message.

• The following messages are added to log file ADMQS_HOME/6.0/fileSink :

2008 Dec 26 12:07:38:656 GMT +8 WebSphereMQ.WebSphereMQAdapterConfigurationSubRpc Info [Adapter] AEMQSC-001005Data conversion was successful for the service SubscriptionService.tracking=#-0Y--C--GJFMWUb2-2Zwk8UKR-EVg#2008 Dec 26 12:07:38:687 GMT +8 WebSphereMQ.WebSphereMQAdapterConfigurationSubRpc Info [Adapter] AEMQSC-001001The message has been successfully put on the queue: Q2:QManagerService Name: SubscriptionServicetracking=#-0Y--C--GJFMWUb2-2Zwk8UKR-EVg#

To run the adapter on WebSphere MQ Client, set the environment variables as mentioned in the WebSphere MQ documentation before starting the adapter. For further information, see Running Applications on WebSphere MQ Clients in the WebSphere MQ documentation.

The order for running process cannot be changed, otherwise, the messages added to the log file will be out of order.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 26: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

14 | Chapter 2 Running the Examples

2008 Dec 26 12:09:54:968 GMT +8 WebSphereMQ.WebSphereMQAdapterConfigurationSubRpc Info [Adapter] AEMQSC-001008The request message was successfully placed in the request queue Q4:QManagerWaiting for a response at the reply queue Q5 for 100 milliseconds...tracking=#GIE--4--GJFN2UwU-2aFk8UKR-EVg#2008 Dec 26 12:09:54:968 GMT +8 WebSphereMQ.WebSphereMQAdapterConfigurationSubRpc Info [Adapter] AEMQSC-001007The adapter got reply from the REPLY queue Q5Service: RequestResponseService tracking=#GIE--4--GJFN2UwU-2aFk8UKR-EVg#

The date and tracking messages are different, depending on the runtime information.

The adapter SE puts the message in the queue dynamically depending on the message content and without regard to the project configuration.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 27: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

Example for Configuring an Eclipse Project and Wiring It with BWSE | 15

Example for Configuring an Eclipse Project and Wiring It with

BWSE

Example DescriptionThis example shows how to configure a WebSphere MQ Adapter project in TIBCO Business Studio, wire it with BWSE using partner link and run it in TIBCO ActiveMatrix Administrator. The example is available at AMX_HOME\extensions\admqse\6.0\samples\AMX_BWSE .

Setting Up the ExampleTo set up the environment for the example, you need complete the following tasks:

• Task A, Configure the environment variable, page 15

• Task B, Create Queue Manager and queues, page 16

• Task C, Configure the Environment for TIBCO ActiveMatrix, page 16

• Task D, Import Adapter Project, SOA Project, and Designer Project, page 18

To create a new SOA project and Designer project instead of using the pre configured one, proceed with Task E to Task H.

• Task E, Create a SOA Project, page 18

• Task F, Generate the Adapter WSDL, page 19

• Task G, Create a Designer project in TIBCO Business Studio, page 19

• Task H, Configure the SOA project and the Designer project, page 19

• Task I, Create Service Assembly, page 21

Task A Configure the environment variable

1. Select Start > Control Panel. Double-click System.

2. In the System Properties dialog, click the Advanced tab.

3. Click the Environment Variables button.

4. Select the user variable named PATH and click Edit. If the PATH variable does not exist, click New and define a new variable named PATH .

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 28: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

16 | Chapter 2 Running the Examples

5. In the variable value field, enter the directories of the TIBCO Rendezvous bin and the IBM WebSphere MQ bin. For example, TIBCO_HOME\tibrv\8.1\bin;C:\Program Files\IBM\WebSphere MQ\bin . Click OK.

6. Click OK and OK again to exit.

Task B Create Queue Manager and queues

1. Start WebSphere MQ Explorer.

2. Create a Queue Manager named QManager if it does not already exist.

3. Under QManager, create six queues named Q1 , Q2 , Q3 , Q4 , Q5 , and ErrorQ if they do not already exist.

4. Launch a tool that can get a request message from queue Q4 and put a reply message in queue Q5 .

You can use the MqGetPut.exe file in the directory ADMQS_HOME\6.0\examples\DynamicQueue_SubAndRpc\MQappForRPC . This tool is only available for WebSphere MQ Server (Windows only).

Or

You can compile the file yourself. For details, see the HowToCompile.txt file in the following directory:

ADMQS_HOME\6.0\examples\DynamicQueue_SubAndRpc\MQappForRPC\src

Task C Configure the Environment for TIBCO ActiveMatrix

If the environment for TIBCO ActiveMatrix has not been configured, do the following:

1. Start HSQLDB.

— Run AMX_HOME\amx\hsqldb\bin\amx-db.exe .

Or

— (Windows only) Select start > All Programs > TIBCO > TIBCO ActiveMatrix 2.1 > Start HSQLDB Server.

2. Create a TIBCO ActiveMatrix Administrator Server with Admin Server Creation Wizard if it is the first time for you to configure the environment.

3. Start Management Daemon.

— Run AMX_HOME\managementdaemon\2.0\bin\managementdaemon.exe .

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 29: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

Example for Configuring an Eclipse Project and Wiring It with BWSE | 17

Or

— (Windows only) Select start > All Programs > TIBCO > TIBCO Management Daemon 2.0 > Management Daemon.

4. Start TIBCO ActiveMatrix Administrator.

Run AMX_HOME\amxadministrator\2.1\bin\amx_admin.bat .

5. Start the TIBCO ActiveMatrix Administrator Server in a web browser:

— Run AMX_HOME\amxadministrator\data\bootstrap.html .

Or

— (Windows only) Select start > All Programs > TIBCO > TIBCO ActiveMatrix 2.1 > Administrator Servers.

After starting the TIBCO ActiveMatrix Administrator Server, create your admin environment and node with Administrator Server Creation Wizard or in a web browser. The following steps are about how to do it in a web browser.

6. Create an Environment in a Web Browser:

a. Click Perspective and select Configure Enterprise Assets.

b. Click New to create a new Environment.

c. Click the new environment, and then click Messaging Bus.

d. Click Add to create a Messaging Server for each node.

e. Click Machines to associate this environment with a machine.

f. Verify the containers in the Machines area. It should include six types of containers: SOAP, Service Bus Mediation , JMS , Adapter for WebSphere MQ , Java , and .NET.

If ActiveMatrix Service Grid is installed within TIBCO Runtime Agent, the AMX_HOME should be TIBCO_HOME.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 30: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

18 | Chapter 2 Running the Examples

7. Create a Node for Environment in a Web Browser:

a. Click Perspective and select Configure an Environment.

b. Choose the Environment.

c. Click New to create a new node. Enter related information for the node. The highlighted text boxes are mandatory.

d. Click Default Connector to modify the connector port.

e. Verify the container for the node.

f. Click Install.

Task D Import Adapter Project, SOA Project, and Designer Project

To import the Adapter Project, SOA project, and Designer Project into TIBCO Business Studio:

1. Start TIBCO Business Studio.

2. From the File menu, select Import.

3. In the Import dialog, select General > Existing Projects into Workspace. Click Next.

4. In the Import dialog, check the Select archive file radio button, browse to find and select the archive file, DynamicQueueProjects.zip , at the example’s directory. Click OK.

5. Ensure that the Adapter Project DynamicQueue , the SOA Project SoaDynamicQueue , and the Designer Project BW have been selected in the Projects pane. Click Finish.

To create a new SOA project and Designer project instead of using the pre configured one, proceed with following tasks.

Task E Create a SOA Project

To create a new SOA project:

1. From the File menu, select New > Project.

2. In the New Project dialog, expand TIBCO ActiveMatrix > ActiveMatrix SOA Project, click Next.

3. Name the SOA Project as SoaDynamicQueue . Click Next.

4. Click Finish.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 31: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

Example for Configuring an Eclipse Project and Wiring It with BWSE | 19

Task F Generate the Adapter WSDL

1. In the Project Explorer, right-click the WebSphereMQAdapterConfiguration.admqmodel item under the imported project DynamicQueue .

2. Select Generate Adapter WSDL from the shortcut menu.

3. In the Target Project dialog, select the SOA project as the matching resource. Click OK.

Task G Create a Designer project in TIBCO Business Studio

To create a Designer project in TIBCO Business Studio, TIBCO Designer Add-in Business Studio (DABS) is used.

1. From the File menu, select New > Project.

2. In the New Project dialog, expand TIBCO Designer > TIBCO Designer Project. Click Next.

3. Name the project as BW. Click Finish.

Task H Configure the SOA project and the Designer project

1. In the Project Explorer, select the SOA project SoaDynamicQueue , expands the Composites folder, and then double-click SoaDynamicQueue.composite.

2. In the editor view of the composite, drag an MQAdapter component from the Palette to the Components column. Name the component as MQAdapter.

3. Associate the MQAdapter component with the MQAdapter services.

a. In the editor view of the composite, select the MQAdapter component.

b. In the Properties view, click the Services tab.

c. Click Add and select the corresponding WSDL file. Click OK.

4. Drag a BusinessWorks component from the Palette to the Components column and name the component as BusinessWorksRpc . Drag another BusinessWorks component to the Components column and name the new component as BusinessWorksSub .

The option TIBCO Designer Project is available only after the TIBCO Designer Add-in for TIBCO Business Studio software has been installed.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 32: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

20 | Chapter 2 Running the Examples

5. Import resources to the Designer Project BW.

a. In the Project Explorer, double-click the Designer Project BW.

b. From the Designer menu, select Project > Import Resources from File, Folder, URL.

c. In the Import Resource or File dialog, select Folder in the Format list, then select the schema folder in the SOA Project SoaDynamicQueue . Click OK.

d. Import the WebSphereMQAdapterConfiguration_genresources folder in the SOA Project SoaDynamicQueuein in the same way.

6. Configure the BusinessWorks component.

a. In the Project Explorer, double-click the composite file SoaDynamicQueue.composite under the SOA project SoaDynamicQueue .

b. In the editor view of the composite, select the RpcBusinessWorksRpc component.

c. In the Properties view, click the Implementation tab. Click Browse to select the project BW. An archive file will be created in project BW.

d. In the Properties view, click the References tab. Click Add. Expand the node in the Add Partner dialog, and then select the node RequestResponseService . Click Finish. A process file will be created in the Designer Project BW.

Configure the BusinessWorks component BusinessWorksSub in the same way, except in step d, select the node named SubscriptionService instead.

7. Associate BusinessWorks components with Subscriber and RPC Server in the MQAdapter component. Ensure that the different BusinessWorks components are associated to the correct MQAdapter Service.

8. Configure the process in the Designer Project BW.

a. Double-Click the process file in the Designer Project BW.

b. Change the start Activity to Timer Activity.

Right-Click in the Editor View of the process. Select Add Resource > General Activities> Timer. Ensure that the default Start Activity has been changed, otherwise, it will not work.

c. Create a Service Activity for the process.

Right-Click in the Editor View of the process. Select Add Resource > Service > Invoke Partner.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 33: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

Example for Configuring an Eclipse Project and Wiring It with BWSE | 21

Task I Create Service Assembly

1. In the Project Explorer, right-click the composite file SoaDynamicQueue.composite, and then select Service Assembly from the shortcut menu. Save the composite if prompted.

2. Expand the Deployment Packages folder, right-click SoaDynamicQueue.saf, and then select Build Archive from the shortcut menu. Save the file if prompted.

When the building process finished, you can see an SoaDynamicQueue.zip file created in the Deployment packages folder. This is the SA Project to be deployed to TIBCO ActiveMatrix Administrator.

Running the ExampleTo run the example, you need complete the following tasks:

• Task A, Start TIBCO Enterprise Message Service Server, page 21

• Task B, Deploy an SA File, page 21

• Task C, Start Node and Install Shared Resources, page 22

• Task D, Install and Start the SA Project, page 22

Task A Start TIBCO Enterprise Message Service Server

To start TIBCO Enterprise Message Service Server:

1. Go to the EMS_HOME\bin directory.

2. Run the following command at the command prompt:

tibemsd.exe

Task B Deploy an SA File

To deploy the SA project (the ZIP file) in TIBCO ActiveMatrix Administrator:

1. Select the Deploy to an Environment perspective.

You can also use the SoaDynamicQueue.zip file located in the folder instead of creating a new one.

Before proceeding, ensure that the HSQLDB, Management Daemon, TIBCO ActiveMatrix Administrator, and TIBCO ActiveMatrix Administrator Server in a web browser are running.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 34: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

22 | Chapter 2 Running the Examples

2. Choose the Environment, and then click Upload Service Assembly.

3. In the Name field, enter a name for the SA.

4. Click Browse to select an archived ZIP file (the SA project) which was generated in TIBCO Business Studio.

5. Select the Import Shared Resource Definitions check box to create the shared resources definitions.

6. Click OK.

7. In the Service Assemblies panel, select the service assembly.

8. Click Service Units.

9. For each service unit in the service assembly, do the following:

a. Select a service unit in the Service Units table.

b. In the Node Mapping tab, select the nodes that you want to deploy the service unit to in the Available Nodes list, and then click the right arrow button. The nodes will appear in the Mapped Nodes list.

c. Click Save.

Task C Start Node and Install Shared Resources

If an ActiveMatrix Service (JMS, SOAP, or AMX) is included in the SA project, you need install the corresponding Shared Resource for the appropriate node.

1. In the web browser, select Configure an Environment in the Perspective drop-down list, and then select the appropriate Environment.

2. In the Nodes table, select the appropriate node. Click Start.

3. In the Node Detail panel, select Shared Resources.

4. Enable the corresponding shared resource HTTP Server Shared Resource and install it.

Task D Install and Start the SA Project

1. Select the SA Project in TIBCO ActiveMatrix Administrator, and then click Install.

2. Ensure that the status of the SA project is installed/stop . Select the SA project, and then click Start.

Expected ResultsThe expected results are as follows:

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 35: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

Example for Configuring an Eclipse Project and Wiring It with BWSE | 23

• The data has been put into the corresponding queue and has returned a corresponding reply message.

• The following messages are added to the log file ADMQS_HOME/6.0/fileSink :

2009 Jan 20 18:17:48:009 GMT +8 WebSphereMQ.WebSphereMQAdapterConfiguration Info [Adapter] AEMQSC-001008The request message was successfully placed in the request queue

Q4:QManagerWaiting for a response at the reply queue Q5 for 100

milliseconds...tracking=#I76--D--GLKYn--Y-4MDk8USx-EVg#2009 Jan 20 18:17:48:009 GMT +8 WebSphereMQ.WebSphereMQAdapterConfiguration Info [Adapter] AEMQSC-001007The adapter got reply from the REPLY queue Q5Service: RequestResponseService tracking=#I76--D--GLKYn--Y-4MDk8USx-EVg#2009 Jan 20 18:17:50:009 GMT +8 WebSphereMQ.WebSphereMQAdapterConfiguration Info [Adapter] AEMQSC-001005Data conversion was successful for the service SubscriptionService.tracking=#Qwg--4--GLKYnU-Y-4MRk8USx-EVg#2009 Jan 20 18:17:50:009 GMT +8 WebSphereMQ.WebSphereMQAdapterConfiguration Info [Adapter] AEMQSC-001001The message has been successfully put on the queue: Q2:QManagerService Name: SubscriptionServicetracking=#Qwg--4--GLKYnU-Y-4MRk8USx-EVg#

The date and tracking messages are different, depending on the runtime information. And the message above will repeat every five seconds.

The adapter puts the message in the queue dynamically depending on the message content and without regard to the project configuration.

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 36: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

24 | Chapter 2 Running the Examples

TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ Examples

Page 37: TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... · TIBCO ActiveMatrix Adapter Service Engine for WebSphere MQ ... † WebSphere MQ Application Programming Reference

TIBCO ActiveMatrix Adapter for WebSphere MQ Examples

| 25

Index

B

BWSE 15

C

customer support xi

D

deploy the SA project 11

E

Environment 8environment variable 6, 15

N

Node 8

P

Prerequisites 3

R

RPC Server 2

S

SOAP 6Subscriber 2support, contacting xi

T

technical support xiTIBCO_HOME viii