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.
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.