Featured Posts

osb

Oracle Service Bus, testing proxy services with Direct Calls

Today i stumbled on one of the features which is available on the testconsole page of a proxyservice.
I was testing some flows in the Oracle Service Bus which made use of a XAConnectionFactory.
The process made use of a proxyservice which gets a message out of a jmsqueue, routes it to an other businessservice, which eventually would put it back on some other queue.

When the process was getting triggered by some other eai component which puts a message in the queue the process would eventually fail.
But when i would try to replicate the problem and test the process from the beginning by using the testconsole on the proxyservice, the process would just complete without errors.

After a close look on the testconsole we see some extra options in the test configuration
testconsole

Direct Call and Include Tracing.

Direct Call

When we dive into the guides we will find the next information.

“Testing proxy services with the direct call option enabled bypasses some important security steps (authentication/authorization), including access control. Oracle recommends that you not use the test service in production systems.

A direct call is used to test a proxy service that is collocated in the Oracle Service Bus domain. Using the direct call option, messages are sent directly to the proxy service, bypassing the transport layer. When you employ the direct call option, tracing is turned on by default, allowing you to diagnose and troubleshoot a message flow in the test console. By default, testing of proxy services is done using the direct call option.

When you use the direct call option to test a proxy service, the configuration data you input to the test console must be that which is expected by the proxy service from the client that invokes it. In other words, the test console plays the role of the client invoking the proxy service. Also, when you do direct call testing, you bypass the monitoring framework for the message. “

directcall

This illustrates a direct call. Note that the message bypasses the transport layer it is delivered directly to the proxy service (P1).

In my case i was testing a proxyservice which made use of jms transport and xaconnectionfactories.
The direct call would skip the transport layer and would not force the xa transaction.
This XA transaction was eventually the problem for my situation. One of the contributers on the xa transaction (custom oracle aq adapter) was for some reason messing up the transaction.
Since i don’t want to change anything on this adapter, i just skip the enforcing of the xa on this message flow.

So be sure when testing the flow and you really want to replicate the original situation (so use the original designed transport mechanismes), to put off the ‘Direct Call’ option.

Resources

http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/transportsdk/developing.html (Co-Located Calls)
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/testing.html (Testing Proxy Services)
Thread: OSB 10gR3: Handling response received from a proxy service

Original blog

osb

Oracle Service Bus, MFL and empty element-tree in xquery

Sometimes it will happen after creating the mfl and trying to map the elements in xquery to the target, the element-tree of the mfl won’t be visible and only shows the head-element.
Open the mfl file in a text-editor and change the version-attribute of the MessageFormat-tag to ‘2.02’

[sourcecode language=’xml’]

[/sourcecode]
to
[sourcecode language=’xml’]

[/sourcecode]

Original blog

osb

Oracle Service Bus, xquery and optional parameters

We use custom soap headers to implement end-to-end tracking over all eai components.
Those headers will get updated during transport over all components and will also get logged to the db, together with some other metadata.
That info will be used to track and trace messages and problems.

A soap-envelope will look like this :
[sourcecode language=’xml’]




3253252er5235432
iDOC
2001-12-17T09:30:47Z
OK







[/sourcecode]

Some fields in the payload can be nullable.
When we create an xquery to transform this header to our EventObject-variable we can either create the xquery with one parameter which holds the whole ‘CustomHeader’ payload, or just map the parameters we need.

  1. declare function xf:Header2EventObject($customHeader1 as element(ns1:CustomHeader))
  2. declare function xf:Header2EventObject($corId as xs:string, $MessageType as xs:string, $Status as xs:string)
  1. When we use the payload described in the example, the assign will work. Only problem is we need to assign the whole CustomHeader-element as parameter.
    When we need to data out of the body-payload which could get huge, we would need to assign this whole payload just to get a few values out of it.
  2. We only assign the values we need, but when the xquery results in an empty node the assign will fail.
    [sourcecode language=’xml’]

    BEA-382510

    OSB Assign action failed updating variable “eventObject”: com.bea.wli.common.xquery.XQueryException: Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items


    PipelinePairNode1
    PipelinePairNode1_request
    stage1
    request-pipeline


    [/sourcecode]

And the solution i was looking for (thanks to a colleague)
I need to be able to setup the parameters of the xquery as optional, like this i don’t need to evaluate every parameter in the xquery and can just pass the result of the xquery which is used for every parameter of the xquery.

http://www.w3.org/TR/xquery/
“attribute()? refers to an optional attribute node”

The xquery function will then look like
[sourcecode language=’java’]
declare function xf:test1($corId as xs:string?,
$MessageType as xs:string?,
$Status as xs:string)
as element(ns0:EventObject) {


{ $corId }
{ $MessageType }
{ $Status }


};
[/sourcecode]

See the definition of the $corId and $MessageType, now they can be null!

Original blog

fusion11g, oracle, soa

Oracle Fusion 11g, my first impressions

Last i finished the last day of the 3day Oracle Fusion 11g workshop.
And i must say…i’m pretty impressed by the new stack Oracle presented.

For development during the workshop i used my own vmware of fusion 11g on Centos.
And it’s a real killer when all components of the suite are up and running, my laptop had a tuff time.

During the workshop we used the famous ‘Order processing’ tutorial to get in touch with the components of the fusion 11g.
A short overview of what we have been discussing and developing

  • SCA Components wiring bpel and human tasks together and exposing them as soap services
  • Using the mediator for transformation between the SCA components
  • Orchestrating a few bpels to execute human tasks and update payload
  • Adding Business Rules
  • Handling Business Events using EDN
  • Creating BAM dashboards and using BAM adapter/sensors to push data
  • Integration with Oracle B2B
  • Virtualize services on Oracle Service Bus (OSB)
  • Web services policy enforcement
  • Managing the lifecycle of a SOA composite application
  • Unit Testing
  • New Fault Handling framework (mediator and bpel)
  • Using Service Data Objects (SDO)

My first thoughts

SCA modelings looks good, composite application development in JDeveloper works like a charm.
Business rules development got new gui, way better then the old one.
BAM dashboards look really good, customers will love those.
EDN framework, event based architectures, nice!
ADF BPEL Worklist, finally an easy way to design your own worklist gui.
Mediator is the old OESB, now it’s used for the wire in the composite applications and subscription on events
New console looks good, all integrated and good support for End 2 End tracking
Fault Policy framework from 10.1.3.4 now works for both BPEL and Mediator

A few impressions

To find out about all the other new functionality, install it and go play with it!

Original blog

application server, bpel, esb, fusion11g, oracle

Oracle Fusion Middleware 11g (ofm11g) on Centos 5

The new Oracle Fusion Middleware 11g just got released a few days back, so time to play with it!
Oracle did a great job on the installation guide and quickstart again, so installation wasn’t a real hard job.

A short overview of the steps we need to follow

  • Install Oracle Database (i used OracleXE)
  • Create Schemas for Oracle SOA Suite and Oracle BAM by using Repository Creation Utility (RCU)
  • Install Oracle WebLogic Server and Create the Middleware Home
  • Installing Oracle SOA Suite
  • Configuring Oracle SOA Suite
  • Post-Installation Tasks
  • Installing Oracle SOA Suite Design-Time Components

On the download page i downloaded the next components

Quiet some software to install before we can get started.
I assume you already have the db running so lets get on to the next step.

Create Schemas for Oracle SOA Suite and Oracle BAM by using Repository Creation Utility (RCU)

Unzip ofm_rcu_linux_11.1.1.1.0_disk1_1of1.zip and run ./rcu

I needed to change the next parameters in the db

  • alter system set PROCESSES=500 scope=SPFILE;
  • alter system set open_cursors=500 scope=SPFILE;

And the next parameters in the linux kernel (/etc/security/limits.conf)
[sourcecode language=”xml”]
# tbv oracle soa suite 11g
oracle hard nofile 4096
oracle soft nofile 4096
[/sourcecode]

And a list of missing/wrong version of system packages
[sourcecode language=”xml”]
Root
Checking operating system certification
Expected result: One of enterprise-4,enterprise-5,redhat-4,redhat-5,SuSE-10
Actual Result: redhat-5
Check complete. The overall result of this check is: Passed

Checking recommended operating system packages
Checking for gcc-4.1.0-28.4; Not found. Failed <<<<
Checking for gcc-c++-4.1.0-28.4; Not found. Failed <<<<
Checking for setarch-1.6-1; found setarch-2.0-1.1-i386. Passed
Checking for sysstat-5.0.5-1; Not found. Failed <<<<
Checking for libstdc++-4.1.0-28.4; found libstdc++-4.1.2-44.el5-i386. Passed
Checking for libstdc++-devel-4.1.0-28.4; Not found. Failed <<<<
Checking for compat-libstdc++-296-2.96-132.7.2; Not found. Failed <<<<
Checking for compat-db-4.1.25-9; Not found. Failed <<<<
Checking for control-center-2.8.0-12; found control-center-1:2.16.0-16.el5-i386. Passed
Checking for glibc-common-2.3.4-2.9; found glibc-common-2.5-34-i386. Passed
Checking for binutils-2.16.91.0.5-23.4; found binutils-2.17.50.0.6-9.el5-i386. Passed
Checking for make-3.80-202.2; found make-1:3.81-3.el5-i386. Passed
Check complete. The overall result of this check is: Failed <<<<
Checking kernel parameters
Checking for VERSION=2.6.18; found VERSION=2.6.18-128.1.16.el5. Passed
Checking for hardnofiles=4096; hardnofiles=1024. Failed <<<<
Checking for softnofiles=4096; softnofiles=1024. Failed <<<<
Check complete. The overall result of this check is: Failed <<<<
Checking Recommended glibc version
Expected result: ATLEAST=2.5-12
Actual Result: 2.5-34
Check complete. The overall result of this check is: Passed

Checking physical memory
Expected result: 1024MB
Actual Result: 1196MB
Check complete. The overall result of this check is: Passed
[/sourcecode]

Install all the correct packages (yum available/yum install), and ignore the other warnings during install.

rcu1
rcu2
Setup your own db instance
rcu3
rcu4
I selected just all the components
rcu5
rcu6
rcu7
rcu8
rcu9
rcu10
rcu11

Install Oracle WebLogic Server and Create the Middleware Home

chmod the bin file and run ./oepe11_wls1031_linux32.bin
I had some ‘wrong class version exceptions’, so installed java6 update14.

wls1
Create a new home
wls2
wls3
wls4
wls5
wls6
wls7
wls8
wls9
wls10
wls11

Installing Oracle SOA Suite

Unzip ofm_soa_generic_11.1.1.1.0_disk1_1of1.zip and run ./runInstaller in Disk1

soa1
soa2
soa3

Configuring Oracle SOA Suite

Now we need to configure the soa suite installation with the Oracle Fusion Middleware Configuration Wizard.
Go to [sourcecode language=”xml”]
/common/bin
[/sourcecode]
and run ./config.sh

soaconfig1
soaconfig2
soaconfig3
Since i used 1 db for all the components, select al the components and config the same db settings
soaconfig4
soaconfig5
soaconfig6
soaconfig7
soaconfig8
soaconfig9
soaconfig10
soaconfig11
soaconfig12
soaconfig13
soaconfig14
soaconfig15
soaconfig16
soaconfig17

Most of the steps are just next, next and a few more next.

Post-Installation Tasks

Start both the AdminServer and the ManagedServers.
AdminServer
[sourcecode language=”xml”]
/user_projects/domains/domain_name/startWebLogic.sh
[/sourcecode]
ManagedServers
[sourcecode language=”xml”]
/user_projects/domains/domain_name/bin/startManagedWebLogic.sh soa_server1 (default name)
/user_projects/domains/domain_name/bin/startManagedWebLogic.sh bam_server1 (default name)
[/sourcecode]
On startup it will prompt you for the username/password we used on during installation

Installing Oracle SOA Suite Design-Time Components

For development we will download Oracle JDeveloper 11g R1 (Build 5407).
To be able to create soa projects in it we need to update it with the Oracle SOA Suite Extension.
Go to Help > Check for Updates. Select ‘Oracle Fusion Middleware Products’ in the ‘Search Update Centers’, next and select ‘Oracle SOA Suite Composite Editor 11.1.1.0’.

New consoles (look-and-feel)

weblogic server 10.3.1 console
wlsconsole
enterprise manager
enterprisemanager

Installation is done!
Just a few urls to check if everything went ok

administration server
http://host:admin_server_port (default installation : http://localhost:7001)
wls console
http://host:admin_server_port/console (default installation : http://localhost:7001/console)
enterprise manager
http://host:admin_server_port/em (default installation : http://localhost:7001/em)

Links

Oracle Fusion Middleware Documentation Library
Oracle Fusion Middleware Products Update Center
Oracle11g on CentOS-5, package requirements
Oracle® Fusion Middleware Quick Installation Guide for Oracle SOA Suite11g Release 1 (11.1.1)

Ready to create some nice new fusion apps!

Original blog

oracle

Oracle Fusion Middleware 11g got released!

Finally the new Oracle Fusion Middleware 11g got released!

The webcast can be seen over here.
Some of the available resources like tutorials on Oracle WebLogic Suite 11g, Oracle SOA Suite 11g, Oracle Identity Management 11g and Oracle WebCenter Suite 11g
And the download!

How do the Oracle ACES think about the suite ?

The new Oracle JDeveloper 11g R1 got released too, code name Bulldog.
The download and a lot of new features!

So, a lot of new stuff to play with!

Original blog

esb, oracle, osb

Oracle Service Bus workshop, WAAI project feedback

Yesterday we had the ‘feedback’ day/evening from the WAAI project over at IT-eye.
Part of the idea of the WAAI project is to spread the knowledge inside the company so we all know about he nice upcoming things of the Oracle Fusion 11g stack.

One of my colleagues started with the Oracle BPM presentation and workshop. Some nice info and good exercises to get in touch with the new BPM.
After that the playground was mine.
A few hours of hard work and exhausted colleagues trying to complete all the 3 cases from the workshop.

At the end i planned some time for questions and discussions.
Since most of the colleagues already had experience with the Oracle SOA Suite stack, they could do a good compair on the ‘new’ Oracle Service Bus (OSB) and the ‘old’ Oracle Enterprise Service Bus (OESB).
An overall impression would be quiet positive. They liked the new functionality in the bus althought some of the functionality needs a bit more knowlegde and experience. But thats what we will all have when we start to using new products.

A few questions which came up

  • If we’re going to use both both Oracle Service Bus and Oracle BPEl, what should we model in the OSB and what should we model in BPEL.
    Maybe longrunning statefull processes in BPEL and keep the OSB mean and clean?
    Or is there some functionality which really needs to be in the bus?
    Are there any guidelines and best practices on how to model this ?
    The possibilities of the OESB weren’t that rich. So most modelling still had to happen in for example BPEL. The OESB would mostly be used for some routing/transformation and virtualization.
    The OSB gives us a lot of functionality for modelling the message flows, so i could imagine functionality which we normally would model in BPEL can be modelled in the OSB itself.
    But would this be the correct ‘role’ of the new bus ?

  • Most of the transformations in the bus make use of the functionality of xquery.
    What are the pro and cons on both xquery and xslt ? When do we use which one ?

After all a good day and i hope my colleagues enjoyed it too.

Original blog

alsb, bea, esb

ALSB Console project out of sync with file system

Short reminder for myself

During development of my alsb projects i clone, rename, move and do all sorts of things to eventually end of with one correct list of projects with good naming convention.
Once in a while when i try to rename for example proxy services back to some old name i already used i get errors about the new name already exists, although i’m pretty sure it’s not in the console anymore.

Short fix

[sourcecode language=’xml’]\user_projects\domains\\sbgen\[/sourcecode]
Find the ear file with contains your (old) resource with the identifier you tried to use (i couldn’t find any unix command which would let me list the files in the ear, and after that let me search a string on them).
If you found the correct ear (view application.xml in the META-INF dir, the jav:display-name-elements contains your identifier).

Stop wls
Remove ear-file
Start wls and try to rename again, it should be fixed.

Original blog

books, jdeveloper, oracle

Book review : Processing XML Documents with JDeveloper 11g

Processing XML Documents with JDeveloper 11g

A while back i got asked by Packt to do a review on the book “Processing XML Documents with JDeveloper 11g”.
With me, some other con colleagues, so googling a bit will give you a good impression what others think about it.

The first impression which i have based on the my reading experience from the other Pack books, is that the books are easy too read and you won’t get overwhelmed with massive amounts of information.
But just enough overview about the subject to get you starting and play with the matery.

Personally, i like it when books explain the theory and besides that gives examples (code) to show me the howto things. This book i just like that, although at some points the the amount of code will get quiet big.
Although documentating large pars of code isn’t always that easy, the author tries to explain most of it in a good way.
For my own use i would google to get my hands on the code, and don’t use a book for this.

The books starts right away with samples and diving into the different apis. So a bit of background experience is adviced for the easy reading.

When reading books but also other resources like tutorials or blogs i like it when the example give me step by step instructions on how to get the examples up and running.
I want them to show me what wizzards i need to use, what settings i need to set and it would be great to show the screengrabs with it. The author explained all this real good. Besides that the book is based on the current version of the ide (Jdeveloper), no need to match possible changes in different versions of the ide.

The title is a bit misleading. Since most parts in the book are just about he usage of the different frameworks and techniques, they don’t really (just) apply to JDeveloper. Although it’s really nice have step-by-step overview of how to create the things in this ide. All the aspects a developer needs to know about when dealing with xml are discussed in the book. Aspects like parsing/creating xml (different apis), xml schema, xml schema validation, xpath, xslt, etc, all are getting discussed.
Besides those a few less ordinaire chapters like ‘JSTL XML’,’Converting XML to PDF’, ‘Converting XML to MS Excel’,’Storing XML in Oracle Berkeley DB XML’ and ‘Oracle XML Publisher’ will come by.
Still a subjects (a few) which came by on the average projects we do for customers, so always nice to have some background information on these.

Conclusion

The book fulfilled the expectations i had before i started reading it, based on the other books i read from Packt.
Easy to read, good examples, and a good resource for trying out and get some hands-on experience.

Book details

Contents

  • Preface
  • Chapter 1: Creating and Parsing an XML Document
  • Chapter 2: Creating an XML Schema
  • Chapter 3: XML Schema Validation
  • Chapter 4: XPath
  • Chapter 5: Transforming XML with XSLT
  • Chapter 6: JSTL XML Tag Library
  • Chapter 7: Loading and Saving XML with DOM 3.0 LS
  • Chapter 8: Validating an XML Document with DOM 3 Validation
  • Chapter 9: JAXB 2.0
  • Chapter 10: Comparing XML Documents
  • Chapter 11: Converting XML to PDF
  • Chapter 12: Converting XML to MS Excel
  • Chapter 13: Storing XML in Oracle Berkeley DB XML
  • Chapter 14: Oracle XML Publisher

You can order the book at Packt or Amazon

Thanks Packt for letting me do the review, and i’m looking forward for the next one!

Original blog

osb

RESTful Services with Oracle Service Bus

Restify existing services

Today i came across a nice article from jeff x davies on “RESTful Services with Oracle Service Bus“.
A nice example on how to map the different http methods to your flows in osb.
The testconsole is easy to use when doing the http calls and adding the query parameters (id=10).

But why mapping non-rest services to and rest interface

  1. You automatically get all of the monitoring, reporting, security and more provided by OSB for your RESTful services
  2. You keep the benefits of mediation. For example, of our company in this example purchased another company that provided different products, you could use the OSB to act as a façade over both product catalogs while providing a single, unchanged REST interface.
  3. You can REST-ify existing, non-service enabled assets like EJBs

Some other good links

  • http://blogs.oracle.com/jamesbayer/2008/07/using_rest_with_oracle_service.html
  • http://biemond.blogspot.com/2009/05/osb-rest-service-with-xml-json-output.html
  • http://blogs.oracle.com/woa/2009/04/restify_your_world_and_put_it.html

Original blog