Red Hat Training

A Red Hat training course is available for JBoss Enterprise SOA Platform

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 ToolsProject 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 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.
  5. Select the relevant ESB project example and then click the Finish button. The ESB application project and the test client project will be created.
    HelloWorld example

    Figure 3.2. HelloWorld example

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