SOA Suite 12c – Create, Deploy, Attach and Configure a Custom OWSM Policy – to report on service execution

This article describes how to develop a straightforward custom assertion that can be used as part of custom OWSM policy to be attached to Web Services in WebLogic, such as services exposed by SOA Composite applications and Service Bus projects as well as custom JAX-WS or ADF BC Web Services.

The custom assertion that I demonstrate here reports the execution of web service operations to a JMS Destination and/or the system output. It shows how to access property values set on the policy binding (values specific for the service the policy is attached to) and how to inspect the headers and contents of the request and response messages. Most custom assertions will use a subset of the mechanisms shown in this example.

Note: this article was published on the AMIS Technology Blog: https://technology.amis.nl/2015/04/01/oracle-soa-suite-12c-create-deploy-attach-and-configure-a-custom-owsm-policy-to-report-on-service-execution/

September 2015 – New content in SOA & BPM Community

As aggregated and published by Jürgen Kress at https://soacommunity.wordpress.com/2015/09/07/additional-new-content-soa-bpm-partner-community-23/ 

Slides: Web- and Mobile-Oriented Architectures with Oracle Fusion Middleware

Presented at Oracle OpenWorld 2014: Mobile applications as well as a large class of modern HTML5 web applications are built on top of an architecture with special provisions, such as RESTful services; the personal cloud, to provide a cross-device experience; push; cache; localization; scalability; and secure interaction with the enterprise back end. Gartner refers to this as the web-oriented architecture. Oracle Fusion Middleware offers key products (Oracle SOA Suite, Oracle Identity Management, and Oracle API Gateway) to implement this architecture, possibly in combination with cloud services such as Oracle Mobile Cloud Service, Oracle Messaging Cloud Service, and Oracle Storage Cloud Service. This session discusses the architecture itself and what it entails.

Slides: Introducing Oracle Fusion Middleware 12.1.3 and especially SOA Suite and BPM Suite 12c

Overview of Oracle FMW release 12.1.3 in general and about SOA Suite and BPM Suite 12c in particular. Highlights important new features and cross product themes (such as productivity, industrialization, ease of getting started and more). Some topics: Service Bus Pipeline, Native Format transformation, XQuery support, BAM new style, Key Performance and Risk Indicators,…. Presented at the AMIS & Oracle launch event, 17th July 2014

Alternative implementation of AircraftMovementService with JCA JMS Adapter in SOA composite application – Complement to Chapter 6

The JCA adapter for JMS is also available with SOA composites, but the JMS Transport is not. Creating a SOA composite that is functionally equivalent to the AircraftMovementService Service Bus project

turns out very simple indeed, using the exact same JCA Adapter configuration. The steps for this :

  1. Create a SOA composite project – for example called AircraftMovementServiceSOAcomposite. Select the application template with Mediator. Call the Mediator AircraftMovementMediator. Define the interface later.
  2. Copy the AircraftMovementService.wsdl plus the associated XSDs from the AircraftMovementService Service Bus project to the folders WSDLs and Schemas respectively in the SOA composite project.
  3. Open the editor for the mediator component. Click on the green plus icon for the WSDL URL and select the AircraftMovementService.wsdl file, to indicate that the mediator exposes the AircraftMovementsServicePortType interface.
  4. Drag the exposed service from the mediator and drop it on the Exposed Services lane, thus creating the composite level service interface.
  5. Drag the JMS adapter from the Technology category in the components palette and drop it in the External References lane.
  6. The by now familiar JMS Adapter configuration wizard appears. Set the same values as before, in the context of the Service Bus composite.

    The name of the reference is FinanceAircraftMovementsReporterJCA.

    Select the Oracle Enterprise Messaging Service JMS provider and specify the Oracle WebLogic JMS option on page two.

    Select the AppServer connection to the Integrated WLS.
    Select Import an existing WSDL and use AircraftMovementService.wsdl.

    Set the Operation Type to Produce Message.


    On the Produce Operation Parameters page, browse for jms/finance/AircraftMovementsQueue for the Destination Name. Accept the defaults for Message Body Type (Text Message) and Delivery Mode (Persistent). Set the TimeToLive to 15 seconds. Set the JNDI Name [of the JMS Adapter Connection] to eis/Finance/Queue.




    Accept other defaults and then click Finish to complete the adapter’s configuration.

  7. Wire the mediator component to the JMS Adapter binding. This creates a routing rule in the mediator that routes request messages arriving at the exposed AircraftMovementService’s reportAircraftMovement operation to the report operation on the FinanceAircraftMovementsReporterJCA outbound adapter binding.

This completes the SOA composite.

Deploy the composite. Then test the service, for example through the EM FMW Control.

Configuring the Outbound JMS Adapter Binding FinanceAircraftMovementsReporterJCA – Complement to Chapter 6

The starting point for this article is the following Service Bus project that has a JMS Transport configured to connect to the financial JMS queue, as described in the second section of Chapter 6.

We are now going to extend this project with a JCA JMS Adapter binding that does exactly the same thing – purely for educational purposed (note that JMS Transport is the preferred option according to Oracle SOA Suite product management for Service Bus projects).

Drag the JCA JMS Adapter from the Advanced category to the External References lane. When you drop it, the adapter configuration wizard appears, to configure the JMS Adapter binding.

On the first page, set the name of the Reference to FinanceAircraftMovementsReporterJCA. Set the Service Directory to the Adapters folder.

Click Next.

Select the Oracle Enterprise Messaging Service JMS provider and specify the Oracle WebLogic JMS option on page two.

Press Next.

On the third page, select the AppServer connection to the Integrated WLS (if that is the environment you are running on). This connection is used to browse for the JMS Adapter connection and the JMS queue – the JNDI names of which can also be entered manually.

Press Next. Select Import an existing WSDL and select the AircraftMovementService.wsdl as the source.

Press Next.

On the Operation page, set the Operation Type to Produce Message. The name of the operation is derived from the WSDL and is set to reportAircraftMovement.

The next page of the wizard (Figure 6-20) is titled Produce Operation Parameters. Set the Destination Name to the JNDI name of the JMS queue the adapter binding should publish messages to: jms/finance/AircraftMovementsQueue. Accept the defaults for Message Body Type (Text Message) and Delivery Mode (Persistent). Set the TimeToLive to 15 seconds.

The JNDI Name [of the JMS Adapter Connection] should be set to eis/Finance/Queue – the name specified for the new connection that was configured for the JMS Adapter.

Press Next.

In the next page, if we have not yet defined the Adapter Interface, we can specify the format of the messages that the JMS Adapter should pass onwards to the JMS queue. Checking the checkbox Native format translation is not required (Schema is Opaque) is used when a base64 payload should be passed. Alternatively, we can specify a native XSD definition for whatever format the JMS message payload should have. In this case, the WSDL specifies the reportAircraftMovementRequestMessage and this page in the wizard is disabled.

Press Next,

then press Finish to complete the configuration of the outbound JMS Adapter binding.

JDeveloper will create a business service with JCA transport that references the JMS Adapter binding configuration file FinanceAircraftMovementsReporterJCA.jca.

You can test this business service – by activating the run option in the context menu on the business service in the Service Bus composite overview.

Implementing the AirportService ProxyService and Pipeline on top of Database Adapter – Chapter 4

This article visualizes the steps for implementing the AirportService Service Bus project as described in the first section of Chapter 4 (see the chapter for the detailed description of the steps)

Wire Pipeline to Business Service:

 

 

 

Create Transformations for request and response:

Configure Replace actions to perform the transformations using the XSL Maps:

Run the Proxy Service to test the service:

 

Configuring Outbound Database Adapter binding for Data Querying – Chapter 4

This article shows the detail steps that are described in Chapter 4 – Section Retrieving information from the database. This article assumes that the setup of the database has been done according to: http://blog.soasuitehandbook.org/preparing-the-saibot-airport-database-for-the-oracle-soa-suite-12c-handbook/ .

First design time, in JDeveloper.

Configure JDBC Data Source to the SAIBOT database schema

Specify the Managed Server(s) to which the Data Source should be deployed:

Configure Database Adapter Connection

Now configure the DB Adapter Connection with a reference to the JDBC Data Source that we created earlier on to connect to the Saibot Database schema.

You may have to Stop and Start the Database Adapter for this configuration to have effect. You may even have to bounce the managed server. I have seen different behavior – and none seem predictable.

Test the Business Service from JDeveloper or the Service Bus Console:

This response to a test of the Business Service indicates that a restart is needed:

The proper response will look like this:

Preparing the SAIBOT AIRPORT Database for the Oracle SOA Suite 12c Handbook

Some of the chapters in the Oracle SOA Suite 12c Handbook include code examples that use the Database Adapter and require some preparation. This article helps you perform the necessary steps.

To make things easy, we will create all database objects in a single database schema – even though logically the SAIBOT AIRPORT database is more complex than that. Note that an Oracle XE database will suffice for the samples in the book – and is therefore probably preferable given its small footprint.

Using a database account with DBA privileges – such as SYSTEM OR SYS when using a local database – create a new user with a number of privileges using the following statements:

create user saibot identified by saibot default tablespace users temporary tablespace temp; alter user saibot quota unlimited on  users ; grant connect, create table, create procedure, create sequence, create type to saibot;

Chapter 3

Chapter 3 requires the creation of a number of tables – for AIRPORTS and COUNTRIES – with a minimum of prepopulated records; these tables can be created using this script.

Slightly more complex is the creation of a PL/SQL package FUT_SLOT_API and a number of types and tables. These objects are logically part of the Future data domain with details about slots and flights that are planned to take place. The package and its supporting types and tables can  be created using this script.

Chapter 6

In this chapter, Advanced Queuing is used. The AQ configuration can be done in the saibot schema introduced overhead or in a new schema. This new schema can be  created using the following statements, by a user with DBA privileges – such as SYSTEM OR SYS when using a local database:

create user saibot_finance identified by saibot_finance default tablespace users temporary tablespace temp;
alter user saibot_finance quota unlimited on users;
grant create session to saibot_finance;
grant create type to saibot_finance;
grant aq_administrator_role to saibot_finance;
EXECUTE dbms_aqadm.grant_type_access('saibot_finance');

Alternatively, additional privileges can be granted to the user saibot:

grant aq_administrator_role to saibot;
EXECUTE dbms_aqadm.grant_type_access('saibot');

The statements to create type aircraft_movement_report_t and configure queue aircraft_movements_queue on top of queue table saibot_finance.aircraft_movements_qt can be found in this script that is on Github in the source code repository for this book.