Spice Up Your Oracle Knowledge – SOA EXSite – A Practical View On Oracle ESB

Oracle and Distrilogie are presenting different “Monthly Oracle Partner Training” programs and the first month (September) the focus lies on SOA.
This is a partner-dedicated event aimed at informing the Partner community about Oracle Acquisition strategy and “Best-in-Class” offerings that are critical to meet the customer needs.

My task was to give the partners a practical view on Oracle Enterprise Service Bus using a pre-sales case I’ve worked providing an answer to the customers’ specific technical requirements.

This presentation first gives an insight on the business requirements stated by the customer and then focuses on the business value of ESB for each of these requirements.

  • The first requirement was regarding the ability to work with one General Business Object (GBO) that described the customers’ data model. The answer in ESB is using an XML Schema Definition File (xsd) where we describe the required data in an hierarchical, nested manner. Given the customer the possibility to work with the same object throughout the whole business process.
  • The second requirement ‘How can we make a synchronous call from existing applications to an ESB Service?’ ‘How can we propagate changes to our different systems’? The first answer uses file- and ftp-adapter to bacth-read a CSV file. The file is polled for using the file adapter, format the file in a required format using the transform-functionality of ESB and put this file on the ftp-server of the client. For the second question regarding propagation I’ve given a demo where a JMS queue will listen for new messages. Once a message has been received a call will be made to a procedure on the database to unpack the message and create a new record. In this demo I’ve also mentioned the managed- and non-managed approach when implementing ESB Services which explains the virtualization-features of ESB.
  • The 3d requirement was regarding two-way synchronous services were I’ve integrated the ESB Services with an ADF Faces Web Application. Giving the customer an insight on the ease of integration between Oracle ADF and ESB Services using the data binding layer on Web Services.
  • In the last requirement the customer was curious about the integration-possibilities of web services and database procedures, jobs. The question that popped their mind: ‘Can we schedule a web service call using a database job?’. And this is no hastle at all, not for ESB and not for our Oracle Database. We can use the utl_http-package or utl_dbws-package to call our web service endpoint and the procedure holding the pl/sql functionality will be scheduled using dbms_job.

This demo and presentation gave me and the customers a real practical hands-on experience of Oracle’s Enterprise Service Bus and convinced us of the ease of integration when using such technology.

A pragmatic approach and an open vision using practical demo’s and hands-on sessions is the answer to every Enterprise Integration Challenge.

Invoke an ESB Service in your User Interface and display the response of this service

How can you bind an ESB Service in your User Interface and more specifically how can I call an ESB Routing Service and get the Result back in my UI?

Let’s say I’m developing a JSF Application and I want to use my existing ESB Services for my binding layer. The way you bind a webservice inside a JSF Application can be resolved in 2 different ways:

  • Create a Webservice Data Control
  • Create a Web Service Proxy and call the endpoint of the webservice with a valid parameter using for example a backing bean

OK, now I’m able to call an ESB Service but how can I get the response of this service back into my User Interface …

You need to create a two-way ESB Routing Service, meaning you need to define a request- and response-operation in your routing service.
E.g. You’re invoking a select on a table and the resultset needs to be displayed in your UI. In other words you want to show a list of employees in your user interface, and this list is bound to an esb service.

The steps you need to perform to get this working:

  • Create a new ESB Project
  • Define a system/group for you Esb Services (in this way it isn’t published to the default system)
  • Create a Database Adapter where you define a select statement on a given table
  • Define a new Routing Service where you define the request parameter, being the selectInputParameters-tag which is provided in the xsd that was generated for your DB Adapter and the reply parameter of the Routing Service is the collection returned by this same xsd.
  • Publish the ESB Service to your ESB Server

Now you can test this ESB Service to see that the resultset of the database adapter is returned by your routing service.

The next step is to define a UI where we can call this ESB Service, the steps you need to perform:

  • Create a new project and define a new JSF-page in this project
  • Create a Web Service Data Control ‘which can be found in the ‘Business Tier’ categorie of the ‘new gallery’
  • In step 1 you need to define a meaningfull name for the web service and in the URL you need to copy/paste the ‘Concrete WSDL URL’ of your routing service which is available through the ESB Control’. Then click browse to get the methods/operations available in the ESB Service and click next
  • In step 2 you need to choose the operation ‘execute’ and add it to the ‘selected’ area, click next
  • Click finish

Now you’re almost there, you’ve defined the web service data control which let’s you bind your UI to your ESB Service. The last thing you need to do now is to create a jsf-page and drag and drop your object inside the jsf-page:

  • Create a JSF-page
  • Drag-and-drop a PanelPage component inside the JSF page to have a nice lay-out
  • Go to the Control Palette and choose the ‘employees’-collection, your resulting objects of the db adapter, and drag-and-drop it into your jsf page.
  • Choose a table-component to have a nice view of your data

And now it’s show time … run the page in your embedded container and have a look at how esb services can be seamlessly integrated into your UI.