Saturday, October 25, 2008

Oracle Service Bus 10.3

Oracle has just released the new Oracle Service Bus ( AquaLogic Service Bus ) which is a combination of the Oracle ESB and BEA AquaLogic Service Bus. So let's install it and give it a testdrive. ( I am a Soa Suite expert so I am very curious to see how aqualogic works) .
In this blog I will make a small ESB example where I use a JMS Queue and a Web service ( this are proxy services ) as input and the Service Bus will route these messages to my local C or D drive ( these are my business services). In this example I will only use the OSB console to configure my project, off course you can do it too in the eclipse workshop.
First we have to start the Service Bus Console.

use this url http://localhost:7021/sbconsole/ weblogic as username and password. Now we can go the project explorer where we will create a new Project called TestDrive.
Click the just created TestDrive project. In this project we will create two folders called wsdl and xsd.
We can now add a wsdl to the wsdl folder ( this wsdl is use for the proxy service) and a xml schema to the xsd folder. The xml we use in this TestDrive is based on this schema

Let add the business functions first. Create a new resource and select business service. Use as service type "Any XML Service"

Use File as protocol and add an file endpoint file:///c:/temp.
Do the same for the D drive business service.

We can add a JMS proxy service which retrieves a message from a queue and routes this message to to the C or D drive business service. Create a new resource and select the proxy service. Where we will use "Message Service" as service type
Now we can select the xml schema and the right element where the message is based on
Use JMS as protocol and as endpoint I use jms://localhost:7021/TestCF/TestQ . TestCF is the jms connection factory and TestQ is my demo queue. ( you can create these jms resources in the weblogic console)
Let add some routing to the JMS proxy
Click the JMSproxy and add "Add Route"
Edit this route
Add a routing table because I want to check an element in the message and then decides which business services I need use.
Click the expression and go to the variables structures where I select the body and the recipient element. From the property inspector I copy this value to the field above
If the receiver element has a particular value then route this message to the D drive
We have to add a default case. This case is used when the first expression is not valid.

Route the default case to the C drive business service and we are finished with the JMS proxy. Activate the project so we can test our services

Just add a message to the queue or launch the test console of the JMSproxy.

The next step is to to add a Web Service Proxy and add some routing to the C drive business service. Create a new proxy service resource and use the wsdl we uploaded in one of the first steps and select the consume operation.
Use the ws protocol, later we can use http://localhost:7021/TestDrive/WSproxy to test our ws or to retrieve the wsdl.
Add some routing to this proxy service. This time we only use the c drive business service so I can use Routing and not routing table.
Use the c drive business service

Activate the project and we are finished with our TestDrive project.

Conclusion: the Oracle Service Bus 10R3 is very easy to work with ( off course you need to have some basic knowledge about wsdl, xsd , jms ) and it was nice to see that you only have to use the sbconsole application to create the whole project. So the next time I will test the Oracle BPEL integration, Oracle Workshop, Data service providers, Performance and some complex routings.


  1. Please provide hte "xml schema" which we need to import

  2. Hi, here we go.

  3. Thanks a lot dear...
    one more thing i want to to use JMS Connection Factories and Queue in this example...

    means how to create it in WLS...?

  4. Hi maybe this would help

  5. Hi Edwin,
    Nice One. Got the schema from ur download (MHSDataSchema.xsd) in XSD/MHS folder and tested the JMSProxy with some junk file. How to test the proper one .I mean moving msg to D Drive. So please upload proper XML file and for WSproxy PS need WSDL file. If u have plz upload and share with us.

    Thanks for the nice article

  6. Hi,

    here we go


  7. Hi Edwin,

    I tried getting a msg from proxyservice and writing to a file, but the complete xml, gets written to the file. How to get only the msg/required payload and write to a file? Also if I create a project on OSB console, how to open in workshop?


  8. Hi

    How to get only the msg/required payload and write to a file?

    for example you can use assign and a add value to the run variable $body/que:data-message/que:runid/text()

    and finally replace the body of your message with this value
    <soapenv:Body xmlns:soapenv="">

    and make an export from the console and import this in the workshop


  9. awesome it worked..thanks Edwin...ur blogs r very much interesting..keep going..

  10. Hi Biemond,

    I have a situation, there would be synch and asynch requests are coming from single web service client. I would like to have one Weblogic JMS Queue based on priority i.e for synch req - 9 and asynch req - 4. Could you please suggest how this can be handled?
    Whether i need to write a web service otherwise this can be handled in OSB itself.

    Thanks in advance.

  11. Hi Edwin,

    This is an excellent post . Am trying to do this in my machine. Can you please pass on the WSDL . WSDL folder is empty in this zip :-

    Please do the needful

    Thanks in advance !