5 Adding New Ordering Channels with Oracle Service Bus

This chapter describes how Oracle SOA Suite addresses the business challenge of adding new ordering channels. Overviews of how key components are used to address this challenge are provided, including file-based proxies in Oracle Service Bus, the Native Format Builder Wizard, Oracle Enterprise Manager Fusion Middleware Control, and the Oracle Service Bus debugger.

This chapter includes the following sections:

5.1 Business Challenge

Company X has a requirement for legacy systems to place orders in common delimited formats.without impacting the back end application. Protocol and data translation must be provided to minimize disruptions to the back end business logic of the ProcessOrder composite designed in Creating an Order Processing System.

5.2 Business Solution

To address these business challenges, Company X designs a business solution that uses the components described in Table 5-1.

Table 5-1 Components That Provide the Business Solution

Component How This Component Addresses The Business Challenge Component Description

Oracle Service Bus file-based proxy

An Oracle Service Bus pipeline connects a proxy service to a file ordering channel. The proxy handles incoming customer orders by file.

A pipeline validates the application before invocation. A proxy enables customers to invoke the composite through a proxy instead of connecting directly to the composite.

Native Format Builder Wizard

The file adapter transforms a comma-delimited order to an XML schema file for the order processing composite to use.

The Native Format Builder Wizard enables you to create a native schema file from a variety of file formats, such as delimited, fixed-length, complex type, data type description (DTD), and Cobol Copybook.

Oracle Service Bus Debugger

A breakpoint debugger set on the Oracle Service Bus pipeline tests and debugs the end-to-end application.

The Oracle Service Bus debugger enables you to set breakpoints directly in Oracle JDeveloper for troubleshooting on pipelines and split-joins.

Oracle Enterprise Manager Fusion Middleware Control

Oracle Enterprise Manager enables you to monitor and administer an Oracle Service Bus application.

Oracle Enterprise Manager Fusion Middleware Control provides a web browser-based, graphical user interface for monitoring and administering deployed applications.

Figure 5-1 provides an overview of how this business solution is implemented.

Figure 5-1 Ordering Channels

Description of Figure 5-1 follows
Description of "Figure 5-1 Ordering Channels"

Subsequent sections of this chapter provide more specific details about how the components in Table 5-1 are used to address the new order channel business challenge.

5.2.1 Adding a File-Based Proxy to the Oracle Service Bus Pipeline

Company X's customer base includes legacy companies that are unable to submit their orders in XML format. They instead use a comma-delimited format. Company X must be able to transform these comma-delimited orders into a valid XML format.

Oracle SOA Suite includes an Adapter Configuration Wizard that guides you through integrating applications with file systems, database tables, database queues, FTP servers, Java Message Services (JMS), IBM WebSphere MQ, and other systems. In 12c, the Adapter Configuration Wizard is available in both Oracle SOA Suite and Oracle Service Bus.

Company X opens the ProcessOrder project in the Oracle Service Bus application in the Applications window in Oracle JDeveloper. Figure 5-2 provides details.

Figure 5-2 File Adapter Icon in Components Window

Description of Figure 5-2 follows
Description of "Figure 5-2 File Adapter Icon in Components Window"

Company X then drags a File icon from the Components window to the Exposed Services swimlane. This invokes the Adapter Configuration Wizard for adding a new file-based proxy for the ProcessOrder composite.

The file adapter lets Oracle Service Bus business and proxy services exchange (read and write) files on local file systems. The file contents can be in both XML and non-XML data formats. For this scenario, the file adapter is configured to read comma-separated value (.csv) files from a specified directory that is polled every minute. On the last page of the wizard, Company X selects the option to create a valid XML schema file from the native comma-delimited format submitted by customers. This selection invokes the Native Format Builder Wizard. Figure 5-3 provides details.

The Native Format Builder Wizard enables you to create a native schema file from a variety of file formats, such as delimited, fixed-length, complex type, data type description (DTD), and Cobol Copybook. Native schema is an XML schema definition with annotations and additional attributes that can be used to translate native format files to XML, and vice versa. This native schema enables the Adapter Configuration Wizard to create a WSDL file for the adapter to communicate with the application.

Figure 5-3 Selection of Option to Define a Schema for a Native Format

Description of Figure 5-3 follows
Description of "Figure 5-3 Selection of Option to Define a Schema for a Native Format"

For this scenario, Company X configures the Native Format Builder Wizard pages as follows:

  • Selects Complex Type (Contains records whose fields may themselves be records having multiple delimiter types) as the native message format from which to create a schema.

  • Specifies the native format file and the root element (Order).

  • Specifies the complex types for data corresponding to address, billing, shipping, and item.

  • Specifies the delimiter for data (comma).

  • Specifies the schema elements corresponding to the fields in the data file.

  • Renames the automatically generated elements C1,C2.....C7 to element names that are expected in the generated XML file.

Figure 5-4 shows the complex type AddressType with defined schema elements for FirstName, LastName, AddressLine, City, State, ZipCode, and PhoneNumber. The comma-delimited file is shown on the right side of the page.

Figure 5-4 Designing of Complex Types in the Schema File

Description of Figure 5-4 follows
Description of "Figure 5-4 Designing of Complex Types in the Schema File"

The configuration process is repeated for all required complex types, as shown in Figure 5-5.

Figure 5-5 Completion of Design of Complex Types in the Schema File

Description of Figure 5-5 follows
Description of "Figure 5-5 Completion of Design of Complex Types in the Schema File"

When complete, a schema file is created. Figure 5-6 provides details.

Figure 5-6 Schema File and Schema Element Creation

Description of Figure 5-6 follows
Description of "Figure 5-6 Schema File and Schema Element Creation"

Company X then wires the newly created ProcessPS_File proxy to the ProcessPP pipeline. Figure 5-7 provides details.

Figure 5-7 File Proxy Wired to ProcessPP Pipeline

Description of Figure 5-7 follows
Description of "Figure 5-7 File Proxy Wired to ProcessPP Pipeline"

5.2.2 Debugging Components with the Oracle Service Bus Debugger

Oracle JDeveloper provides a comprehensive debugger for assessing and repairing Oracle Service Bus project components. The debugger reduces the development cycle by providing a troubleshooting environment directly in Oracle JDeveloper. This means you do not need to build an Oracle Service Bus application in Oracle JDeveloper, run it, launch a console to test or view audit trails and flow traces, and then return to Oracle JDeveloper to fix any issues and repeat these steps. Instead, you can set breakpoints directly in Oracle JDeveloper for troubleshooting on pipelines and split-joins.

Company X navigates to the validatePayment pipeline to debug the pipeline in Oracle JDeveloper. Company X selects the Reporting action in the pipeline editor and right-clicks and selects Toggle Breakpoint from the menu.

Figure 5-8 provides details.

With a breakpoint set, Company X invokes the debugger by right-clicking the proxy and selecting Run. Figure 5-9 provides details.

Figure 5-9 Start Debugging of the Oracle Service Bus Proxy

Description of Figure 5-9 follows
Description of "Figure 5-9 Start Debugging of the Oracle Service Bus Proxy"

This enables Company X to enter sample data in the test console, review the variables, step through the pipeline in debug mode, and change data, as necessary. Figure 5-10 provides details.

Figure 5-10 Debug of Oracle Service Bus Pipeline

Description of Figure 5-10 follows
Description of "Figure 5-10 Debug of Oracle Service Bus Pipeline"

5.2.3 Monitoring Oracle Service Bus in Oracle Enterprise Manager Fusion Middleware Control

Company X deploys the Oracle Service Bus application, as shown in Figure 5-11.

Figure 5-11 Deployment of Oracle Service Bus Application

Description of Figure 5-11 follows
Description of "Figure 5-11 Deployment of Oracle Service Bus Application"

Company X monitors Oracle Service Bus from Oracle Enterprise Manager Fusion Middleware Control. Oracle Enterprise Manager Fusion Middleware Control is a web browser-based, graphical user interface that you use to monitor and administer deployed applications.

Starting with 12c, the administration of Oracle Service Bus and Oracle SOA Suite is performed from a single, unified Oracle Enterprise Manager Fusion Middleware Control.

Services are not displayed by default to optimize performance. Therefore, Company X selects ProcessOrderSB in the navigator, clicks the Operations tab, and clicks Search to display all the services in ProcessOrderSB. Figure 5-12 provides details.

Figure 5-12 ProcessOrderSB Search

Description of Figure 5-12 follows
Description of "Figure 5-12 ProcessOrderSB Search"

The Type list enables you to filter the display of details, as shown in Figure 5-13.

Figure 5-13 Filter Display of Details

Description of Figure 5-13 follows
Description of "Figure 5-13 Filter Display of Details"

Company X uses the Oracle Service Bus home page to monitor additional details under each of the tabs displayed at the top of the page. Figure 5-14 provides details of the Global Settings tab.

Figure 5-14 Oracle Service Bus Home Page

Description of Figure 5-14 follows
Description of "Figure 5-14 Oracle Service Bus Home Page"

5.3 Related Documentation

Table 5-2 provides references to documentation that more specifically describes the components and features described in this chapter.

Table 5-2 Related Documentation

For Information About... See...

Configuring the file adapter with the Adapter Configuration Wizard

"Oracle JCA Adapter for Files/FTP" of Understanding Technology Adapters

Creating the native schema file with the Native Format Builder Wizard

"Native Format Builder Wizard" of Understanding Technology Adapters

Monitoring Oracle Service Bus in Oracle Enterprise Manager Fusion Middleware Control

"Getting Started with Oracle Service Bus Administration" of Administering Oracle Service Bus

Debugging Oracle Service Bus applications in Oracle JDeveloper

"Debugging Oracle Service Bus Applications" of Developing Services with Oracle Service Bus