JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide

JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide

JBoss Enterprise SOA Platform 5

ESB Tools Reference Guide

This guide is for developers

Edition 5.3.1

David Le Sage B Long

JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide

This guide is for developers

Edition 5.3.1

David Le Sage

Red Hat Engineering Co ntent Services [email protected] m

B Lo ng

Red Hat Engineering Co ntent Services belo [email protected] m

Legal Notice

Copyright © 2013 Red Hat, Inc..

This document is licensed by Red Hat under the

Creative Commons Attribution-ShareAlike 3.0 Unported

License

. If you distribute this document, or a modified version of it, you must provide attribution to Red

Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed.

Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section

4d of CC-BY-SA to the fullest extent permitted by applicable law.

Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.

Linux ® is the registered trademark of Linus Torvalds in the United States and other countries.

Java ® is a registered trademark of Oracle and/or its affiliates.

XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.

MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and other countries.

Node.js ® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.

The OpenStack ® Word Mark and OpenStack Logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.

All other trademarks are the property of their respective owners.

Abstract

This guide teaches developers how to use JBDS' ESB Tools plug-in.

Table of Contents

1. Document Conventions

1.1. Typographic Conventions

1.2. Pull-quote Conventions

1.3. Notes and Warnings

2. Getting Help and Giving Feedback

2.1. Do You Need Help?

2.2. Give us Feedback

1.1. Business Integration

1.2. What is a Service-Oriented Architecture?

1.3. Key Points of a Service-Oriented Architecture

1.4. What is the JBoss Enterprise SOA Platform?

1.5. The Service-Oriented Architecture Paradigm

1.6. Core and Components

1.7. Components of the JBoss Enterprise SOA Platform

1.8. JBoss Enterprise SOA Platform Features

1.9. Features of the JBoss Enterprise SOA Platform's JBossESB Component

1.10. Task Management

1.11. Integration Use Case

1.12. Utilising the JBoss Enterprise SOA Platform in a Business Environment

2.1. Intended Audience of the ESB Tools Reference Guide

2.2. Aim of the ESB Tools Reference Guide

2.3. Back Up Your Data

3.1. Using and Configuring the SOA Platform

3.2. Installing JBoss SOA Tooling Plug-in

3.3. Configuring a new ESB Runtime

3.4. Creating an ESB Project

3.5. Using ESB Project Examples

3.6. Adding ESB Projects to the JBoss Server Module List

3.7. Deploying an ESB Project

3.8. Creating an ESB File

3.9. Creating an ESB Action

4.1. The JBoss ESB Editor

4.2. Adding a New Custom Action in JBoss ESB Editor

4.3. Content Assist for ESB XML Files

4.4. OpenOn for ESB XML

5.1. Summary of ESB Tools and Additional Resources

Table of Contents

9

9

8

8

7

7

7

8

9

10

10

11

4

5

3

3

5

5

6

12

12

12

13

13

13

15

15

17

17

18

18

20

21

22

22

24

1

2

JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide

Preface

Preface

1. Document Conventions

This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information.

In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts set. The

Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later include the Liberation

Fonts set by default.

1.1. Typographic Conventions

Four typographic conventions are used to call attention to specific words and phrases. These conventions, and the circumstances they apply to, are as follows.

Mono-spaced Bold

Used to highlight system input, including shell commands, file names and paths. Also used to highlight keys and key combinations. For example:

To see the contents of the file my_next_bestselling_novel in your current working directory, enter the cat my_next_bestselling_novel command at the shell prompt and press Enter to execute the command.

The above includes a file name, a shell command and a key, all presented in mono-spaced bold and all distinguishable thanks to context.

Key combinations can be distinguished from an individual key by the plus sign that connects each part of a key combination. For example:

Press Enter to execute the command.

Press Ctrl+Alt+F2 to switch to a virtual terminal.

The first example highlights a particular key to press. The second example highlights a key combination: a set of three keys pressed simultaneously.

If source code is discussed, class names, methods, functions, variable names and returned values mentioned within a paragraph will be presented as above, in mono-spaced bold. For example:

File-related classes include filesystem for file systems, file for files, and dir for directories. Each class has its own associated set of permissions.

Proportional Bold

This denotes words or phrases encountered on a system, including application names; dialog box text; labeled buttons; check-box and radio button labels; menu titles and sub-menu titles. For example:

Choose SystemPreferencesMouse from the main menu bar to launch Mouse

Preferences. In the Buttons tab, select the Left-handed mouse check box and click

Close to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).

To insert a special character into a gedit file, choose ApplicationsAccessories

3

JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide

Character Map from the main menu bar. Next, choose SearchFind… from the

Character Map menu bar, type the name of the character in the Search field and click

Next. The character you sought will be highlighted in the Character T able. Double-click this highlighted character to place it in the Text to copy field and then click the Copy button. Now switch back to your document and choose EditPaste from the gedit menu bar.

The above text includes application names; system-wide menu names and items; application-specific menu names; and buttons and text found within a GUI interface, all presented in proportional bold and all distinguishable by context.

Mono-spaced Bold Italic or Proportional Bold Italic

Whether mono-spaced bold or proportional bold, the addition of italics indicates replaceable or variable text. Italics denotes text you do not input literally or displayed text that changes depending on circumstance. For example:

To connect to a remote machine using ssh, type ssh username@domain.name at a shell prompt. If the remote machine is example.com and your username on that machine is john, type ssh [email protected].

The mount -o remount file-system command remounts the named file system. For example, to remount the /home file system, the command is mount -o remount /home.

To see the version of a currently installed package, use the rpm -q package command. It will return a result as follows: package-version-release.

Note the words in bold italics above — username, domain.name, file-system, package, version and release. Each word is a placeholder, either for text you enter when issuing a command or for text displayed by the system.

Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and important term. For example:

Publican is a DocBook publishing system.

1.2. Pull-quote Conventions

Terminal output and source code listings are set off visually from the surrounding text.

Output sent to a terminal is set in mono-spaced roman and presented thus: books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs

Source-code listings are also set in mono-spaced roman but add syntax highlighting as follows:

4

Preface package org.

jboss .

book .

jca .

ex1 ; import javax.naming.InitialContext; public class ExClient

{ public static void main (String args[]) throws Exception

{

InitialContext iniCtx = new InitialContext();

Object ref = iniCtx.

lookup ( "EchoBean" );

EchoHome home = (EchoHome) ref;

Echo echo = home.

create ();

System.

out .

println ( "Created Echo" );

System.

out .

println ( "Echo.echo('Hello') = " + echo.

echo ( "Hello" ));

}

}

1.3. Notes and Warnings

Finally, we use three visual styles to draw attention to information that might otherwise be overlooked.

Note

Notes are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note should have no negative consequences, but you might miss out on a trick that makes your life easier.

Important

Important boxes detail things that are easily missed: configuration changes that only apply to the current session, or services that need restarting before an update will apply. Ignoring a box labeled 'Important' will not cause data loss but may cause irritation and frustration.

Warning

Warnings should not be ignored. Ignoring warnings will most likely cause data loss.

2. Getting Help and Giving Feedback

2.1. Do You Need Help?

If you experience difficulty with a procedure described in this documentation, visit the Red Hat Customer

Portal at http://access.redhat.com

. Through the customer portal, you can: search or browse through a knowledgebase of technical support articles about Red Hat products.

submit a support case to Red Hat Global Support Services (GSS).

access other product documentation.

5

JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide

Red Hat also hosts a large number of electronic mailing lists for discussion of Red Hat software and technology. You can find a list of publicly available mailing lists at https://www.redhat.com/mailman/listinfo .

Click on the name of any mailing list to subscribe to that list or to access the list archives.

2.2. Give us Feedback

If you find a typographical error, or know how this guide can be improved, we would love to hear from you. Submit a report in Bugzilla against the product JBoss Enterprise SOA Platform 5 and the component doc-ESB_Tools_Reference_Guide. The following link will take you to a pre-filled bug report for this product: https://bugzilla.redhat.com/.

Fill out the following template in Bugzilla's Description field. Be as specific as possible when describing the issue; this will help ensure that we can fix it quickly.

Document URL:

Section Number and Name:

Describe the issue:

Suggestions for improvement:

Additional information:

Be sure to give us your name so that you can receive full credit for reporting the issue.

6

Chapter 1. Preface

Chapter 1. Preface

1.1. Business Integration

In order to provide a dynamic and competitive business infrastructure, it is crucial to have a serviceoriented architecture in place that enables your disparate applications and data sources to communicate with each other with minimum overhead.

The JBoss Enterprise SOA Platform is a framework capable of orchestrating business services without the need to constantly reprogram them to fit changes in business processes. By using its business rules and message transformation and routing capabilities, JBoss Enterprise SOA Platform enables you to manipulate business data from multiple sources.

Report a bug

1.2. What is a Service-Oriented Architecture?

Introduction

A Service Oriented Architecture (SOA) is not a single program or technology. Think of it, rather, as a software design paradigm.

As you may already know, a hardware bus is a physical connector that ties together multiple systems and subsystems. If you use one, instead of having a large number of point-to-point connectors between pairs of systems, you can simply connect each system to the central bus. An enterprise service bus

(ESB) does exactly the same thing in software.

The ESB sits in the architectural layer above a messaging system. This messaging system facilitates

asynchronous communications between services through the ESB. In fact, when you are using an ESB, everything is, conceptually, either a service (which, in this context, is your application software) or a

message being sent between services. The services are listed as connection addresses (known as

end-points references.)

It is important to note that, in this context, a "service" is not necessarily always a web service. Other types of applications, using such transports as File Transfer Protocol and the Java Message Service, can also be "services."

Note

At this point, you may be wondering if an enterprise service bus is the same thing as a serviceoriented architecture. The answer is, "Not exactly." An ESB does not form a service-oriented architecture of itself. Rather, it provides many of the tools than can be used to build one. In particular, it facilitates the loose-coupling and asynchronous message passing needed by a SOA.

Always think of a SOA as being more than just software: it is a series of principles, patterns and best practices.

Report a bug

1.3. Key Points of a Service-Oriented Architecture

7

JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide

These are the key components of a service-oriented architecture:

1. the messages being exchanged

2. the agents that act as service requesters and providers

3. the shared transport mechanisms that allow the messages to flow back and forth.

Report a bug

1.4. What is the JBoss Enterprise SOA Platform?

The JBoss Enterprise SOA Platform is a framework for developing enterprise application integration

(EAI) and service-oriented architecture (SOA) solutions. It is made up of an enterprise service bus

(JBoss ESB) and some business process automation infrastructure. It allows you to build, deploy, integrate and orchestrate business services.

Report a bug

1.5. The Service-Oriented Architecture Paradigm

The service-oriented architecture (SOA) consists of three roles: requester, provider, and broker.

Service Provider

A service provider allows access to services, creates a description of a service and publishes it to the service broker.

Service Requester

A service requester is responsible for discovering a service by searching through the service descriptions given by the service broker. A requester is also responsible for binding to services provided by the service provider.

Service Broker

A service broker hosts a registry of service descriptions. It is responsible for linking a requester to a service provider.

Report a bug

1.6. Core and Components

The JBoss Enterprise SOA Platform provides a comprehensive server for your data integration needs.

On a basic level, it is capable of updating business rules and routing messages through an Enterprise

Service Bus.

The heart of the JBoss Enterprise SOA Platform is the Enterprise Service Bus. JBoss (ESB) creates an environment for sending and receiving messages. It is able to apply “actions” to messages to transform them and route them between services.

There are a number of components that make up the JBoss Enterprise SOA Platform. Along with the

ESB, there is a registry (jUDDI), transformation engine (Smooks), message queue (HornetQ) and BPEL engine (Riftsaw).

8

Chapter 1. Preface

Report a bug

1.7. Components of the JBoss Enterprise SOA Platform

A full Java EE-compliant application server (the JBoss Enterprise Application Platform) an enterprise service bus (JBoss ESB) a business process management system (jBPM) a business rules engine (JBoss Rules) support for the optional JBoss Enterprise Data Services (EDS) product.

Report a bug

1.8. JBoss Enterprise SOA Platform Features

The JBoss Enterprise Service Bus (ESB)

The ESB sends messages between services and transforms them so that they can be processed by different types of systems.

Business Process Execution Language (BPEL)

You can use web services to orchestrate business rules using this language. It is included with

SOA for the simple execution of business process instructions.

Java Universal Description, Discovery and Integration (jUDDI)

This is the default service registry in SOA. It is where all the information pertaining to services on the ESB are stored.

Smooks

This transformation engine can be used in conjunction with SOA to process messages. It can also be used to split messages and send them to the correct destination.

JBoss Rules

This is the rules engine that is packaged with SOA. It can infer data from the messages it receives to determine which actions need to be performed.

Report a bug

1.9. Features of the JBoss Enterprise SOA Platform's JBossESB

Component

The JBoss Enterprise SOA Platform's JBossESB component supports:

Multiple transports and protocols

A listener-action model (so that you can loosely-couple services together)

Content-based routing (through the JBoss Rules engine, XPath, Regex and Smooks)

9

JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide

Integration with the JBoss Business Process Manager (jBPM) in order to provide service orchestration functionality

Integration with JBoss Rules in order to provide business rules development functionality.

Integration with a BPEL engine.

Furthermore, the ESB allows you to integrate legacy systems in new deployments and have them communicate either synchronously or asynchronously.

In addition, the enterprise service bus provides an infrastructure and set of tools that can:

Be configured to work with a wide variety of transport mechanisms (such as e-mail and JMS),

Be used as a general-purpose object repository,

Allow you to implement pluggable data transformation mechanisms,

Support logging of interactions.

Important

There are two trees within the source code: org.jboss.internal.soa.esb and

org.jboss.soa.esb. Use the contents of the org.jboss.internal.soa.esb package sparingly because they are subject to change without notice. By contrast, everything within the

org.jboss.soa.esb package is covered by Red Hat's deprecation policy.

Report a bug

1.10. Task Management

JBoss SOA simplifies tasks by designating tasks to be performed universally across all systems it affects. This means that the user does not have to configure the task to run separately on each terminal.

Users can connect systems easily by using web services.

Businesses can save time and money by using JBoss SOA to delegate their transactions once across their networks instead of multiple times for each machine. This also decreases the chance of errors ocurring.

Report a bug

1.11. Integration Use Case

Acme Equity is a large financial service. The company possesses many databases and systems. Some are older, COBOL-based legacy systems and some are databases obtained through the acquisition of smaller companies in recent years. It is challenging and expensive to integrate these databases as business rules frequently change. The company wants to develop a new series of client-facing ecommerce websites, but these may not synchronise well with the existing systems as they currently stand.

The company wants an inexpensive solution but one that will adhere to the strict regulations and security requirements of the financial sector. What the company does not want to do is to have to write and maintain “glue code” to connect their legacy databases and systems.

The JBoss Enterprise SOA Platform was selected as a middleware layer to integrate these legacy systems with the new customer websites. It provides a bridge between front-end and back-end systems.

10

Chapter 1. Preface

Business rules implemented with the JBoss Enterprise SOA Platform can be updated quickly and easily.

As a result, older systems can now synchronise with newer ones due to the unifying methods of SOA.

There are no bottlenecks, even with tens of thousands of transactions per month. Various integration types, such as XML, JMS and FTP, are used to move data between systems. Any one of a number of enterprise-standard messaging systems can be plugged into JBoss Enterprise SOA Platform providing further flexibility.

An additional benefit is that the system can now be scaled upwards easily as more servers and databases are added to the existing infrastructure.

Report a bug

1.12. Utilising the JBoss Enterprise SOA Platform in a Business

Environment

Cost reduction can be achieved due to the implementation of services that can quickly communicate with each other with less chance of error messages occurring. Through enhanced productivity and sourcing options, ongoing costs can be reduced.

Information and business processes can be shared faster because of the increased connectivity. This is enhanced by web services, which can be used to connect clients easily.

Legacy systems can be used in conjunction with the web services to allow different systems to "speak" the same language. This reduces the amount of upgrades and custom code required to make systems synchronise.

Report a bug

11

JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide

Chapter 2. Introduction

2.1. Intended Audience of the ESB Tools Reference Guide

Introduction

This book is aimed at developers who wish to learn about performing tasks and using features in the

JBoss Enterprise Service Bus.

Report a bug

2.2. Aim of the ESB Tools Reference Guide

This book aims to teach users about the functionality that JBoss ESB plugin provides for work with

JBoss ESB. Readers will learn how to perform basic tasks such as creating ESB projects, using the ESB editor and how to utilize features to make for a more efficient workflow.

Report a bug

2.3. Back Up Your Data

Warning

Red Hat recommends that you back up your system settings and data before undertaking any of the configuration tasks mentioned in this book.

Report a bug

12

Chapter 3. Tasks

Chapter 3. Tasks

3.1. Using and Configuring the SOA Platform

1. To configure the JBoss Enterprise SOA Platform, select WindowPreferencesServer

Runtime Environments. This will open the Server Runtime Environments page where you can add, remove and edit a server runtime environment.

2. Select Add and choose JBoss Enterprise MiddlewareJBoss Enterpise Application

Platform 5.x Runtime as a type of runtime environment, then check the Create a new local

server box and click Next.

3. On the next step you can specify a name of the server runtime environment and browse to its location. Click Finish to add the server runtime environment.

4. You have now configured the SOA Platform. Check the configuration by creating and running an

ESB project.

Report a bug

3.2. Installing JBoss SOA Tooling Plug-in

Procedure 3.1. Task

1. Start the JBoss Developer studio.

2. Select Get started with JBoss Central from the main menu.

3. Select Software/Update from the menu.

4. Select SOA Tooling Plug-in and click Install

5. Confirm that the installation details are correct and click Next and then Next again.

6. Read and accept the liscence agreement and click Finished.

7. Restart the JBoss Developer Studio to complete the installation.

Report a bug

3.3. Configuring a new ESB Runtime

1. Click WindowPreferencesJBoss ToolsJBoss ESB Runtimes to open the JBoss

ESB Runtimes page where you can add, remove and edit a JBoss ESB runtime.

13

JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide

Figure 3.1. Runtimes

14

2. Select Add to open a dialog box where you can specify the JBoss ESB runtime location, name and version number. You can define the configuration if you specify the home directory as JBoss AS or

SOA-P. If you select a standalone ESB runtime location, the configuration will be empty and can be ignored. You can also customize the libraries of the runtime by checking the Customize JBoss

ESB Runtime jars box.

3. The new JBoss ESB Runtime will be configured. Click Finish to finish and save the preferences.

You can use the configuration when creating a JBoss ESB project.

4. When an ESB runtime is configured for your project, you are able to modify it by using the

Classpath Container page for ESB runtime. To do so, go to the Package Explorer view and rightclick on "JBoss ESB Runtime" library.

5. Select Properties and a table listing all available JBoss ESB runtimes will appear.

6. Choose one of the runtimes to set to the ESB project and click OK.

7. The ESB container allows Source and JavaDoc locations to be set via the Properties dialog on each contained JAR. Right-click on any JAR file and select Properties.

8. Choose Java Source Attachment and select the location (folder, JAR or zip) containing new

Chapter 3. Tasks

8. Choose Java Source Attachment and select the location (folder, JAR or zip) containing new source for the chosen JAR file. You can do this using one of the suggested options (workspace, external folder or file). You can also enter the path manually.

9. Click on Apply and then on OK.

10. To change the Javadoc location, choose Javadoc Location and specify URL to the documentation generated by Javadoc. The Javadoc location will contain a file called package-

list.

11. Click on Apply and then on OK.

Report a bug

3.4. Creating an ESB Project

1. Open the JBoss ESB Project Creation wizard by selecting FileNewProject... in the main menu bar. (Ensure that you have defined the server runtime and ESB runtime in JBDS.)

2. Select ESBESB Project in the dialog box.

3. Clicking Next brings you to the JBoss ESB Project wizard page where a project name, ESB version and target JBoss Runtime are to be specified. Specify, for example, helloworld as a project name and accept the default JBoss ESB version.

4. Click the Next button to move to the next step in the wizard, where you can select the source and output folders.

5. Click the Next button to view the Install ESB Facet wizard page where you can view the ESB

Content Directory. This folder contains most the of artifacts that an ESB archive needs.

6. You can configure ESB libraries to the project by using the Server Supplied ESB Runtime.

Make sure the project has the target runtime set and this runtime has an ESB runtime installed.

Note

If you are using JBoss SOA Platform 5.3 or higher, select ESB config version 1.3.1.

7. Click the Finish button and an ESB project with the default jboss-esb.xml file will be created.

Report a bug

3.5. Using ESB Project Examples

1.

Note

Creating ESB project examples is useful for observing how your finished project will behave.

Before creating an ESB project example, create a JBoss SOA-P runtime.

2. Select FileNewOther... in the main menu bar and then click ExamplesJBoss Tools

Project Examples in the new dialog.

3. Clicking the Next button brings you to the wizard page where you can select an ESB project example from the list.

4. Every ESB example has two projects. One is an ESB project and the other is a Java project used

15

16

JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide

5. to test the ESB project. Below is a list of ready-to-go examples. Each example includes an ESB application that is deployed to the SOA-P server, and a test client that is run as a Java application and interacts with the deployed ESB application:

JBoss ESB HelloWorld Example - demonstrates the minimal files necessary to make a basic ESB component execute as well as to prove that the ESB runtime is properly configured.

JBoss ESB HelloWorld Action Example - demonstrates the use of multiple action invocations from a single configuration. You can use a single Action class and make multiple method calls or use multiple Action classes.

JBoss ESB HelloWorld File Action Example - demonstrates using the File gateway feature of the JBoss ESB. Files that are found in a particular directory with a particular extension are sent to a JMS queue with actions for processing.

JBoss ESB Web Service consumer1 Example - demonstrates how to consume a JSR181

Web Service in an ESB action.

JBoss ESB Web Service producer Example - demonstrates how to deploy a JSR181

Webservice endpoint on JBossESB using the SOAPProcessor action.

JBoss ESB Smooks CSV -> XML Example - demonstrates how to transform a comma separated value (CSV) file to an XML.

JBoss ESB Smooks XML -> POJO Example - demonstrates the use of Smooks performing a simple transformation by converting an XML file into Java POJOs.

JBoss ESB Smooks XML -> XML date-manipulation Example - demonstrates how to manually define and apply a Message Transformation within JBoss ESB.

JBoss ESB Smooks XML -> XML Example - a very basic example of how to manually define and apply a Message Transformation within JBoss ESB. It applies a very simple XSLT to a SampleOrder.xml message and prints the before and after XML to the console.

6. Select the relevant ESB project example and then click the Finish button. The ESB application project and the test client project will be created.

Chapter 3. Tasks

Figure 3.2. HelloWorld example

7. Deploy your ESB project and run a test class as a local Java application to see the test result in the Console view.

Report a bug

3.6. Adding ESB Projects to the JBoss Server Module List

1. Before deploying an ESB project, open the Servers view by selecting WindowShow View

OtherServerServers.

2. Create a JBoss server with an ESB runtime installed in the Servers view and start it.

3. Right-click on the new JBoss server, select Add and Remove Projects and add the ESB projects you want to deploy in the open dialog.

4. Click the Finish button to add the project to the server. You also can drag the ESB project from the Project Explorer view to the server.

Report a bug

3.7. Deploying an ESB Project

17

JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide

1. After adding the ESB project to the JBoss server module list, right-click the JBoss Server and select Publish to publish the project on the server. You can check the deploying result in the

Console view.

2. The Run and Debug options work on ESB projects causing a (re)deploy for a user designated server.

You can also click the "Finger touch" button for a quick restart of the project without restarting the server.

3. Exporting

Additionally, you can deploy your ESB project as an .esb archive. Right-click on the project and choose Export.

Choose ESBESB File and click Next.

Export the ESB project to the file system. Choose the destination and target runtime, then make the appropriate settings for the archive. Finally, click Finish

4. Your project is now deployed as an .esb archive.

Report a bug

3.8. Creating an ESB File

1. Open a project that has the ESB facet enabled. Select FileNewOther... in the main menu bar or context menu for your selected project, then click ESBESB File in the new dialog

2. Clicking the Next button brings you to the wizard page where a folder, name and version should be specified. For example, choose jboss-esb.xml as the name and accept the selected projects folder and the default version.

Note

For SOA-P version 5.3 your ESB version is 4.11 and the ESB file schema version is 1.3.1.

Older ESB file schema versions are also supported if you are using an older SOA-P server release.

3. Your file will be created in the selected project's folder by default. If you want to change the folder it is saved in, click Browse and select another destination.

4. Click Finish to generate the file.

Report a bug

3.9. Creating an ESB Action

1. Open an ESB or Java project.

2. Select FileNewOther in the main menu or from the context project menu. Then click ESB

ESB Action in the new dialog.

3. Click Next and you will be brought to the New ESB Action wizard where the class name should be specified. You can also set a package or add an interface.

4. JBoss ESB 4.9 introduced a new set of Action Annotations. The new set of Action Annotations help make it easier to create clean ESB Action implementations by hiding the complexities of implementing interfaces and abstract classes, as well as dealing with the ConfigTree type. If you wish use these annotations, check the type As annotated POJO. Otherwise check the type As

18

Chapter 3. Tasks

AbstractActionPipelineProcessor implementation.

The Annotations are:

@Process

@ConfigProperty

@Initialize

@Destroy

@BodyParam

@PropertyParam

@AttachmentParam

@OnSucess

@OnException

5. Click on Finish to generate the ESB Action class. This class will become available in ESB Editor wizards.

Report a bug

19

JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide

Chapter 4. Reference

4.1. The JBoss ESB Editor

1. The JBoss ESB editor has two views: Tree and Source. You can easily switch from the Tree view to the Source view by selecting the Source tab at the bottom of the editor and work in Source view, and vice-versa.

20

Figure 4 .1. Source view

2. Both views have full integration with the Outline view. The Outline view shows a tree structure of the ESB file. Select any element in the Outline view and it will jump to the same place in the

Tree/Source editor, so you can navigate through the source code with Outline view.

3. Both views are synchronized with each other, so any changes made in one of the views will immediately appear in the other.

4. The Tree view for the editor displays all ESB artifacts in a tree format. By selecting any node you can view and edit its properties which will appear on the right. Some properties are represented as links to the associated editors.

Chapter 4. Reference

Figure 4 .2. Tree view

5. When editing ESB actions which refer to other files (Drools, Groovy, Smooks, etc.), the label for the field turns into a link to launch the appropriate editor for that file.

6. Adding, editing or deleting of some artifacts operations are available right in the Tree view. Rightclick any node and select one of the available actions in the context menu.

7. You can add Channels and Properties for the Providers the same way or using the forms with

Add, Edit and Remove buttons to the right.

8. Additionally, you can add a Service and a new listener for it. Filters can also be added this way.

Report a bug

4.2. Adding a New Custom Action in JBoss ESB Editor

1. To add a new custom Action to your ESB XML file, go to the Tree view in the JBoss ESB Editor.

2. Select the Actions node under the Services node, then right-click and choose NewCustom

Action.

Alternatively, click the Add... button in the editor on the left.

3. You will see the ESB Action wizard. Specify a name and a Java class. Optionally, you can specify a process for the Action.

4. After creating the Action you can see it in the Tree view under the Actions node. You can preview

21

JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide and edit its settings in the Form editor on the left.

Report a bug

4.3. Content Assist for ESB XML Files

When you work with any ESB XML file in Source mode, Content Assist is available. It provides pop-up tips to help you complete your code statements. Type Ctrl-Space to see what tips are available.

Figure 4 .3. Content Assist for ESB XML file

Report a bug

4.4. OpenOn for ESB XML

ESB files come with the OpenOn feature that allows you to utilize multiple references in the file. Click and hold the Ctrl key down to view it.

22

Chapter 4. Reference

Figure 4 .4 . OpenOn

The OpenOn is implemented for different types of files with extensions such as .xsd .xml, and so on.

Report a bug

23

JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide

Chapter 5. Summary

5.1. Summary of ESB Tools and Additional Resources

This book has supplied you with all necessary information on the functionality that the JBoss ESB plugin provides for work with JBoss ESB.

You can find additional information by visiting the links below:

JBoss ESB

JBoss Wiki

JBoss ESB Documentation Library

The latest JBoss Tools/JBoss Developer Studio documentation builds are available on the JBoss Tools nightly documentation page .

Report a bug

24

Revision History

Revision 5.3.1-111.4 00

Rebuild with publican 4.0.0

2013-10-31

Revision 5.3.1-111 Wed Feb 20 2013

Built from Content Specification: 6854, Revision: 375405

Rüdiger Landmann

CS Builder Robot

Revision History

25

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement

Table of contents