Documentos de Académico
Documentos de Profesional
Documentos de Cultura
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
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
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
Enabling Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Creating the JMS Monitoring Shared Resource Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Configuring Monitoring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
|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
vi
| Related Documentation
Related Documentation
This section lists documentation resources you may find useful.
Third-Party Documentation
TIBCO ActiveMatrix software supports the following standards: Service Component Architecture http://www.osoa.org/display/Main/Service+Component+Architecture+Sp ecifications
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
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
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.
Preface ix
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.
| Typographical Conventions
Table 2 Syntax Typographical Conventions Convention
[ ]
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}
Preface xi
xii
|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
| Chapter 1
Introduction
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.
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
services.
Policy AgentEnforces policies such as security authentication at end-points (URLs at which a consumer can access a service).
| 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
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.
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.
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.
| Chapter 1
Introduction
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
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
| Chapter 1
Introduction
|9
Chapter 2
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
10
| Chapter 2
Windows From the Start menu, follow the path All Programs > TIBCO > ENV_NAME > TIBCO Business Studio 2.3 > TIBCO Business Studio.
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.
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.
12
| Chapter 2
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:
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.
14
| Chapter 2
| 15
Chapter 3
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
16
| Chapter 3
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
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.
18
| Chapter 3
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.
1. Start Business Studio and select File > New > ActiveMatrix Resources... > ActiveMatrix SOA Project. 2. Click Next.
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
20
| Chapter 3
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.
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.
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.
22
| Chapter 3
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.
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.
24
| Chapter 3
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.
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.
26
| Chapter 3
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.
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.
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.
28
| Chapter 3
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 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.
30
| Chapter 3
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.
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
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.
2. In the references Properties view, click the button next to the HelloWorld_Reference of type Composite Reference.
32
| Chapter 3
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.
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:
34
| Chapter 3
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
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.
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.
36
| Chapter 3
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
38
| Chapter 3
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.
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.
40
| Chapter 3
| 41
Chapter 4
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
42
| Chapter 4
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
No
Create Environment
Start Node
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
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.
44
| Chapter 4
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.
46
| Chapter 4
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.
48
| Chapter 4
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.
2. Type the administrator username and password you supplied in Administrator credentials on page 45. The ActiveMatrix Administrator welcome screen opens:
50
| Chapter 4
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.
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.
52
| Chapter 4
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.
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.
54
| Chapter 4