Search My Ramblings

Monday, January 27, 2014

Oracle Service Bus IDE (Oracle Enterprise Pack for Eclipse) Installation Demystified

I've seen several sites that explain some steps on installing the Eclipse IDE, but nothing that presents an approach for knowing which version of the OEPE is required for which version of the Oracle Service Bus.  Hopefully you find this helpful and by "learning how to fish" can give a more sustainable approach to getting developers up and running in the OSB IDE sooner than later without any issues.

First, this is assuming you're installing the OEPE for 11g Oracle Service Bus.  With 12c the plan is to have Oracle Service Bus development available in JDeveloper 12c, and hopefully this process is much more straightforward and less confusing.

Find the OSB Installation Guide matching the version of OSB you're developing against.

This sounds pretty obvious, but if you find the correct installation guide for the correct version, there should be a reference to the version of OEPE to download in the "Obtaining the Software" section.  There should also be a handy link to the downloads page.  Follow the general instructions for installing the software provided by the link on that page, with the following key point:
  • At a minimum, you'll need to select the OEPE along with the Evaluation database.  The other options are not required for just setting up a development environment and testing on a remote OSB server.  Of course, for local testing you'll want to install Weblogic server in its entirety and probably Coherence as well.
This will install the correct version of Eclipse to support your specific OSB server, along with general server-side libraries required.  This does not include the actual Oracle Service Bus binaries and libraries, so at this point you'll be unable to do OSB development from the Eclipse installed.

Download the OSB Version needed and install

From the Oracle Service Bus downloads page, find the version of OSB needed and download the binaries under the "Product Installation" section.  Note that you just installed the prerequisites, so that step is not needed.  Follow the instructions to extract this .zip somewhere on your machine and start the setup executable.   Note that if you don't have an updated version of Java available on your path, you'll need to start the installer using
./setup -jreLoc {Path to Java home directory from previous step installation}
Hope this helps clarify the general installation process for the OSB IDE (OEPE).  After this step, you should be able to start the Eclipse editor under the directory used in the first step, in the  "oepe_{version}" subdirectory.  Good luck!

Thursday, January 23, 2014

Working with XML payloads in JMS queues from Oracle Service Bus

For some this may seem intuitive and obvious, but wasn't for me as an experienced Java developer for many years.  Having worked in JMS I recalled that the message types supported generally included Text, Object, Bytes, Stream, and Map.  So when I wanted to create both a publisher and subscriber in Oracle Service Bus to a queue I naturally configured each to use a "Text" message type.  This caused me issues in that the queue subscribing Proxy service message flow needed to have a Replace action early in the request pipeline that changed the $body from a text representation of the XML in the queue to an actual XML document using

Replace . in body with {fn-bea:inlinedXML($body)}

This does work.  However, I later realized that OSB has an additional layer of interpretation on top of JMS where if you configure the message type in both the Proxy service subscriber as well as the Business service publisher to use an "XML" message type, OSB will naturally handle and interpret the XML payload in the JMS queues appropriately, greatly simplifying your life.

I hope this helps and saves you some time in getting OSB working well with JMS.  Enjoy!