You are on page 1of 24

TIBCO ActiveMatrix Service Bus Development Tutorials

Software Release 3.1.2 April 2011

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 THE LICENSE FILE) 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. TIBCO, The Power of Now, TIBCO ActiveMatrix, and TIBCO Enterprise Message Service 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 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 (c) 2005-2011 TIBCO Software Inc. ALL RIGHTS RESERVED. TIBCO Software Inc. Confidential Information

TIBCO ActiveMatrix Service Bus Development Tutorials

TOC | 5

Contents
Preface..................................................................................................7
TIBCO Product Documentation................................................................................................8 Other TIBCO Product Documentation......................................................................................9 Third-Party Documentation....................................................................................................10 Typographical Conventions....................................................................................................11 Connecting with TIBCO Resources........................................................................................13

Chapter 1 Basic SOA Design Tutorials...........................................15 Chapter 2 Mediation Tutorials.........................................................17 Chapter 3 Policy Tutorials...............................................................19
Configuring the ResourceInstance Attribute in an External Policy.........................................20 Preparing an Application that Injects Resource Instances into Policies.................................21

Glossary..........................................................................................................23

TIBCO ActiveMatrix Service Bus Development Tutorials

6 | TOC

TIBCO ActiveMatrix Service Bus Development Tutorials

Preface
TIBCO ActiveMatrix Service Bus is a scalable and extensible platform for developing, deploying, and managing applications that conform to a service-oriented architecture.

TIBCO ActiveMatrix Service Bus Development Tutorials

8 | Preface

TIBCO Product Documentation


The following documents form the TIBCO ActiveMatrix Service Bus documentation set: Concepts: Read this manual before reading any other manual in the documentation set. This manual describes terminology and concepts of the TIBCO ActiveMatrix platform. The other manuals in the documentation set assume you are familiar with the information in this manual. Development Tutorials: Read this manual for a step-by-step introduction to the process of creating, packaging, and running composites in TIBCO Business Studio. Composite Development: Read this manual to learn how to develop and package composites. Mediation Component Development: Read this manual to learn how to configure and implement Mediation components. Mediation API Reference: Read this manual to learn how to configure and implement Mediation components. Administration Tutorials: Read this manual for a step-by-step introduction to the process of creating and starting the TIBCO ActiveMatrix runtime, starting TIBCO ActiveMatrix servers, and deploying applications to the runtime. Administration: Read this manual to learn how to manage the runtime and deploy and manage applications. Installation and Configuration: Read this manual to learn how to install TIBCO ActiveMatrix Service Bus software and create and upgrade runtime objects. Release Notes: Read this manual for a list of new and changed features, steps for migrating from a previous release, and lists of known issues and closed issues for the release.

TIBCO ActiveMatrix Service Bus Development Tutorials

Preface | 9

Other TIBCO Product Documentation


You may find it useful to read the documentation for the following TIBCO products: TIBCO Enterprise Message Service

TIBCO ActiveMatrix Service Bus Development Tutorials

10 | Preface

Third-Party Documentation
Service Component Architecture Service Assembly Model V1.00 Policy Framework V1.00 Transaction Policy V1.00 JMS Binding V1.00 World Wide Web Consortium Web Services WSDL 1.1 SOAP 1.1 Web Services Addressing OASIS Web Services Reliable Messaging 1.2 UDDI Version 3 Internet Engineering Task Force SMTP RFC 5321 LDAP RFC 4510 Java Community Process JDBC 4.0 JMS 1.1 Hibernate

TIBCO ActiveMatrix Service Bus Development Tutorials

Preface | 11

Typographical Conventions
Table 1: General Typographical Conventions Convention
TIBCO_HOME ENV_NAME

Use 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 a component of the path to the product shortcut in the Windows Start > All Programs menu. This name is referenced in documentation as ENV_NAME. Path The folder into which the product is installed. This folder is referenced in documentation as TIBCO_HOME. For example, on Windows systems the default value is C:\Program Files\tibco\amx-3. A TIBCO configuration folder stores configuration data generated by TIBCO products. Configuration data can include sample scripts, session data, configured binaries, logs, and so on. This folder is referenced in documentation as CONFIG_HOME. On Windows platforms, the default location of the folder is userHome\Application Data\amx-3\data. Code font identifies commands, code examples, filenames, pathnames, and output displayed in a command window. For example: Use MyCommand to start the foo process.

CONFIG_HOME

code font

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]

italic font

Italic font is used in the following ways: To indicate a document title. For example: See TIBCO 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.

TIBCO ActiveMatrix Service Bus Development Tutorials

12 | Preface Convention Use 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 2: Syntax Typographical Conventions Convention [] Use An optional item in command 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 param1 | 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 Development Tutorials

Preface | 13

Connecting with TIBCO Resources


How to Join TIBCOmmunity TIBCOmmunity is an online destination for TIBCO customers, partners, and resident experts, a place to share and access the collective experience of the TIBCO community. TIBCOmmunity offers forums, blogs, and access to a variety of resources. To register, go to http://www.tibcommunity.com. How to Access All TIBCO Documentation After you join TIBCOmmunity, you can access the documentation for all supported product versions here: http://docs.tibco.com/TibcoDoc. 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 username and password. If you do not have a username, you can request one.

TIBCO ActiveMatrix Service Bus Development Tutorials

Chapter

1
Basic SOA Design Tutorials
Many of the steps in cheat sheets launch modal dialogs. Once a dialog is open, you cannot expand the view containing cheat sheet content. To ensure that you can see all the content, before opening a dialog you can expand the view so that you could see all of the cheat sheet content or you can detach the view so that it can be resized even while a dialog is open. Many TIBCO ActiveMatrix SOA development tutorials are distributed as cheat sheets in TIBCO Business Studio. To access the cheat sheets, start TIBCO Business Studio, select Help > Cheat Sheets... ,and expand the TIBCO SOA Development node. For tutorials that are not cheat sheets, see the specific tutorial category. To access the basic SOA design tutorials, expand the Basic folder. Create an SOA Project with an Empty Composite Describes how to create an SOA project. Import Projects from an Archive Describes how to import projects from an archive file. Import a WSDL File into an SOA Project Describes how to import a WSDL file into an SOA project.

TIBCO ActiveMatrix Service Bus Development Tutorials

Chapter

2
Mediation Tutorials
Many of the steps in cheat sheets launch modal dialogs. Once a dialog is open, you cannot expand the view containing cheat sheet content. To ensure that you can see all the content, before opening a dialog you can expand the view so that you could see all of the cheat sheet content or you can detach the view so that it can be resized even while a dialog is open. Many TIBCO ActiveMatrix SOA development tutorials are distributed as cheat sheets in TIBCO Business Studio. To access the cheat sheets, start TIBCO Business Studio, select Help > Cheat Sheets... ,and expand the TIBCO SOA Development node. For tutorials that are not cheat sheets, see the specific tutorial category. To access the mediation tutorials, expand the Mediation folder. How to Create and Package a Hello World Mediation Flow Develop a simple Hello World application that returns an acknowledgment when a user submits a name to a SOAP client. How to Create and Package a Data Enrichment Mediation Flow Use the Invoke Operation mediation task to enrich data in a mediation flow. The Invoke Operation task enables you to enhance message input, so that the message gathers additional data as it follows the mediation flow to the target operation. How to Create and Package a Content-Based Routing and Data Transformation Mediation Flow Create a mediation flow that uses route tasks to send requests to service implementations in a sample Global Distribution System (GDS) travel service. Table 3: Sample Project Location Cheat Sheet Hello World Mediation Create and Package Content-Based Routing and Data Transformation Create and Package Data Enrichment Mediation Flow Create and Package Sample Project Archives
TIBCO_HOME/amx_it_mediation/3.3/samples/HelloWorld

TIBCO_HOME/amx_it_mediation/3.3/samples/ContentBasedRouting TIBCO_HOME/amx_it_mediation/3.3/samples/TargetService

TIBCO_HOME/amx_it_mediation/3.3/samples/DataEnrichment

TIBCO ActiveMatrix Service Bus Development Tutorials

Chapter

3
Policy Tutorials
Several external policies require you to configure an attribute named resourceInstance. The value of that attribute is not an actual resource instance, but an application that references the required resource instance; the purpose of the application is to inject the resource instance into policies that require it. When configuring these policies, you must first ensure that the appropriate application is deployed and running on the nodes where you will deploy the policy. To prepare the resource instance and application, see Preparing an Application that Injects Resource Instances into Policies on page 21. To configure the policy to use the application, see Configuring the ResourceInstance Attribute in an External Policy on page 20. The location of the sample policies is TIBCO_HOME/amx/3.1/samples/policy/samples.zip

Topics Configuring the ResourceInstance Attribute in an External Policy Preparing an Application that Injects Resource Instances into Policies

TIBCO ActiveMatrix Service Bus Development Tutorials

20 | Policy Tutorials

Configuring the ResourceInstance Attribute in an External Policy


Procedure Several external policies require you to configure an attribute named resourceInstance. When configuring such policies (by copying from the samples), replace the sample value of the resourceInstance attribute with the actual name of the application that references (and injects) the appropriate resource instance.

TIBCO ActiveMatrix Service Bus Development Tutorials

Policy Tutorials | 21

Preparing an Application that Injects Resource Instances into Policies


Procedure 1. Create resource templates of the required types: Policy Signing or Decryption

Required Resource Templates Identity Provider Keystore Provider

Signature Verification or Encryption

Trust Provider Keystore Provider

Both of the above

Mutual Identity Provider Keystore Provider

WssProvider or WssConsumer LDAP for authentication

WS-Security ASP LDAP Authentication Provider

2. Create a resource instance from each template. 3. Create governance agent applications that reference the resource instances (one application per resource instance): Resource Instance Type LDAP Authentication Provider Mutual Identity Provider Application Template Application Template DAA Name

TIBCO ActiveMatrix com.tibco.governance.sharedresource.ldap.asp.daa Governance Agent LDAP Authentication Provider App Template TIBCO ActiveMatrix Governance Agent Mutual Identity Provider App Template TIBCO ActiveMatrix Governance Agent Identity Provider App Template TIBCO ActiveMatrix Governance Agent Trust Provider App Template
com.tibco.governance.sharedresource.mutual.isp.daa

Identity Provider

com.tibco.governance.sharedresource.subject.isp.daa

Trust Provider

com.tibco.governance.sharedresource.trust.isp.daa

WS-Security ASP

TIBCO ActiveMatrix com.tibco.governance.sharedresource.wss.asp.daa Governance Agent WSS Authentication Provider App Template

4. Distribute the applications to the appropriate nodes and run them. Each application that injects a resource instance must run on every node where a policy requires that resource instance.

TIBCO ActiveMatrix Service Bus Development Tutorials

22 | Policy Tutorials 5. Each application type has a single property that you must set. In the Properties tab of the application, specify the resource instance name as the value of that property. For example, the Trust Provider application has a property named TrustIspConnectionFactory. Set its value to the name of the resource instance that this application injects into policies.

TIBCO ActiveMatrix Service Bus Development Tutorials

OpenTopic | Glossary | 23

Glossary

24 | OpenTopic | Glossary

You might also like