Está en la página 1de 66

TIBCO ActiveMatrix Service Bus Getting Started

Software Release 2.3 February 2010

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 TIBCO ACTIVEMATRIX SERVICE BUS INSTALLATION) 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 Software, TIBCO ActiveMatrix, TIBCO Adapter, Predictive Business, Information Bus, The Power of Now, TIBCO AutoMediate, AutoMediate, TIBCO Business Studio, and TIBCO ActiveMatrix BusinessWorks are either registered trademarks or trademarks of TIBCO Software Inc. in the United States and/or 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. PLEASE 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 2005-2010 TIBCO Software Inc. ALL RIGHTS RESERVED. TIBCO Software Inc. Confidential Information

| iii

Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi TIBCO Matrix Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi Third-Party Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii How to Contact TIBCO Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi

Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 What is ActiveMatrix Service Bus? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 What ActiveMatrix Service Bus Does . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 About This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 What Youll Learn in this Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Where to Find More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Chapter 2 Working with TIBCO Business Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9


Working with TIBCO Business Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Starting TIBCO Business Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Working with ActiveMatrix SOA Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Creating ActiveMatrix SOA Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Importing Projects and Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Chapter 3 Hello World Mediation Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15


Hello World Mediation Example Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Sample Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Setting up the Hello World ActiveMatrix SOA Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Starting TIBCO Business Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating the Hello World ActiveMatrix SOA Project and Folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Importing the WSDL Files Into the Hello World Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 18 18 20

Developing the Hello World Mediation Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Creating the Hello World Mediation Flow Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Creating the Hello World Mediation Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Creating Shared Resources and Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Creating Shared Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

TIBCO ActiveMatrix Service Bus Getting Started

iv

| Contents
Adding Shared Resource Profiles to the Composite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Creating the Hello World SOAP Services and References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating the HelloWorld Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring the Transport: Adding the HTTP Connection to the Service . . . . . . . . . . . . . . . . . . . . . . . . . . . Binding the Service to the Target Component Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating the HelloWorld Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding the JMS Connection to the Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Binding the Reference to the Target Component Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Final Composite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 29 29 30 30 31 31 32

Packaging the Hello World Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Updating the HelloWorld Service Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Creating the Deployable Archive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Deploying and Starting the Hello World Service Assembly. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Uploading the Service Assembly Archive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enabling and Installing Shared Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mapping Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Deploying and Starting the Service Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Generating the Concrete WSDL File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 34 35 35 36 37

Running the HelloWorld Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Executing the Target Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Sending a Message to the Mediation Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Chapter 4 Setting up and Starting ActiveMatrix Administrator and Runtime. . . . . . . . . . . . . . 41


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Starting the Database Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Creating TIBCO ActiveMatrix Administrator Server and ActiveMatrix Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Starting TIBCO Servers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Starting the TIBCO Management Daemon Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Starting the TIBCO ActiveMatrix Administrator Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Starting the TIBCO Enterprise Message Service Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Default Environment and Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing the Default Environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating the Default Environment and Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Starting the node1 Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 47 47 47 50 50 50 52

Logging Into TIBCO ActiveMatrix Administrator User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

Enabling Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Creating the JMS Monitoring Shared Resource Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Configuring Monitoring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

TIBCO ActiveMatrix Service Bus Getting Started

|v

Preface

TIBCO ActiveMatrix is a scalable and extensible platform for developing, deploying, and managing applications that conform to a service-oriented architecture. Mediation within ActiveMatrix allows your enterprise to easily adapt to changing requirements by providing an easy-to-use interface for managing mediation flows. TIBCO ActiveMatrix Service Bus is an enterprise service bus that helps organizations bridge the mediation gap in their SOA infrastructures.

Topics
Related Documentation, page vi Typographical Conventions, page viii How to Contact TIBCO Support, page xi

TIBCO ActiveMatrix Service Bus Getting Started

vi

| Related Documentation
Related Documentation
This section lists documentation resources you may find useful.

TIBCO Matrix Documentation


The following documents form the TIBCO Matrix documentation set: TIBCO ActiveMatrix Service Bus Installation Read this manual for instructions on site preparation and installation. TIBCO ActiveMatrix Concepts Read this manual before reading any other manual in the documentation set. This manual describes terminology and concepts of the ActiveMatrix platform. The other manuals in the documentation set assume you are familiar with the information in this manual. TIBCO ActiveMatrix Administration Read this manual to learn how to manage the ActiveMatrix runtime and deploy and manage ActiveMatrix services. TIBCO ActiveMatrix Composite Editor Users Guide Read this manual to learn how to develop, debug, and package ActiveMatrix composites. TIBCO ActiveMatrix Service Bus Getting Started Read this manual for a quick introduction to the product that walks you through a brief tutorial. TIBCO ActiveMatrix Service Bus Mediation Design Guide Read this manual to learn how to develop mediation flows using the Mediation Editor. TIBCO ActiveMatrix Service Bus Release Notes Read the release notes for a list of new and changed features. This document also contains lists of known issues and closed issues for this release.

Third-Party Documentation
TIBCO ActiveMatrix software supports the following standards: Service Component Architecture http://www.osoa.org/display/Main/Service+Component+Architecture+Sp ecifications

TIBCO ActiveMatrix Service Bus Getting Started

Preface vii

World Wide Web Consortium web services activity http://www.w3.org/2002/ws/ Simple Object Access Protocol (SOAP) 1.1 W3C Note http://www.w3.org/TR/2000/NOTE-SOAP-20000508/ WSDL 1.1 W3C Note http://www.w3.org/TR/wsdl

OASIS http://www.oasis-open.org/committees/tc_cat.php?cat=ws UDDI Version 2 OASIS Standard http://www.oasis-open.org/specs/index.php#uddiv2

TIBCO ActiveMatrix Service Bus Getting Started

viii

| Typographical Conventions
Typographical Conventions
The following typographical conventions are used in this manual. Table 1 General Typographical Conventions Convention
TIBCO_HOME ENV_NAME ENV_HOME AMX_HOME AMX_ADMIN_HOME

Use Many TIBCO products are 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. A product installed into an installation environment does not access components in other installation environments. Incompatible products and multiple instances of the same product must be installed into different installation environments. An installation environment consists of the following properties:
Name Identifies the installation environment. The name is appended to

the name of Windows services created by the installer and is used in the path to the product in the Windows Start > All Programs menu. This directory is referenced in documentation as ENV_NAME.
Description Provides information about what the environment

contains or is used for.


Path The directory into which the product is installed. This directory 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 inside ENV_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 Administrator installs into a directory inside
ENV_HOME. This directory is referenced in documentation as AMX_ADMIN_HOME. The value of AMX_ADMIN_HOME depends on the

operating system. For example, on Windows systems the default value is C:\tibco\amxadministrator\.
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.

TIBCO ActiveMatrix Service Bus Getting Started

Preface ix

Table 1 General Typographical Conventions (Contd) Convention


bold code font

Use 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]

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.

TIBCO ActiveMatrix Service Bus Getting Started

| Typographical Conventions
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

{ }

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}

TIBCO ActiveMatrix Service Bus Getting Started

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 Service Bus Getting Started

xii

| How to Contact TIBCO Support

TIBCO ActiveMatrix Service Bus Getting Started

|1
Chapter 1

Introduction

This guide introduces TIBCO ActiveMatrix Service Bus, which is a service development and deployment product in the ActiveMatrix family of products.

Topics
Before You Begin, page 2 What is ActiveMatrix Service Bus?, page 3 About This Guide, page 5 Where to Find More Information, page 7

TIBCO ActiveMatrix Service Bus Getting Started

| Chapter 1

Introduction

Before You Begin


Before starting this guide, its a good idea to become familiar with ActiveMatrix platform concepts and terminology. It is not necessary to learn all aspects of the ActiveMatrix platform, but do read Chapter 1 of TIBCO ActiveMatrix Concepts to learn about the terminology that is used in this guide. Its also a good idea to become familiar with TIBCO Business Studio, which ActiveMatrix Service Bus uses as its design environment. Chapter 2, Working with TIBCO Business Studio, is a general guide to working with Business Studio and ActiveMatrix SOA projects. If youre not familiar with Business Studio, step through that chapter before working on the Hello World example in Chapter 3.

TIBCO ActiveMatrix Service Bus Getting Started

What is ActiveMatrix Service Bus? 3

What is ActiveMatrix Service Bus?


TIBCO ActiveMatrix is a platform for building and deploying applications based on a service-oriented architecture (SOA). ActiveMatrix Service Bus is a service development and deployment product within the TIBCO ActiveMatrix family of products.

TIBCO Business Studio is the ActiveMatrix Service Bus design environment. Chapter 2 of this guide introduces Business Studio, which youll use as you follow the Hello World Mediation example in Chapter 3.

ActiveMatrix Service Bus includes:


TIBCO Business StudioThe ActiveMatrix Service Bus design environment,

which includes the Composite Editor and the Mediation Flow Editor. In this guide, youll use Business Studio to create a Hello World ActiveMatrix SOA project and to develop a Hello World mediation component.
Mediation, SOAP, Adapter, and JMS containersActiveMatrix runtime entities

that host component implementations and service bindings.


TIBCO Enterprise Message ServiceManages message exchanges. TIBCO ActiveMatrix AdministratorManages the enterprise, environment, and

services.
Policy AgentEnforces policies such as security authentication at end-points (URLs at which a consumer can access a service).

What ActiveMatrix Service Bus Does


The ActiveMatrix Service Bus layer of the ActiveMatrix product is designed for easy implementation of service mediation. ActiveMatrix Service Bus service mediation manages interactions across heterogeneous, deployed services without affecting how consumers invoke and use those services.

TIBCO ActiveMatrix Service Bus Getting Started

| Chapter 1

Introduction

For example, in an IT group with multiple silos of services, each silo might have its own transport protocol or data format. If the business requires sharing services across silos, it can use ActiveMatrix Service Bus to enable mediation among those services. ActiveMatrix software supports the SOA principles of application architecture, in which applications are composed of services that interact by exchanging messages. ActiveMatrix services use Web Services Description Language (WSDL) documents to specify the messages that are required to access a service. Each service in an interaction is either a service provider, or a service consumer: The service provider publishes a WSDL document that describes the services it offers. The service consumer uses the WSDL document to determine the available services and the messages that are required to access those services.

The services that ActiveMatrix Service Bus can mediate can be created in BusinessWorks, ActiveMatrix, J2EE, or .NET. See TIBCO ActiveMatrix Concepts for a complete overview of ActiveMatrix and the SOA architecture, as well as a glossary that describes terms used in the ActiveMatrix family of products ActiveMatrix Service Bus provides:
Transport protocol bridgingMakes deployed services available on different

transport protocols, without the need to make changes to the service and then re-deploy it. For example, an organization that has standardized on using SOAP over JMS for its services, but wants these services available on HTTP or SMTP, can use ActiveMatrix Service Bus to bridge the protocols.
Routing and service version managementEnsures that an incoming request from a consumer is routed to the appropriate version of the service. TransformationsTransforms data formats from an incoming request to the

format that is expected by the service.


Re-use enablementAbstracts common functionality across services into the

mediation layerfor example, validation, logging, and error-handling.


MediationEnables combining internal services into public services, or hiding

internal services, so that users of the public services are insulated from changes to the internal services.
Efficient on-boarding of servicesEnables you to quickly on-board a large

number of services, so that you can efficiently manage multiple versions of services that are deployed on different platforms.

TIBCO ActiveMatrix Service Bus Getting Started

About This Guide 5

About This Guide


The guide uses examples to show how to: Create services, components, mediation flows, and shared resources, and package them into a deployment packaged (called a service assembly) Create and start the ActiveMatrix run-time environment Deploy and run the services you created Invoke the services with a simple SOAP client

The services in this guide are simple, so that you can focus on how to use the ActiveMatrix development and administration tools. After you complete this guide, you will be able to apply the methodology to your own services.

What Youll Learn in this Guide


This guide steps you through these processes: Developing ActiveMatrix Service Bus components and services Starting TIBCO and TIBCO ActiveMatrix servers Creating and Starting the TIBCO ActiveMatrix run-time environment Deploying the components and services to the run-time environment

Heres an overview of what youll learn in this guide, chapter-by-chapter: Chapter 2, Working with TIBCO Business Studio Describes the basic operations in TIBCO Business Studio that you might need to perform in the Hello World example in Chapter 3. In this chapter youll: Start TIBCO Business Studio Create a TIBCO ActiveMatrix SOA project, and import abstract WSDL files into the project

The procedures in this chapter are generic, and are not tailored to the Hello World example. Familiarize yourself with the procedures in this chapter, but do not perform themyoull perform specific procedures in Chapter 3, Hello World Mediation Example.

TIBCO ActiveMatrix Service Bus Getting Started

| Chapter 1

Introduction

Chapter 3, Hello World Mediation Example

Includes a simple tutorial to introduce you to service mediation in TIBCO ActiveMatrix. In this chapter, youll: Create and configure a mediation component and mediation flow diagram Create and configure a SOAP service and a JMS reference Package the service, components, and implementation artifacts into a service assembly Upload the service assembly to the environment, map service units to nodes, and map shared resource profiles to a shared resource Deploy and start the service assembly Invoke a SOAP service from a client

Chapter 4, Setting up and Starting ActiveMatrix Administrator and Runtime

Describes how to configure and start the infrastructure and administration environment that is required to run the example in Chapter 3. Because the environment requires some overhead that might slow the design environment, follow the example in Chapter 3 until instructed to perform the procedures described in this chapter. In this chapter, youll: Start TIBCO and TIBCO ActiveMatrix infrastructure servers Set up and start the ActiveMatrix runtime environment, including an ActiveMatrix node

TIBCO ActiveMatrix Service Bus Getting Started

Where to Find More Information 7

Where to Find More Information


After you complete this guide, you can find more information in these guides: Defining and packaging ActiveMatrix services in TIBCO ActiveMatrix Composite Editor Users Guide Developing ActiveMatrix components in TIBCO ActiveMatrix Service Grid Component Developers Guide Developing mediation flows in TIBCO ActiveMatrix Service Bus Mediation Design Guide Administration and deployment in TIBCO ActiveMatrix Administration

TIBCO ActiveMatrix Service Bus Getting Started

| Chapter 1

Introduction

TIBCO ActiveMatrix Service Bus Getting Started

|9
Chapter 2

Working with TIBCO Business Studio

The TIBCO ActiveMatrix service development tools consist of TIBCO Business Studio and a set of ActiveMatrix plug-ins. This chapter is a general guide to working with TIBCO Business Studio and ActiveMatrix SOA projectsyou can review it before you begin, then refer to it as you follow the tutorial information in this guide.

Topics
Working with TIBCO Business Studio, page 10 Working with ActiveMatrix SOA Projects, page 11

TIBCO ActiveMatrix Service Bus Getting Started

10

| Chapter 2

Working with TIBCO Business Studio

Working with TIBCO Business Studio


The TIBCO ActiveMatrix development tools consist of TIBCO Business Studio Workbench and a set of TIBCO ActiveMatrix plug-ins. This section describes how to start TIBCO Business Studio. For information on TIBCO Business Studio, refer to the Workbench User Guide in the Workbench online help. To view the online help, select Help > Help Contents.

Starting TIBCO Business Studio


To start TIBCO Business Studio:
]

1. Execute one of these platform-specific commands:


]

Windows From the Start menu, follow the path All Programs > TIBCO > ENV_NAME > TIBCO Business Studio 2.3 > TIBCO Business Studio.

From the command line on the Windows platform, run


ENV_HOME/BusinessStudio/TIBCOBusinessStudio.exe. UNIX Run ENV_HOME/BusinessStudio/TIBCOBusinessStudio.

1. The Workspace Launcher appears. Accept the default workspace or browse to a new workspace. 2. Click OK. 3. The first time you run TIBCO Business Studio it displays a Welcome screen. Dismiss the screen by clicking the X next to Welcome.

TIBCO ActiveMatrix Service Bus Getting Started

Working with ActiveMatrix SOA Projects 11

Working with ActiveMatrix SOA Projects


This section describes how to create ActiveMatrix SOA projects, import files into a project, and import sample projects.

Creating ActiveMatrix SOA Projects


ActiveMatrix SOA projects are containers for the ActiveMatrix resources that you can develop with TIBCO Business Studio. To create anActiveMatrix SOA project: 1. Select File > New > ActiveMatrix Resources... > ActiveMatrix SOA Project. 2. Click Next. 3. Type a name in the Project name field. 4. Select the appropriate template. 5. Click Finish. The new project is created. It appears in the Project Explorer tree with these ActiveMatrix folders: Composites Deployment Packages Mediation Flows Service Descriptors Shared Resources

A composite and service assembly are created in the project, based on the project name you typed in step 3. If the name you typed is ProjName, for example, a composite named ProjName.composite is created in the Composites folder and a service assembly named ProjName.saf is created in Deployment Packages folder.

Importing Projects and Files


This section describes how to import sample projects into a workspace, and how to import WSDL files into an ActiveMatrix SOA project.

TIBCO ActiveMatrix Service Bus Getting Started

12

| Chapter 2

Working with TIBCO Business Studio

Importing Sample Projects When running Business Studio on Linux when using JDK 1.6 you may see multiple errors when importing samples. This occurs because of the maximum number of open files allowed. To change the limit of the maximum files that can be open: 1. Log in as a root user. 2. Edit /etc/security/limits.cof. 3. Add or edit the line:
* hard nofile 800000

The * refers to any user. Alternatively you may put a user name or @somegroup, where the user that will run Business Studio belongs to the group somegroup. Set the number indicating the limit to a large number. 4. Save the file, log out and log back in and then start Business Studio. To import sample projects: 1. Select File > Import.... to open the Import dialog box. 2. Expand the General node. 3. Select Existing Projects into Workspace. 4. Click Next to open the Import Projects dialog box. 5. Click the Browse.... button to the right of the Select root directory field. a. Navigate to AMX_HOME/2.3/samples/amsb or AMX_HOME/2.3/samples/amsg. b. Select one of the sample directories. c. Click OK. 6. In the Projects area, check the checkboxes next to the projects to import. 7. Ensure that the Copy projects into workspace checkbox is selected. 8. Click Finish. The projects you imported are now listed in the Project Explorer tree. Importing WSDL Files At various points throughout the example, you need to import WSDL files into the ActiveMatrix SOA project. To import WSDL files from the file system:

TIBCO ActiveMatrix Service Bus Getting Started

Working with ActiveMatrix SOA Projects 13

1. In the Project Explorer view, right-click the ProjName > Service Descriptors folder and select Import > Service Import Wizard. 2. Accept the default selection Import from a File and click Next to open the WSDL Selection dialog box. 3. Click the Ellipsis button to the right of the Source Location field.

a. Navigate to a directory containing the WSDL file. b. Click the file and then click Open. 4. Click Next. 5. Click Finish to import the WSDL file into your project.

TIBCO ActiveMatrix Service Bus Getting Started

14

| Chapter 2

Working with TIBCO Business Studio

TIBCO ActiveMatrix Service Bus Getting Started

| 15
Chapter 3

Hello World Mediation Example

This chapter is a tutorial that guides you through creating a mediation example, using mediation components.

Topics
Hello World Mediation Example Overview, page 16 Setting up the Hello World ActiveMatrix SOA Project, page 18 Developing the Hello World Mediation Component, page 21 Creating Shared Resources and Profiles, page 25 Creating the Hello World SOAP Services and References, page 29 Packaging the Hello World Example, page 33 Deploying and Starting the Hello World Service Assembly, page 34 Running the HelloWorld Example, page 38

TIBCO ActiveMatrix Service Bus Getting Started

16

| Chapter 3

Hello World Mediation Example

Hello World Mediation Example Overview


This getting started example introduces mediation flows and mediation components using a simple application that sends a simple SOAP message to a service, and receives a simple SOAP reply message from the service. As Figure 1 shows, the example enables a SOAP client to access a JMS service. The mediation component is implemented by a mediation flow that forwards the message from the SOAP client to the target service. The target service returns an acknowledgement string when the Hello World SOAP client submits a name. The mediation component writes an entry to the log, including the message data sent by the SOAP client. Figure 1 Hello World Mediation Example
www Hello World SOAP Client Hello World JMS Target Service

Hello World SOAP Service

Hello World Mediation Component

Hello World JMS Reference

The Hello World mediation component is implemented by a mediation flow and executes in the mediation container. For the service to be accessible by way of the SOAP protocol, the example includes a Hello World SOAP service. The Hello World SOAP client sends requests to the SOAP service, which forwards the requests to the Hello World mediation component. The mediation component executes the mediation flow that contains a Log task to write the incoming message to the log file. The request is then forwarded to the JMS reference to be sent to the target service. The response message from the target service is returned to the SOAP client through the same set of steps. This chapter describes how to: Create an ActiveMatrix SOA project and import an abstract WSDL file into the project Create the Hello World mediation component and implementation in a mediation flow Create the Hello World SOAP service Create the Hello World JMS reference to the target service

TIBCO ActiveMatrix Service Bus Getting Started

Hello World Mediation Example Overview 17

Package the service, component, and implementation artifacts into a service assembly Upload the service assembly to the ActiveMatrix environment, map service units to nodes, and map shared resource profiles to a shared resource Deploy and start the service assembly Invoke the Hello World service from a SOAP client

Sample Code
This chapter describes how to create and run the HelloWorld sample project. If you are already familiar with the TIBCO ActiveMatrix design environment and only want to deploy and run this project, you can find a complete working example in AMX_HOME\2.3\samples\amsb\HelloWorld\com.tibco.amsb.sample.mediat ion.helloworld. You can import the project into a workspace by following the procedure described in Importing Sample Projects on page 8. If you import the sample project, you can skip to Deploying and Starting the Hello World Service Assembly on page 34 to deploy and run the sample.

TIBCO ActiveMatrix Service Bus Getting Started

18

| Chapter 3

Hello World Mediation Example

Setting up the Hello World ActiveMatrix SOA Project


When you set up a SOA project in TIBCO Business Studio, you: Create the SOA project and folders Import WSDL files into the project

Starting TIBCO Business Studio


To start Business Studio: 1. Run one of these platform-specific commands:
]

Windows Start > All Programs > TIBCO > ENV_NAME > TIBCO Business

Studio 2.3 > TIBCO Business Studio. Or, from the Windows command line, run
ENV_HOME/BusinessStudio/TIBCOBusinessStudio.exe. UNIX Run ENV_HOME/BusinessStudio/TIBCOBusinessStudio.

1. The Workspace Launcher opens. Accept the default workspace or browse to a new workspace. 2. Click OK. The first time you run Business Studio, the Welcome screen opens. Dismiss the screen by clicking the X next to Welcome.

Creating the Hello World ActiveMatrix SOA Project and Folders


ActiveMatrix SOA projects are containers for the ActiveMatrix resources that you develop using TIBCO Business Studio. To create an ActiveMatrix SOA project for the Hello World example:
\\\

1. Start Business Studio and select File > New > ActiveMatrix Resources... > ActiveMatrix SOA Project. 2. Click Next.

TIBCO ActiveMatrix Service Bus Getting Started

Setting up the Hello World ActiveMatrix SOA Project 19

3. Type HelloWorld in the Project name field, and ensure that Basic SOA Project template is selected the Available Templates list.

4. Click Next. The Asset Type Selection dialog box opens, showing the assets selected for the new project.

5. Click Finish. The HelloWorld project appears in the Project Explorer, with these folders: Composites Deployment Packages Mediation Flows Service Descriptors Shared Resources

TIBCO ActiveMatrix Service Bus Getting Started

20

| Chapter 3

Hello World Mediation Example

A composite and a service assembly are created in the project, using the project name you specified in step 3HelloWorld:
The composite named HelloWorld.composite is created in the Composites folder.

The service assembly named HelloWorld.saf is created in the Deployment Packages folder.

Importing the WSDL Files Into the Hello World Project


ActiveMatrix services are described using WSDL filesWSDL files specify the messages that are required to access a service. To add the WSDL files to your HelloWorld project: 1. In the Project Explorer, right-click the HelloWorld > Service Descriptors folder and select Import > Service Import Wizard. 2. Accept the default selection Import from a File and click Next to open the WSDL Selection dialog box. 3. Click the Ellipsis button 4. Navigate to the directory
AMX_HOME\2.3\samples\amsb\HelloWorld\com.tibco.amsb.sample.me
diation.helloworld\Service Descriptors

to the right of the Source Location field.

5. Click the file HelloWorld.wsdl, then click Open. 6. Click Next. 7. Click Finish to import the WSDL file into your project. The HelloWorld.wsdl file is an abstract WSDL and therefore has no binding to its target service. Later in this tutorial youll bind the WSDL to the target service, using the Composite Editor.

TIBCO ActiveMatrix Service Bus Getting Started

Developing the Hello World Mediation Component 21

Developing the Hello World Mediation Component


In this section of the tutorial youll: Create the Hello World mediation flow diagram Create the Hello World mediation component

Creating the Hello World Mediation Flow Diagram


To create the Hello World mediation flow diagram: 1. In the Project Explorer, open the HelloWorld project and right-click the Mediation Flows folder. 2. Choose New > Mediation Flow from the popup menu, to open the Create Mediation Flow wizard. 3. Select the method Single empty mediation flow, then click Next. 4. In the Mediation Flow Name field, type HelloWorld. 5. Click Finish. The newly created mediation flow diagram HelloWorld.mediation opens in the Mediation Flow Editor:
Click the arrow to show or hide the palette.

The left pane of the mediation flow, Mediation Interfaces, shows a mediation interface to which SOAP clients send messages. The right pane of the mediation flow, Target Interfaces, shows the interface for the target service where the messages are sent. The center pane of the mediation flow is the Mediation Path between the mediation and target interfaces. The Palette to the right of the mediation flow includes the tools youll use as you create the HelloWorld example.

TIBCO ActiveMatrix Service Bus Getting Started

22

| Chapter 3

Hello World Mediation Example

6. Open the Service Descriptors folder, and drag and drop the HelloWorld > Service Descriptors > HelloWorld.wsdl file into the center pane of the mediation flow diagram.

7. Click the sayHello operation in the Mediation Interfaces pane, then click the sayHello operation in the Target Interfaces pane. A wire shows the mediation path from the mediation operation to the target operation.

8. Add a Log task to the input mediation path: a. Click the Log icon in the palette. b. Click the arrow between the sayHello mediation operation and the corresponding sayHello target operation.

9. Right-click the Log task on the mediation path and select Show Properties View from the drop-down menu. The Properties view opens at the bottom of the workspace.

TIBCO ActiveMatrix Service Bus Getting Started

Developing the Hello World Mediation Component 23

10. Click the Log tab on the Properties view to configure the log task.

11. Select the Message Data item on the Log tab, to specify that the content of the message is to be written to the log file.

When this mediation flow executes, the message sent by the SOAP client to the target service travels along the mediation path, and the Log task on the path causes the message data to be written to the log file. 12. Save your projectclick the Save icon in the toolbar, or click Ctrl + S.

Creating the Hello World Mediation Component


To create the Hello World Mediation component: 1. In the Project Explorer, open HelloWorld > Composites and double-click HelloWorld.composite. The HelloWorld composite opens, showing the Services, Components, and References panes. 2. Click the Mediation component icon in the Components section of the Palette, then click on the Components canvas to add the component. To add resources to a composite, you can either select a resource and click on the canvas, or drag and drop resources from the palette to the canvas.

TIBCO ActiveMatrix Service Bus Getting Started

24

| Chapter 3

Hello World Mediation Example

3. Type HelloWorldMediationComp in the components activated input area.

4. Click the Implementation tab in the Properties view at the bottom of the workspace. 5. Click the Browse button on the tab to locate and select the HelloWorld.mediation mediation flow resource. 6. Click OK. 7. Click the Save icon . , indicating that you need to

The component shows an error icon configure the rest of the composite.

TIBCO ActiveMatrix Service Bus Getting Started

Creating Shared Resources and Profiles 25

Creating Shared Resources and Profiles


In this section of the tutorial, youll: Create shared resources. Shared resources are files that contain configuration information for resources that will be available for sharing among composites and components. Add shared resource profiles to the composite. Composites and components use shared resource profiles to reference shared resources.

Creating Shared Resources


For the mediation service and target service to be accessible from external clients, you must create these shared resources: HTTP Server JMS JNDI

These resources are used by the services that expose the Hello World SOAP service to clients, and by the references to the target HelloWorld JMS service. To create shared resources: 1. In the Project Explorer, right-click HelloWorld > Shared Resources and select New > HTTP Server. The HTTP Server dialog box opens, showing the location and file name of the HTTP Server shared resource.

TIBCO ActiveMatrix Service Bus Getting Started

26

| Chapter 3

Hello World Mediation Example

2. Click Finish. The HTTP Server Shared Resource Editor opens, showing the shared resource configuration.

3. In the Port field, type 9095. Do not change the remaining default values in the HTTP Server Shared Resource Editor. 4. Save the resource, then close the editor.

5. In the Project Explorer, right-click HelloWorld > Shared Resources and select New > JNDI. The JNDI Shared Resource dialog box opens, showing the location and file name of the JNDI shared resource. 6. Click Finish. The JNDI Shared Resource Editor opens, showing the shared resource configuration.

7. Do not change the default values in the JNDI Shared Resource Editor. Save the resource, then close the editor.

TIBCO ActiveMatrix Service Bus Getting Started

Creating Shared Resources and Profiles 27

8. In the Project Explorer, right-click HelloWorld > Shared Resources and select New > JMS. The JMS Shared Resource dialog box opens, showing the location and file name of the JMS shared resource. 9. Click Finish. The JMS Shared Resource Editor opens, showing the configuration of the shared resource. 10. In the Connection Type field, select JNDI from the drop-down list. The JNDI Configuration Name field appears. 11. Click the JNDI Configuration Name icon to open the drop-down menu, and click Browse.

Open the JNDI Configuration Name icon and click Browse.

12. In the JNDI Configuration Name dialog, select the shared resource JNDI Shared Resource.sharedjndiconfig from the Matching Resources list, and click OK. 13. Save the resource, then close the editor.

Adding Shared Resource Profiles to the Composite


Now that youve created the shared resources, youll add them to the HelloWorld composite. To add the shared resource profiles to the HelloWorld composite: 1. If HelloWorld.composite is open, activate it by clicking the title tab of the composite editor. If HelloWorld.composite is not open, go to Project Explorer > HelloWorld > Composites and double-click HelloWorld.composite.

TIBCO ActiveMatrix Service Bus Getting Started

28

| Chapter 3

Hello World Mediation Example

2. In the Properties view of HelloWorld.composite, click the Shared Resource Profiles view tab.

3. Add a new row to the table in one of these ways: Click the Add button to the right of the Shared Resource Profiles table. in the Name column.

Click the ellipsis button 4. In the new row:

Click in the Name column and type HTTP_Server. In the Type column, select HTTP. Click in the Target column, and within the column click the ellipsis button to open the Select Shared Resource dialog box. Select HTTP Server Shared Resource.sharedhttp and click OK. 5. Add another row to the table by clicking the Add button to the right of the table, or the ellipsis button in the Name column. 6. In the new row: Click in the Name column and type JMS. In the Type column, select JMS. Click the Target column, and within the column click the ellipsis button to open the Select Shared Resource dialog box. Select JMS Shared Resource.sharedjmscon and click OK. 7. Click the Save icon in the toolbar, or click Ctrl + S.

TIBCO ActiveMatrix Service Bus Getting Started

Creating the Hello World SOAP Services and References 29

Creating the Hello World SOAP Services and References


When specifying services and references, you select the port type, the supported transport, and the target service. In this section of the tutorial youll: Create the Hello World service with a SOAP binding Create the target HelloWorld reference with a JMS binding.

Creating the HelloWorld Service


To create the Hello World service with a SOAP binding: 1. If HelloWorld.composite is open, activate it by clicking the title tab of the composite editor. If HelloWorld.composite is not open, go to Project Explorer > HelloWorld > Composites and double-click HelloWorld.composite. 2. Click the SOAP service icon in the Services group in the Palette and click the canvas. A service is added to the Services area of the canvas. 3. Type HelloWorld_Service in the activated input area. 4. In the services Properties view, click the General view tab. 5. Click the Browse button at the right of the Port Type field to open the Resource Picker. a. Type the letter h in the List of Files field. The nodes in the Resource Picker expand. b. Click the HelloWorld node and click OK. The Port Type field and WSDL Location fields are set. 6. Click the Save icon in the toolbar, or click Ctrl + S. The service shows an error icon configured. , indicating that its transport must be

Configuring the Transport: Adding the HTTP Connection to the Service


To add the HTTP connection to the service: 1. In the services Properties view, click the Binding tab. 2. Click the HelloWorld_EP endpoint node view tab. on the left side of the Binding

TIBCO ActiveMatrix Service Bus Getting Started

30

| Chapter 3

Hello World Mediation Example

3. Expand the Transport Configuration area on the right side of the Binding view tab.

The Transport Type is set to HTTP, and the Resource Profile field is set to HTTP_Server, to correspond to the resource profile you created in Adding Shared Resource Profiles to the Composite on page 27. The endpoint URI (Uniform Resource Identifier) forms part of the URL that clients of the endpoint invoke. The Endpoint Path is helloworld, and the Endpoint URI field is /localhost:9095/helloworld. 4. Click the Save icon or click Ctrl + S to set the endpoint URI. The error icon is removed.

Binding the Service to the Target Component Service


The target of a service is a component service. To bind the service to the component service: 1. In the services Properties view, click the Target view tab. 2. Click the button next to HelloWorldMediationComp->HelloWorld. A wire is drawn between the service and the component, connecting them. If the HelloWorldMediationComp->HelloWorld entry does not appear, close the composite by clicking the X in the title of the editor window, then reopen the composite. 3. Click the Save icon .

Creating the HelloWorld Reference


To create the Hello World reference with a JMS binding: 1. Drag the JMS reference icon from the References group in the Palette and drop it onto the canvas. A reference is added to the References area of the canvas. 2. Type HelloWorld_Reference in the activated input area. 3. In the references Properties view, click the General tab.

TIBCO ActiveMatrix Service Bus Getting Started

Creating the Hello World SOAP Services and References 31

4. Click the Browse button at the right of the Port Type field. a. Type the letter h in the List of Files field. The nodes in the Resource Picker expand. b. Click the HelloWorld node and click OK. The Port Type field and WSDL Location fields are set. 5. Click the Save icon in the toolbar, or click Ctrl + S. The service shows an error icon configured. , indicating that its transport must be

Adding the JMS Connection to the Reference


To add the JMS connection to the reference: 1. In the references Properties view, click the Binding tab. 2. Click the endpoint node on the left side of the Binding tab

3. Expand the Endpoint area on the right. The Connection Config field is set to JMS, to correspond to the resource profile created in Adding Shared Resource Profiles to the Composite on page 27. 4. Set the Target Destination Name field to helloworld.sayhello.

Binding the Reference to the Target Component Reference


To bind the reference to the component reference: 1. Click the component reference icon resource. on the HelloWorldMediationComp

Click the component reference icon to open its Properties view.

2. In the references Properties view, click the button next to the HelloWorld_Reference of type Composite Reference.

TIBCO ActiveMatrix Service Bus Getting Started

32

| Chapter 3

Hello World Mediation Example

3. A wire is drawn between the component reference and the composite reference.

Click the HelloWorld_Reference button to wire the component reference to the composite reference.

4. Click the Save icon

Final Composite
The final composite looks like thiswires connect the HelloWorld SOAP service to the mediation component resource, and the mediation component resource to the HelloWorld JMS reference:

TIBCO ActiveMatrix Service Bus Getting Started

Packaging the Hello World Example 33

Packaging the Hello World Example


To deploy the services and components you created, you must package them into a service assembly. When you created the composite, a service assembly named HelloWorld.saf was automatically created in the Deployment Packages folder. Now youll update the service assembly, to package the elements and resources youve created.

Updating the HelloWorld Service Assembly


To update the Hello World service assembly: 1. Go to Project Explorer > HelloWorld > Deployment Packages and double-click HelloWorld.saf. 2. Click the Refresh icon in the top right of the editor. SOAP, JMS, and Mediation service units are created and populated with the corresponding components. 3. Click the Save icon .

Creating the Deployable Archive


To create a deployable archive, either right-click the service assembly in the Project Explorer view and select Build Archive, or click the build archive icon in the top right of the service assembly editor. The archive HelloWorld.zip is created in the Deployment Packages folder of your project.

TIBCO ActiveMatrix Service Bus Getting Started

34

| Chapter 3

Hello World Mediation Example

Deploying and Starting the Hello World Service Assembly


You deploy and start the Hello World service assembly in ActiveMatrix Administrator. Before deploying the example, you must start ActiveMatrix servers, start the node1 node in the development environment, and configure monitoring as described in Chapter 8, Setting up and Starting ActiveMatrix Administrator and Runtime, on page 107. Service assembly deployment involves these general steps: 4. Uploading the Service Assembly Archive on page 34 5. Enabling and Installing Shared Resources on page 35 6. Mapping Resources on page 35 7. Deploying and Starting the Service Assembly on page 36 8. Generating the Concrete WSDL File on page 37

Uploading the Service Assembly Archive


To upload the service assembly you created in Packaging the Hello World Example on page 33 to the development environment: 1. Start and log in to ActiveMatrix Administrator. 2. Select Deploy to an Environment from the Perspective drop-down list and development from the Environment drop-down list. 3. Click Upload Service Assembly.
Upload Assembly Archive

a. In the Name field, type HelloWorld. b. Click Browse... next to the Archive File field and navigate to the Deployment Packages folder in your project workspace. The samples directory shipped with the product also contains a valid service assembly archive. If you wish to use the pre-configured service assembly archive, you can navigate to

TIBCO ActiveMatrix Service Bus Getting Started

Deploying and Starting the Hello World Service Assembly 35

AMX_HOME\2.3\samples\amsb\HelloWorld\com.tibco.sample.medi
ation.helloworld\Deployment Packages.

c. Select HelloWorld.zip and click Open. d. Leave the Import Shared Resource Definitions checkbox checked. e. Click OK. The service assembly status is Not Deployed.

Enabling and Installing Shared Resources


After uploading the assembly, install the shared resources specified in the assembly: 1. Select Configure an Environment from the Perspective drop-down list and development from the Environment drop-down list. 2. In the Nodes list, click node1. 3. Click the Shared Resources link. 4. Click the Edit button over the Shared Resources table. 5. In the Enabled at Startup? column, click the Yes radio buttons in the HTTP_Server and JMS rows. 6. Click Save. The status of the resources is Marked for Install. 7. Select the HTTP_Server row and click Install. The status of the resource is Installed. 8. Select the JMS row and click Install. The status of the resource is Installed.

Mapping Resources
Finally map the service assembly components to resources: 1. Select Deploy to an Environment from the Perspective drop-down list and development from the Environment drop-down list. 2. In the Services Assemblies list, click the HelloWorld service assembly row.
Map resource profiles to resources

3. Click the General Settings button. 4. Click the Shared Resource Profiles link. 5. Click the Edit button over the Shared Resource Profiles table. 6. Click the HTTP_Server row.

TIBCO ActiveMatrix Service Bus Getting Started

36

| Chapter 3

Hello World Mediation Example

7. In the Shared Resources column, select HTTP_Server, if it is not already selected. 8. Click the JMS row. 9. In the Shared Resources column, select JMS, if it is not already selected.
Map service units to ActiveMatrix nodes

10. Click the Service Units button. 11. In the Service Units table, click SOAP. a. In Node Mapping tab, click Edit. b. Drag node1 from the Available Nodes list and drop it in the Mapped Nodes list. c. Click Save. A mapped icon name. appears to the left of the service unit

12. In the Service Units table, click JMS. a. In Node Mapping tab, click Edit. b. Drag node1 from the Available Nodes list and drop it in the Mapped Nodes list. c. Click Save. A mapped icon name. appears to the left of the service unit

13. In the Service Units table, click Mediation. a. In Node Mapping tab, click Edit. b. Drag node1 from the Available Nodes list and drop it in the Mapped Nodes list. c. Click Save. A mapped icon name. appears to the left of the service unit

Deploying and Starting the Service Assembly


To deploy and start the service assembly: 1. In the Services Assemblies list, click the HelloWorld service assembly row. The Deployable column of the HelloWorld service assembly should be Yes. 2. Click Deploy. The status for the HelloWorld service assembly is Deployed. 3. Click Start. The status for the HelloWorld service assembly is Running.

TIBCO ActiveMatrix Service Bus Getting Started

Deploying and Starting the Hello World Service Assembly 37

Generating the Concrete WSDL File


A concrete WSDL file is used when developing external consumers. To generate the concrete Hello World WSDL file: 1. Start TIBCO Business Studio and open HelloWorld.composite if it is not already open. 2. Click the HelloWorld_Service in the Services area. 3. Click the Binding tab in the Properties view. 4. Click the Generate WSDL button. A concrete WSDL file is generated in the Composites folder of your project. You use this concrete WSDL in your SOAP client to contact the SOAP service. See Running the HelloWorld Example on page 38 for more information.

TIBCO ActiveMatrix Service Bus Getting Started

38

| Chapter 3

Hello World Mediation Example

Running the HelloWorld Example

Executing the Target Services


The target service must be executing before sending a message to the mediation service. The target service receives JMS messages from the mediation component at runtime, therefore the administration environment that includes a TIBCO Enterprise Message Service server must be running as described in Chapter 8, Setting up and Starting ActiveMatrix Administrator and Runtime, on page 107. Batch scripts to start the target service are located in
AMX_HOME\2.3\samples\amsb\TargetServices\bin. On Windows systems,

execute the start_target_services.bat file. On UNIX systems, execute the start_target_services.sh file. Also included in the target services directory is a file named target_services.properties. This file contains default values for the TIBCO Enterprise Message Service connection and destination names for the target service. If you are using a TIBCO Enterprise Message Service installation with non-default values, you may need to alter the values in this properties file before starting the target services.

Sending a Message to the Mediation Service


To run the HelloWorld example, you execute a SOAP client to send a message to the Hello World mediation service. There are a variety of ways you can construct the SOAP message. For example, if you own TIBCO ActiveMatrix BusinessWorks, you can create an ActiveMatrix BusinessWorks process definition that generates SOAP messages and receives the reply message (see Using the TIBCO ActiveMatrix BusinessWorks Test Client Project, page 39). You could also use a third-party product that generates SOAP messages and acts as a web service client. For example, the soapUI product from eviware (http://www.eviware.com) allows you to generate SOAP messages and send them to the service to which they are bound. Use the concrete WSDL generated in Generating the Concrete WSDL File on page 37 to invoke the Hello World service in your SOAP client. The sayHello operation requires input of two strings, FirstName and LastName. Once you send the SOAP message, you receive a reply that contains the strings you sent in the original message. You can also view the contents of the original message you sent in the log file stored in
AMX_HOME\data\environment_name\node_name\logs\amsb_mediation_logTask
.log.

TIBCO ActiveMatrix Service Bus Getting Started

Running the HelloWorld Example 39

Using the TIBCO ActiveMatrix BusinessWorks Test Client Project TIBCO provides an ActiveMatrix BusinessWorks test project for you to use in testing your SOAP clients. The project is called TestClient, and is located at samples/amsb/TestClient/bw. To use the TestClient project: 1. Open the project using TIBCO Designer. 2. Use the debugger to run the ActiveMatrix BusinessWorks process as the SOAP client: The ActiveMatrix BusinessWorks SOAP client process HelloWorld/sayHello.process invokes the mediation service/operation com.tibco.amsb.sample.mediation.helloworld.

TIBCO ActiveMatrix Service Bus Getting Started

40

| Chapter 3

Hello World Mediation Example

TIBCO ActiveMatrix Service Bus Getting Started

| 41
Chapter 4

Setting up and Starting ActiveMatrix Administrator and Runtime

This chapter describes how to set up and start ActiveMatrix Administrator and the ActiveMatrix runtime.

Topics
Overview, page 42 Starting the Database Server, page 44 Creating TIBCO ActiveMatrix Administrator Server and ActiveMatrix Node, page 45 Starting TIBCO Servers, page 47 Logging Into TIBCO ActiveMatrix Administrator User Interface, page 49 Default Environment and Node, page 50 Enabling Monitoring, page 53

TIBCO ActiveMatrix Service Bus Getting Started

42

| Chapter 4

Setting up and Starting ActiveMatrix Administrator and Runtime

Overview
Figure 2 shows the basic tasks that an administrator must perform to start the ActiveMatrix runtime and enable monitoring of deployed services. Figure 2 Administrator Flowchart
Start Infrastructure Servers

No

Adminstrator Server Created

Default Node Created Yes

No

Create Environment

Create Administrator Server

Yes Log into Administrator

Start Node

Create and Install Node

Create Default Node Enable Monitoring

To perform these tasks, you can follow the instructions in the remaining sections in this chapter. Alternatively, you can run the script AMX_HOME/2.3/samples/Util/bin/setup_amx_default to create the ActiveMatrix Administrator server and ActiveMatrix node. The script configuration parameters are set in AMX_HOME/2.3/samples/Util/bin/setup_amx_default_properties.xml. IThe ActiveMatrix Administrator username and password are set to amx.
stop_amx_default.

The setup script also generates the scripts start_amx_default and Run start_amx_default to start these ActiveMatrix servers: HSQLDB database ActiveMatrix Administrator server Management Daemon ActiveMatrix node

Use the stop_amx_default script to stop the servers.

TIBCO ActiveMatrix Service Bus Getting Started

Overview 43

If you use the scripts, you still must complete the procedures in Starting the TIBCO Enterprise Message Service Server on page 47, Logging Into TIBCO ActiveMatrix Administrator User Interface on page 49, and Enabling Monitoring on page 53.

TIBCO ActiveMatrix Service Bus Getting Started

44

| Chapter 4

Setting up and Starting ActiveMatrix Administrator and Runtime

Starting the Database Server


The TIBCO ActiveMatrix database server stores environment configuration data. Before creating the TIBCO ActiveMatrix Administrator server and starting the ActiveMatrix runtime environment, you must start the database server. To start the database server included with TIBCO ActiveMatrix: On a computer running Windows, from the Start menu, follow the path All Programs > TIBCO > ENV_NAME > TIBCO ActiveMatrix 2.3 > Start HSQLDB Server. To start the TIBCO ActiveMatrix database server from the command line on all platforms, execute AMX_HOME/hsqldb/bin/amx-db.

TIBCO ActiveMatrix Service Bus Getting Started

Creating TIBCO ActiveMatrix Administrator Server and ActiveMatrix Node 45

Creating TIBCO ActiveMatrix Administrator Server and ActiveMatrix Node


This section describes how to create the TIBCO ActiveMatrix Administrator server and ActiveMatrix runtime node. ActiveMatrix Administrator server can use one of four authentication realms: local XML file, TIBCO Administrator, LDAP, or database. This section demonstrates how to use HSQLDB database you started in Starting the Database Server on page 44 as the authentication realm. Creating the TIBCO ActiveMatrix Administrator Server and Default Runtime Node If you have not already created the TIBCO ActiveMatrix Administrator server and default runtime node during installation, run the administrator instance creation utility: 1. Execute one of these platform-specific commands:
Windows From the Start menu, follow the path All Programs > TIBCO > ENV_NAME > TIBCO ActiveMatrix 2.3 > Administrator Server Creation

Wizard. From the command line, change to the directory AMX_ADMIN_HOME/2.3/bin/ and run createadminserver.exe.
UNIX Change to the directory AMX_ADMIN_HOME/2.3/bin/ and run
createadminserver.

2. After the splash screen appears, click Next, to enter configuration information for the ActiveMatrix Administrator server.
Administrator cluster and server Database authentication realm

3. Accept the configuration defaults for the ActiveMatrix Administrator and click Next. 4. Accept the configuration defaults for the Database Authentication Realm, including the password for the database username, which is blank. 5. Click Next. If you receive a socket-creation error at this point, it means that the HSQLDB database server isnt running. See Starting the Database Server on page 44 to start it.

Administrator credentials

6. Type the username and password you want to use when you log in to the ActiveMatrix Administrator, and confirm the password.

TIBCO ActiveMatrix Service Bus Getting Started

46

| Chapter 4

Setting up and Starting ActiveMatrix Administrator and Runtime

Database

7. Accept the default settingcheckedfor the Use configuration details from Database Authentication Realm checkbox. 8. Click Next.

Runtime node

9. Accept the default configuration settings for the runtime node: Create a default runtime node checkbox: checked Environment Name: development Node Name: node1 Node Management Port: 9992 Provider URL: accept the default, or type the URL of your TIBCO Enterprise Message Service server Username for the TIBCO Enterprise Message Service server: admin Password for the TIBCO Enterprise Message Service: blank

Review configuration

10. Click Next and review the provided configuration details. 11. Click Next. The ActiveMatrix Administrator server instance creation utility creates the file
AMX_ADMIN_HOME/2.3/bin/amx_admin.bat on Windows, and AMX_ADMIN_HOME/2.3/bin/amx_admin.sh on UNIX platforms. On

Windows it also creates the Windows service TIBCO ActiveMatrix Administrator Server(amx:admin). 12. Click Finish to exit the wizard.

TIBCO ActiveMatrix Service Bus Getting Started

Starting TIBCO Servers 47

Starting TIBCO Servers

Starting the TIBCO Management Daemon Process


TIBCO Management Daemon bootstraps the management infrastructure and supports node life cycle operations. To start the Management Daemon Windows service: 1. Open Control Panel > Administrative Tools > Services. 2. Right-click the service TIBCO Management Daemon 2.0 ENV_NAME and select Start, if the service is not already running. To start TIBCO Management Daemon from the command line on all platforms, run ENV_HOME/managementdaemon/2.0/bin/managementdaemon.

Starting the TIBCO ActiveMatrix Administrator Server


TIBCO ActiveMatrix Administrator is the control center for TIBCO ActiveMatrix administrative operations. To start the TIBCO ActiveMatrix Administrator Windows service: 1. Open Control Panel > Administrative Tools > Services. 2. Right-click the service TIBCO ActiveMatrix Administrator Server(amx:admin) and select Start. The first time you start the service, the Services application will report that the service has started before it has completely deployed and initialized. You must wait a few minutes after the Services application reports that startup is complete before you try to access the ActiveMatrix Administrator. To start the ActiveMatrix Administrator server from the command line on all platforms, run AMX_ADMIN_HOME/2.3/bin/amx_admin.

Starting the TIBCO Enterprise Message Service Server


TIBCO Enterprise Message Service is the messaging backbone for TIBCO ActiveMatrix Service Bus. To start the TIBCO Enterprise Message Service Windows service: 1. Open Control Panel > Administrative Tools > Services.

TIBCO ActiveMatrix Service Bus Getting Started

48

| Chapter 4

Setting up and Starting ActiveMatrix Administrator and Runtime

2. Right-click the service TIBCO EMS Server(PID: xxxx) and select Start. To start the TIBCO Enterprise Message Service server from the command line on all platforms, run TIBCO_HOME/ems/bin/tibemsd. If the TIBCO Enterprise Message Service does not appear in the list of services, it has not been installed. You must install Enterprise Message Service separately see the Installation guide for instructions.

TIBCO ActiveMatrix Service Bus Getting Started

Logging Into TIBCO ActiveMatrix Administrator User Interface 49

Logging Into TIBCO ActiveMatrix Administrator User Interface


To log into the ActiveMatrix Administrator user interface: 1. Open the URL http://localhost:8120/amxadministrator in a web browser. The login page opens.

2. Type the administrator username and password you supplied in Administrator credentials on page 45. The ActiveMatrix Administrator welcome screen opens:

TIBCO ActiveMatrix Service Bus Getting Started

50

| Chapter 4

Setting up and Starting ActiveMatrix Administrator and Runtime

Default Environment and Node


This section describes how to view or create the default environment and node and install the node.

Viewing the Default Environment


If you created the default environment and node when you created the ActiveMatrix Administrator server, view them as follows: 1. Select Configure Enterprise Assets from the Perspective drop-down list. 2. Click the Environment Definition link. Observe that development appears in the Environments list. 3. In the Environments table, click the development row. 4. Click the Messaging Bus link in the development environment details area. Observe that development_node1 appears in the Messaging Servers list. 5. Click the Machines link in the development environment details area. Observe that the machine on which the ActiveMatrix Administrator server is running is enabled for the environment. 6. Select Configure an Environment from the Perspective drop-down list. 7. Select development from the Environment drop-down list. Observe that node1 appears in the Nodes list.

Creating the Default Environment and Node


If you did not create the default environment and node when you created the ActiveMatrix Administrator server, create them as described in this section. Creating the Default Environment To create the default environment: 1. Select Configure Enterprise Assets from the Perspective drop-down list. 2. Click the Environment Definition link. 3. Click the New button over the Environments table. 4. In the Name field, type development. 5. Click Save. 6. In the Environments table, select development.
TIBCO ActiveMatrix Service Bus Getting Started

Default Environment and Node 51

Configure messaging bus

7. Click the Messaging Bus link. 8. In the Messaging Servers area, click Add. The panel on the right displays configuration fields. 9. In the Name field, type development_node1. 10. In the Connection Type field, select Direct. 11. Click Save.

Enable machine in environment

12. Click the Machines link. 13. Click Edit. 14. Click the Yes button next to the machines you want to enable. 15. Click Save.

Creating and Installing the Default Node To create and install the default node: 1. Select Configure an Environment from the Perspective drop-down list. 2. Select development from the Environment drop-down list. 3. Click the New button. The General panel displays configuration fields. 4. In the Name field, type node1. 5. Select the messaging server you added in Creating the Default Environment on page 50. 6. In the Management Port field, type 9992. 7. Select the machine you enabled in Creating the Default Environment on page 50. 8. Select the product. 9. Click Savenode1 appears in the Nodes list.
Install node

10. In the Nodes table field, select node1. 11. Click Install.

TIBCO ActiveMatrix Service Bus Getting Started

52

| Chapter 4

Setting up and Starting ActiveMatrix Administrator and Runtime

Starting the node1 Node


To start the node you created in Creating the TIBCO ActiveMatrix Administrator Server and Default Runtime Node on page 45 or in the preceding section: 1. Select Configure an Environment from the Perspective drop-down list and the development environment from the Environment drop-down list. 2. In the Nodes table, select the node1 row. Observe that the status is Installed/Stopped. 3. Click the Start button. The status changes to Starting. Click the refresh icon until you see that the status has changed to Running. 4. Click the Containers link in the node1 details area. Observe that the Status of the containers in the Containers list is Active.

TIBCO ActiveMatrix Service Bus Getting Started

Enabling Monitoring 53

Enabling Monitoring
To enable monitoring of deployed services, first select Configure Enterprise Assets from the Perspective drop-down list to view the enterprise assets screen.

To configure monitoring, you create a JMS shared resource definition and set the monitoring JMS configuration to point to the JMS shared resource definition.

Creating the JMS Monitoring Shared Resource Definition


To create a JMS monitoring shared resource definition: 1. In the Configure Enterprise Assets header, click Shared Resource Definitions. 2. In the Shared Resource Definitions panel, select New > JMS. 3. In the panel on the right, type JMSMonitoring in the Name field. 4. Click Test Connection and then OK to dismiss the confirmation dialog. 5. Click Save.

Configuring Monitoring
To configure monitoring: 1. In the Configure Enterprise Assets header, click Administrator Cluster. 2. Click the Monitoring Configuration link. 3. Click the Edit button. 4. For Enable Monitoring?, click the Yes radio button. 5. Click the Choose JMS Configuration link. a. Select JMSMonitoring and click OK. 6. Select admin from the Metrics Manager Server drop-down list. 7. Click Save.

TIBCO ActiveMatrix Service Bus Getting Started

54

| Chapter 4

Setting up and Starting ActiveMatrix Administrator and Runtime

TIBCO ActiveMatrix Service Bus Getting Started

También podría gustarte