Featured Posts

fusion11g, osb

SOA+OSB in same JVM, continued

Thanks to Manoj for this overview on how to run the osb and soa suite in one jvm.
My machine was almost dying when i wanted to run both the osb server and the soa suite server.
For development this solution is great and it will save you some resources.

After creating the domain and starting up the admin server i faced the next stacktrace and the adminserver won’t start up.

####<Jun 14, 2010 9:28:40 AM CEST> <Critical> <WebLogicServer> <multimedia> <AdminServer> <Main Thread> <<WLS Kernel>> <> <> <1276500520469> <BEA-000386> <Server subsystem failed. Reason: weblogic.descriptor.DescriptorValidateException: The following failures occurred:
-- JMS server or SAF agent UMSJMSServer is not targeted to the same target as its persistent store
-- JMS server or SAF agent UMSJMSServer is not targeted to the same target as its persistent store
-- JMS server or SAF agent wlsbJMSServer is not targeted to the same target as its persistent store
-- JMS server or SAF agent SOAJMSServer is not targeted to the same target as its persistent store
-- JMS server or SAF agent BPMJMSServer is not targeted to the same target as its persistent store
-- JMS server or SAF agent WseeJmsServer is not targeted to the same target as its persistent store
-- JMS server or SAF agent WseeJaxwsJmsServer_auto_2 is not targeted to the same target as its persistent store

Guess the installation mixed up the targets of the jms stores. In my case most of the failed jms stores where targeted to the AdminServer instead of the soa_server1.

I assume this can also be fixed in ‘Select Optional Configuration’ step of the wizard, where we can select the JMS File Store option to modify.
Or edit the file ‘config.xml’ (what i did) located at


Find the named jms servers, and check the related filestore. They will have different targets. Fix them so they both target the soa_server1 and start the AdminServer again.


My Oracle ACE trophy arrived!

Today i received a nice little present from Oracle!

My ACE trophy, another one for the collection (though it’s still quite empty)

fusion11g, osb

Oracle Service Bus 11g communication with Oracle SOA Suite 11g, DirectBindings and SOA-DIRECT, part2

In this second part of the serie about communication between Oracle Service Bus and Composite Applications from the SOA Suite we will discuss the synchronous communication from the service bus to the composite application.
When developing composite applications, you could expose these services to the outside world to be used by customers. In these cases you could decide to make use of a service bus in front of the services to virtualize them.

Sync call from Oracle Service Bus to SOA Suite Composite

In this blog we will develop the next flow

Oracle SOA Suite Composite Application

In JDeveloper create a new SOA Application with an empty SOA Project in it.
For this blog i created a simple synchronous HelloWorld bpel process which will return the “Hello ” + the inputparameter string.

Direct Binding

To be able to invoke the bpel process we need to expose the service interface of the bpel process.
Drag the Direct Binding Service Adapter to the left swim lane.

For the service interface i will just re-use the wsdl of the bpel process.
In the first part of this serie we used ‘Reference’ type for the Direct Binding. In this case we want to invoke the composite from our Oracle Service Bus project, so we will be using the ‘Service’ Type.

And that’s pretty much it what is needed for the composite. The flow should look something like this

Deploy the application. If we lookup the process in the Enterprise Manager and select it we will see a overview of the next components in it

In the first part of the serie we used the Hello_PS_Direct with the ‘Reference’ usage for the DirectBinding and in this blog we will be using the ‘Service’ usage.

Oracle Service Bus

For the development of the Oracle Service Bus process we need a few components

  • Proxy Service
  • Business Service (invoking the bpel process)

Create a new OSB Configuration Project in Oracle Enterprise Pack for Eclipse.
Creata a new OSB Project.

Communication with the Oracle SOA Suite components will make use of the new SOA-DIRECT transport available in the Oracle Service Bus 11g.

  • The SOA-DIRECT transport provides native connectivity between the Oracle Service Bus and the Oracle SOA Suite service components.
  • The SOA-DIRECT transport supports wsdl type services with soap1.1 and soap1.2 or XML Bindings.
  • The SOA-DIRECT transport supports the following features: (copy/paste)
    • Invocation of any SOA binding component services through Java remote method invocation (RMI)
    • WS-Addressing, including optional auto-generation of ReplyTo properties for asynchronous callbacks
    • Identity propagation
    • Transaction propagation
    • Attachments
    • Optimized RMI transport for invoking SOA services
    • High availability and clustering support
    • Failover and load balancing (not available for services in the Service Callback role
    • Connection and application retries on errors

To be able to invoke the bpel service we will need the service endpoint.
In JDeveloper go to the ‘Application Server Navigator’. Select the soasuite applicationserver > SOA > soa_server1 > default > your composite name > name of your expose service interface. Right mouse click on it and select ‘Copy Path’.

If we look into the wsdl we will see it created two services for us (soap1.1 and soap1.2) with the t3 endpoint in it.

    <wsdl:service name="DServiceHelloWorld">
        <wsdl:port name="DServiceHelloWorldDirectBindingPort11" binding="client:HelloBPELProcessDirectBinding1.1">
            <soap:address location="t3://xesoa11g.iteye.local:8001/default/DirectBindingComposite!1.0/DServiceHelloWorld" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
        <wsdl:port name="DServiceHelloWorldDirectBindingPort12" binding="client:HelloBPELProcessDirectBinding1.2">
            <soap12:address location="t3://xesoa11g.iteye.local:8001/default/DirectBindingComposite!1.0/DServiceHelloWorld" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>

In your Oracle Service Bus project (switch ide again), import the wsdl resource from the location we just copied. The import will create a wsdl + xsd from the bpel process for us.

Create a new Busines Service in this project and use the next settings.

We’ll be using a wsdl based business service, and for this interface we will use the wsdl we just imported.

By default the soa-direct transport is selected with the t3 endpoint of our bpel process (direct binding interface).

On the SOA-DIRECT Transport tab we can select some other settings. Since we will be invoking a synchronous bpel process the ‘Synchronous client’ option will do just fine and the rest isn’t needed.

  • JNDI Service Account – Configurat security credentials for the jndi lookup of the target soa service
  • Role – Synchronous Client/Asynchronous Client/Service Callback, depending on the service you invoke
  • Callback Proxy – needed for the Asynchronous Client, specify the proxyservice where to deliver the callback
  • Fault Proxy- needed for the Asynchronous Client, specify the proxyservice where to deliver the fault situations
  • WS-Addressing version, needed for Asynchronous Client, specify the version of WS-Addressing is provided in the request or proxy service pipeline
  • Dispatch Policy – Select the instance of Oracle WebLogic Server Work Manager that you want to use for the dispatch policy for this endpoint

From the business service generate the proxy service. This will be a SOAP over HTTP service based on the same wsdl of the business service.

We should end up with the next list of resources

Publish the Oracle Service Bus project to the server.
Test the proxy service and see if the outcome is correct



Go back to the Enterprise Manager console, and see if a new instance got created.

audit trail

The steps we need to communicate sync from the Oracle Service Bus with the Composite Application :
Create a composite application with Direct Binding Service Reference. Import the resources in your Oracle Service Bus project. Create a business services based on these ans use the SOA-DIRECT transport to communicate with the composite application.

In the other parts of this serie i will discuss the asynchronous flows between the Oracle Service Bus and the Composite Applications.

fusion11g, osb

Oracle Service Bus 11g communication with Oracle SOA Suite 11g, DirectBindings, part1

In a few short blogs i will describe how to develop the following process flows

  • Communicate from Oracle Service Bus 11g to Oracle SOA Suite Composite, Synchronous
  • Communicate from Oracle Service Bus 11g to Oracle SOA Suite Composite, ASynchronous
  • Communicate from Oracle SOA Suite Composite to Oracle Service Bus 11g, Synchronous
  • Communicate from Oracle SOA Suite Composite to Oracle Service Bus 11g, ASynchronous

Sync call from Oracle SOA Suite Composite to Oracle Service Bus 11g

We will develop the next process flow

Oracle Service Bus

For the development of the Oracle Service Bus process we need a few components

  • Proxy Service
  • Business Service
  • External Service (the service we eventually route to)

External Service

For this i created a simple HelloWorld Webservice which will only returns the “Hello …” string.

package nl.iteye.service.hello;

import javax.jws.*;

public class MyHelloService {

	public String hello(String name) {
		return "Hello " + name;

Deploy the service and test it to see if if the invocation works.

Oracle Servicebus components

Create a new OSB Configuration Project in Oracle Enterprise Pack for Eclipse.
Creata a new OSB Project.
Create a new Busines Service in this project and use the next settings.

Use the wsdl of the deployed MyHelloService. Easiest way to find this url is to go to the Console > Deployments > MyHelloServiceEAR > Testing > MyHelloServiceService > ?WSDL
Basicually we can use the default settings after browsing to the correct wsdl.

Create a new Proxy Service based on this Business Service

By default it will create a Proxy Service with HTTP Transport, change this to SB Transport. This will be used eventually when we invoke the service from our Composite Application.

We will have the next list of resources

  • proxy service
  • business service
  • imported helloworld wsdl
  • imported helloworld xsd

We’re ready with the Oracle Service part. Deploy the project.

Oracle SOA Suite Composite Application

In JDeveloper create a new SOA Application with an empty SOA Project in it.
Eventually we will be creating the next flow

First we need the effective wsdl of our Proxy Service. This we will be using for the Direct Binding reference from our composite to the Oracle Service Bus resource.
From Eclipse :

From OSB Console :

In the wsdl we’ll see the Binding- and the Service-parts. In the Service location we will see the sb:// endpoint of the Proxy Service.

  <WL5G3N0:service name="MyHelloServiceService">
    <WL5G3N0:port binding="WL5G3N1:MyHelloServicePortBinding" name="MyHelloServicePort">
      <WL5G3N2:address location="sb://localhost:7001/hello_ps"/>

Direct Binding

Drag the Direct Binding Service Adapter on the swim lane

In this case we are invoking an osb resource, so we will be using ‘Reference’ as Type and ‘Oracle Service Bus’ as Reference Target.
For the WSDL URL browse to the location at which your exported and unpacked the Effect WSDL. Let the wizard copy the resource into the project and don’t maintain the original directory structure.


Drag the Mediator component to the middle swim lane.
For the mediator interface i will use the same wsdl, to keep it simple.

Drag the left arrow of the mediator the to the left swim lane. Now we will have a soap endpoint to test against.
Drag the right arrow to the Direct Binding Service we created in the first step. Doubleclick the mediator to add the transformations.

The process should be done by now. Deploy the SOA Composite.
Go to the Enterprise Manager Console and test the application.

Click “Launch Message Flow Trace” to see what got executed.

In here we will see the Hello_PS_Direct of type ‘Direct Binding’ got executed.

To see if the invoke really triggered my OSB Resources i added tracing to the Proxy Service.

 [OSB Tracing] Routing to SOADirectBinding/hello_bs with message context:
$body = <soap-env:Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
  <tns:hello xmlns:tns="http://hello.service.iteye.nl/">
 [OSB Tracing] The following variables are changed:
 $body = <S:Body xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
  <ns2:helloResponse xmlns:ns2="http://hello.service.iteye.nl/">
    <return>Hello Eric</return>

The steps we need to communicate sync from the Composite Application with the Oracle Service Bus :
Create a proxy service with sb-transport in the Oracle Service Bus, use the effective wsdl from this service to create a reference service with the Direct Binding adapter and you’re ready to go.
The other steps needed are just the usual steps to create and implement the Composite Application and the resources in the Oracle Service Bus.


Blog is moved to a new location!

My blog is moved to a new location.
From now on you will find all the old posts both on http://eelzinga.wordpress.com and http://blog.xenta.nl/

The new posts will only get added to http://blog.xenta.nl

Hope you will enjoy the new site!

fusion11g, java, weblogic

Scheduling Oracle SOA Suite Composite Applications (or whatever you want) in Weblogic

After reading a nice article about TimerManager functionality in Weblogic, i wanted to see how easy it would be to schedule my test composite application.

First deploy your composite and go to SOA > soa-infra > default > Test > WSDL.
Copy/paste the wsdl, this one we will use to generate the web proxy.
Back in JDeveloper create a new Application (or add it to an existing one), and create a new Web Project.

Select the jsp option, we will use this page later to trigger the scheduler.

Generating the Web Proxy

Right mouseclick on the Project > New > Business Tier > Web Services > Web Service Proxy

Fill in the url which we copy/pasted from the Test console of the composite application.

Fill in your package structure

We only have a synchronious service call

Here we have the option to apply any policies

This will generate all the code we need to invoke the composite application (wsdl).
The class with the name ending with ‘_ptClient’ contains all the code needed to do the invoke from java. This we will reuse later on.
For a little test, change the code so it calls the correct method of your composite application and check the console to see if it triggers a new instance.
Now we know for sure the proxy code itself is working, so we can go on with the code to schedule the invoke.


The code of the TimerManager i borrowed from this excellent blog.
Create both ‘TimerServlet’ servlet and the ‘TimerListener’ class, edit web.xml, and add link to the servlet to the index.jsp which we generated in one of the earlier steps.

Now copy/paste the example code of the ‘_ptClient’ class to the ‘TimerListener’ class, and select the method you want to call (in my case the ‘process’ method).

Deploy and Run

Add a new WAR File Deployment Profile to the project.
Right mouseclick on the Project > Deploy > MyTimerApp and either select to deploy right away to the Application Server or to a local WAR archive.

Go to the url of the index.jsp to trigger the scheduler, for example http://localhost:8001/MyBPELTimer-MyTimerClient-context-root/index.jsp

Console output

inside timerExpired()
Starting schedule bpel, Fri May 21 12:25:03 CEST 2010
Finishing schedule bpel, response is : setOutput
exiting timerExpired()

inside timerExpired()
Starting schedule bpel, Fri May 21 12:25:13 CEST 2010
Finishing schedule bpel, response is : setOutput
exiting timerExpired()

inside timerExpired()
Starting schedule bpel, Fri May 21 12:25:23 CEST 2010
Finishing schedule bpel, response is : setOutput
exiting timerExpired()

Overview of the Composite instances which were created




JDeveloper Project – It includes the generated code/imports against my own composite application. Regenerate the code against your own wsdl, and revalidate the code.



Oracle SOA Suite 11g, Resequence messages in Mediator

“A Resequencer is used to rearrange a stream of related but out-of-sequence messages back into order. It sequences the incoming messages that arrive in a random order and then send them to the target services in an orderly manner. The sequencing is done based on the sequencing strategy selected.”

For the resequencer to work we need to have 2 values in the source payload. The first one is a sequenceID, and the next one is a groupdID. The sequenceID will be used as identifier for the message itself. The groupID will be used to group the messages in which the resequencer will rearrange the messages based on the sequenceID. Different groups will have seperate processing, so they won’t have any influence on each other.

The mediator supplies us 3 types of resequencers :

  • Standard Resequencer
  • FIFO Resequencer
  • BestEffort Resequencer

Let’s test the first one.

For this i created the next composite

In here i just map the input of the process 1on1 to the File adapter, which will store the input of the process on filesystem.

Interface of the composite

<?xml version="1.0" encoding="UTF-8"?>
<schema attributeFormDefault="unqualified"
	<element name="process">
				<element name="empID" type="string"/>
        <element name="empType" type="string"/>
        <element name="empName" type="string"/>
	<element name="processResponse">
				<element name="result" type="string"/>

Configuration of the sequencer

Doubeclick the mediator component in the composite.

For the Resequence Level we can select ‘operations’ or ‘component’.
For Mediator components which only have 1 operation it doesn’t matter which one we select. For a Mediator component which consists of more then 1 operation and selecting the ‘component’ option means resequencing is applied to all operations in it. For this test we selected the ‘component’ option and used the ‘Standard’ mode.
Now we have several options to configurate the resequencer.

  • Group – xpath expression to the field in the payload which the resequencer will use to group our incoming messages
  • ID – xpath expression to the field which will uniquely identify our message
  • Start – Start value of the ID in the incoming message
  • Increment – Value which will be used for the increment of the id field in the upcoming messages
  • Timeout – Time to wait before a following expected message arrives at the Mediator component

And that’s it what is needed for the configuration of the ‘Standard’ resequencer.


To test this scenario i will use the following 3 messages.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    	<soap:Body xmlns:ns1="http://xmlns.oracle.com/Application1_jws/MyReSequence/ProcessEmployees">
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    	<soap:Body xmlns:ns1="http://xmlns.oracle.com/Application1_jws/MyReSequence/ProcessEmployees">
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    	<soap:Body xmlns:ns1="http://xmlns.oracle.com/Application1_jws/MyReSequence/ProcessEmployees">

Go to the console > soa_domain > SOA > soa-infra > > and Test it.
If we trigger the process 3 times with the payloads as we describes and in the same sequence, the instances will all complete and write the files to filesystem in the same sequence.

We used the ‘Standard’ mode and selected empID for sequence-value and emptType for group-value, and the sequence should start with 1 and will increment by 1.

Now switch the last 2 messages in the sequence and see what happens. Since we’re trying to process and already processed message again we will get the next errormessage

The selected operation execute could not be invoked.
An exception occured while invoking the webservice operation. Please see logs for more details.
oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: oracle.tip.mediator.infra.exception.MediatorException: ORAMED-03003:[Storing Resequencer Group Failed]Unable to store Resequencer Group." oracle.tip.mediator.common.persistence.MediatorResequencerMessage, mediator InstanceId=E07531315F8511DFBFBF3B164F19FDA3, componentDn=default/MyReSequence!1.0/Mediator1, operation=execute, groupId=IT, sequenceId=1, status=0"Possible Fix:Unable to store Resequencer Group. Check your Database connection or check data

So change all empType to ‘HR’ instead of ‘IT’.
For example

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    	<soap:Body xmlns:ns1="http://xmlns.oracle.com/Application1_jws/MyReSequence/ProcessEmployees">

The sequence we’re now going to use is empID=1, empID=3, empID=2

After sending the second message (empID=3), you will notice the instance won’t complete. Because the resequencer expects an empID=2. In this case it will wait till this message arrives.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    	<soap:Body xmlns:ns1="http://xmlns.oracle.com/Application1_jws/MyReSequence/ProcessEmployees">

Now use the last test message (empID=2) and see what happens.

Instance 30030 changes from Running to Completed. This is because it received the next message in the sequence (empID=2), and after that the instance 30030 (empID=3) could continue.
If we check the files on filesystem we also see (compair the datetime of the files) that the files are stored in the correct sequence.

Other Resequencers

Besides the ‘Standard’ resequencer wel also have the ‘FIFO’- and the ‘BestEffort’ resequencer.
See this document to decide what resequencer suits best for your case.



Oracle Service Bus 11g, Using Custom Xpath functions

In the new Oracle Service Bus 11g, Oracle gives us new functionality for the use of custom xpath functions.
These functions we eventually can re-use in for example the xslt or xquery transformations.

For this we need :

  1. 1. XML Configuration file (osb-custom.xml)
  2. 2. Property file (optional, osb-custom.properties)
  3. 3. Custom Function Class (jar package)

All these files need to be stored at the next location


1. XML Configuration file

Create a new XML configuration file. I made a copy of the default file, osb-built-in.xml, edit that one, and change the settings.

<?xml version="1.0" encoding="UTF-8"?>
<xpf:xpathFunctions xmlns:xpf="http://www.bea.com/wli/sb/xpath/config">
    <xpf:category id="%OSB_FUNCTIONS%">
            <xpf:method>java.lang.String customConcat(java.lang.String, java.lang.String)</xpf:method>

A few notes on this file.

  • category, the name of the category how it will appear in the IDE or Console
  • function:name,comments, the description of the function how it will appear in the IDE or Console
  • namespaceURI, the namespace which will be imported in for example the xquery to identify the custom function
  • className, the java implementation of our custom xpath function
  • method, the name of the method which we will be using for the implentation of the function
  • isDeterministic, A value of true or false declaring whether or not the function is deterministic, the XQuery standard recommends the function to be deterministic (see documentation for further information)
  • scope, i assume the scope of the OSB flow in which the function can be used

2. Property file

%OSB_FUNCTIONS%=Service Bus Functions
%FUNC_CUSTOM_CONCAT_COMMENT%=Returns the concat of the first and the second parameter

Not much in here,just a few placeholders for the descriptions

3. Custom Function Class

Create a new Java project in your favorite IDE. Create a new package and java class. For this demo i created a custom concat function which will concat parameter1 and parameter2 and return the result.

package nl.iteye.osb.custom.functions;

public class OsbUtils {
    public OsbUtils() {

    public static String customConcat(String firstParam, String secondParam) {
        return firstParam + " " + secondParam;

The method needs to be defined as static.
Compile the code and create a jar archive and store this at the location mentioned in the top of the article.
After this we should have 3 extra files in this directory :

  • osb-custom.xml
  • osb-custom.properties
  • osb-custom.jar

Restart the server, so the Oracle Service Bus will load the custom classes we just created. Check the output of the console to see if don’t see any errors come by. Wrong configuration (wrong methodname,package, etc) will end up with a little stacktrace in here.


To test the custom xpath function, create a new Oracle Service Bus project in Eclipse.

Add new XML Schema

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/NewXMLSchema" xmlns:tns="http://www.example.org/NewXMLSchema" elementFormDefault="qualified">
    <element name="Input" type="tns:InputType"></element>
    <element name="Output" type="string"></element>

    <complexType name="InputType">
    		<element name="Name1" type="string"></element>
    		<element name="Name2" type="string"></element>

Add new XQuery Transformation
In the list of expression functions we will see our custom function (customConcat)

(:: pragma bea:global-element-parameter parameter="$input1" element="ns0:Input" location="NewXMLSchema.xsd" ::)
(:: pragma bea:global-element-return element="ns0:Output" location="NewXMLSchema.xsd" ::)

declare namespace ns0 = "http://www.example.org/NewXMLSchema";
declare namespace xf = "http://tempuri.org/OSB%20Project%201/InputToOutput/";

declare function xf:InputToOutput($input1 as element(ns0:Input))
    as element(ns0:Output) {
        <ns0:Output>{ osbK3:customConcat($input1/ns0:Name1,$input1/ns0:Name2) }</ns0:Output>

declare variable $input1 as element(ns0:Input) external;


In the transformation i will map both the Name1 and Name2 to the input of the custom function, which will return the concat of both in output.

The easiest way to test the result is by running the XQuery on a connected server. Right mouseclick on the .xq file > Run As > Run on Server
The Oracle Service Bus Test Console will pop up.
Fill in the input data and execute.

And the result



Oracle SOA Suite 11g, Enable logging for EDN events

By default the logging for the events are turned off.

Connect to your DEV_SOAINFRA schema and execute :

  ENABLED := 1;


Trigger a new business event and select the logging in the ‘EDN_LOG_MESSAGES_TABLE’ (select * from edn_log_messages)



Oracle SOA Suite, Launch Message Flow Trace in Google Chrome

During testing of some of my composite applications i just couldn’t get the ‘Launch Message Flow Trace’ link showing the output (popup it seemed later on).
Chrome didn’t came up with the a blocking popup so it didn’t ring any bells.

Google Chrome > Options > Under the Hood > Content Settings > Pop-ups > and add your hostname to the exception list

Original blog

Page 5 of 10« First...34567...10...Last »