Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Oracle Service Bus 11g Development Cookbook

You're reading from  Oracle Service Bus 11g Development Cookbook

Product type Book
Published in Jan 2012
Publisher Packt
ISBN-13 9781849684446
Pages 522 pages
Edition 1st Edition
Languages

Table of Contents (19) Chapters

Oracle Service Bus 11g Development Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Creating a basic OSB service Working Efficiently with OSB Artifacts in Eclipse OEPE Messaging with JMS Transport Using EJB and JEJB transport Using HTTP Transport Using File and Email Transports Communicating with the Database Communicating with SOA Suite Communication, Flow Control, and Message Processing Reliable Communication with the OSB Handling Message-level Security Requirements Handling Transport-level Security Requirements Index

Chapter 2. Working Efficiently with OSB Artifacts in Eclipse OEPE

In this chapter, we will cover:

  • Setting up an OSB project to work with JCA adapters

  • Using context menu to add nodes and actions to message flow

  • Moving nodes/actions in Eclipse OEPE by drag-and-drop

  • Copying nodes/actions in Eclipse OEPE from one place to another

  • Moving artifacts inside the same OSB project

  • Copying artifacts from one project into another

  • Debugging OSB services through Eclipse OEPE

Introduction


In this chapter, we present different recipes for making the daily work with the Oracle Service Bus (OSB) more efficient. The Eclipse OEPE has some good-to-know features, which supports the creation and changing/refactoring of the message flow of a proxy service as well as the refactoring of the project structure.

We will also show how to set up an OSB project so that the JCA adapters known from the Oracle SOA Suite can be efficiently used within the OSB.

Also in this chapter, we will cover how to debug a proxy service using the graphical debugger built into the Eclipse OEPE development environment and we will see how to reuse functionality through private proxy services.

Setting up an OSB project to work with JCA adapters


Since Oracle Service Bus 11g, the JCA adapter's framework is available at runtime, but the definition of the adapters through the wizards is only available in JDeveloper and not in Eclipse OEPE. To be able to use the adapters, JDeveloper with the SOA Suite extension installed needs to be available.

This recipe will show the basis for how to use the JCA adapters together with an OSB project. The idea is to avoid having to copy metadata from one place to the other by nesting the JDeveloper project inside the OSB project. This approach will be used by all other recipes working with the JCA adapters, such as the File, DB and AQ adapter recipes.

Getting ready

In order to use this recipe, both a working Eclipse and JDeveloper IDE needs to be available. In JDeveloper, you also need to install the SOA Suite extension.

How to do it...

First we create an empty OSB project with the correct folder structure. In Eclipse OEPE, perform the following steps...

Using context menu to add nodes and actions to message flow


So far we have used the drag-and-drop feature for adding nodes and actions to the message flow of a proxy service. However, there is also a more developer-friendly approach, where we don't have to know where in the palette a given item is and especially which items are allowed in a given context.

Getting ready

You can import the OSB project containing the base setup for this recipe into Eclipse OEPE from \chapter2\getting-ready\using-context-menu-to-add-nodes-actions.

How to do it...

Navigate to the Message Flow tab and perform the following steps:

  1. In the message flow, right-click on any element, for example, on the Default branch of the operational branch node.

  2. In the given context, Insert Into and Insert After are possible.

  3. Select Insert Into and then the element to be added. In the given context, the Default handler, only a Conditional Branch, an Operational Branch, a Pipeline Pair, or a Route are valid and therefore the context menu...

Moving nodes/actions in Eclipse OEPE by drag-and-drop


This recipe will just present a simple approach for doing refactoring of nodes and actions within a single message flow. It uses the drag-and-drop functionality of the Eclipse OEPE to move around the items on the graphical representation of the message flow.

Getting ready

You can import the OSB project containing the base setup for this recipe into Eclipse OEPE from \chapter2\getting-ready\moving-nodes\actions-by-drag-and-drop.

How to do it...

If an existing message flow needs to be refactored and some nodes or actions need to be moved around, the Eclipse OEPE provides us with the drag-and-drop functionality, and a simple way to achieve this. For example to move a Pipeline Pair node from one place to another, perform the following actions in Eclipse OEPE:

  1. Open the CustomerManagement proxy service and navigate to the Message Flow tab.

  2. Select the node to move, for example, the PipelinePair node in the FindCustomer branch.

  3. Drag the selected node...

Copying nodes/actions from one place to another


This recipe will just present a simple approach for doing refactoring of nodes and actions. It uses the copy/paste functionality of the Eclipse OEPE to copy a node/action from one place to another.

Getting ready

You can import the OSB project containing the base set up for this recipe into Eclipse OEPE from \chapter2\getting-ready\copying-nodes-actions.

How to do it...

Often when creating a new message flow, some node/actions are very similar. Instead of creating all of them from scratch, there is a way to copy them in Eclipse OEPE. To duplicate a PipelinePair node, perform the following steps:

  1. Open the CustomerManagement proxy service and navigate to the Message Flow tab.

  2. Right-click on the node/action to copy, for example, the PipelinePair node in the FindCustomer branch and select Copy.

  3. Right-click on the PipelinePair node and select Paste.

  4. The PipelinePair has been duplicated under the new name PipelinePair1.

  5. The whole PipelinePair node including...

Moving artifacts inside the same OSB project


This recipe will show how to refactor the structure of an OSB project inside Eclipse OEPE. Simply use the drag-and-drop functionality to move an artifact from one place to another and Eclipse OEPE will make sure that all internal links are updated accordingly.

We will use a simple OSB project with one proxy service calling another proxy service:

Both proxy services implement the same WSDL interface. We will show how the proxy services can be refactored so that the private proxy service is located in its own folder. In the second step, we will also move the WSDL file into another folder.

Getting ready

Import the base OSB project for this recipe from here: \chapter-2\getting-ready\moving-artifacts-inside-osb-project.

How to do it...

First let's move the proxy service CustomerManagementLocal into a local folder located inside the proxy folder. In Eclipse OEPE, perform the following steps:

  1. Create a new folder inside the proxy folder by right-clicking on...

Copying artifacts from one project into another


This recipe will show how to copy artifacts from one OSB project into another OSB project. This is useful for duplicating artifacts in order to reuse them.

We will use the same project as in the previous recipe, with one proxy service calling another proxy service.

Getting ready

Import the base OSB project for this recipe from here: \chapter-2\getting-ready\copying-artifacts-from-project-to-other.

How to do it...

Let's see how we can copy the proxy, wsdl and xsd artifacts into another OSB project. For that we first create a new OSB project in the same OSB configuration and then copy the artifacts. In Eclipse OEPE, perform the following steps:

  1. Create a new OSB project and name it copy-of-artifacts.

  2. Select the proxy, wsdl, and xsd folder with a multiselect in the copying-artifacts-from-project-to-other project, right-click and select Copy.

  3. Right-click on the copy-of-artifacts project and select Paste.

  4. The artifacts are copied into the new OSB project...

Debugging services through Eclipse OEPE


We have already seen in the Testing the proxy service through the OSB console recipe that the OSB provides an Invocation Trace when executing an OSB service through the test console. The Invocation Trace is one possible solution for debugging if something is not working as expected. But its use is limited to the test console.

This recipe will show a more developer-friendly way for debugging. We will show how to use the visual debugger available with the Eclipse OEPE.

Getting ready

Make sure to have the current state of the basic-osb-service project from Chapter 1, Creating a Basic OSB Service available in Eclipse OEPE. We will use it for this recipe. If necessary, it can be imported from here: \chapter-1\solution\with-transformation-proxy-service-created.

For this recipe, we also have to make sure that the OSB server runs in debug mode. The status of a server in the Servers tab in the Eclipse OEPE indicates in which mode the server is started. A value...

lock icon The rest of the chapter is locked
You have been reading a chapter from
Oracle Service Bus 11g Development Cookbook
Published in: Jan 2012 Publisher: Packt ISBN-13: 9781849684446
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}