Tags
11G, ALSB, Aqualogic, BPEL, bus, Business, DBAdapter, EM, JDeveloper, Oracle, OSB, Proxy, Service Bus, SOA, Soa-Suite, workspace
To view this article by direct Oracle site see the link:
Or just follow the article as follows:
Oracle Service Bus or simply OSB, a very common error regarding OSB is to say that it “implements” SOA or the fact of using a OSB in its architecture already turns into a Service-Oriented Architecture. In fact, the OSB is responsible for much of the features that SOA fold, but not all.
However, I will talk about in this post all the features of OSB for surely would be several posts for this since its range of features and possibilities would be immensely extensive, but you can get an idea by visiting this link of Oracle http://docs.oracle.com/cd/E11036_01/alsb30/userguide/intro.html
This article will describe the main components of OSB are::
OSB STUDIOThe development environment for OSB components is supported through Eclipse and a specific plugin for OSB. |
OSB PROXY SERVICEThe proxy service that is being uncoupled from the client, can be generated in different protocol types. |
OSB BUSINESS SERVICEService being coupled to the bus and / or participating in an integration. |
In this example will exhibit at OSB our service built in BPEL as my Post:: Selecting data using the Database Adapter (BPEL DbAdapter) Oracle SOA Suite 11g
I using Version: 3.6.2 as follows:
Based on the principle that you and I have no project and just make the installation of OSB we open the OSB STUDIO which is nothing more than an Eclipse with many plugins Oracle, and put the path where it will be our workspace that will be where will our project. In my case I’m using Linux: /home/uans/workspace_osb_blogUans
After clicking OK this is the splash screen: Click Workbech
From the menu, click File >> New >> Other .. The screen below, then go to the Oracle Service Bus folder and select the Oracle Service Bus Configuration Project option and click Next
On the next screen click Finish
Onscreen down click Yes:
Now we have the following screen:
Click again on File >> New >> Project ..
The screen below, then go to the Oracle Service Bus folder and select the Oracle Service Bus Project option and click Next
On the screen below will be as OSB Project 1, then rename it to OSBProject for this project configuration can be no room for not having future problems when mapping the XSDs and WSDLs, then click Finish
Right button click OSBProject and select New >> Folder
Create the following folder structure:
- Business
- Proxy
- WSDL
- XSD
Okay, now we have our setup and structure of our project, we now bring to our OSB BPEL Project, for this we go to EnterpriseManager (EM) BPEL:
In your browser go to http://localhost:10000/em
Note: The port 10000 is the number that I chose to create my BPEL Domain
Login:
Click on your project: SelectDBAdapter[1.0]
Click Test
This will be your WSDL that we should export to the OSB:
But for this, copy and paste the URL in your browser:
In this screen we extract our WSDL and XSD our:
On this screen select, copy the portion of XSD as follows:
Which should look like this:
Now, on the screen click the right button and select View Page Source (see source code)
Then we should see the screen as well:
Copy the contents of this screen and return to the OSB
Note: If in your WSDL has more XSDs then we must also copy them to the OSB, and note that this is the same XSD that will be in your BPEL project.
Click on the XSD folder:
Now click on Menu and select File >> New >> File
In File Name: Place SelectDbAdapterBPEL.xsd and click Finish
Click Source and paste the xsd content you selected above:
And we should have the following screen:
Now on the screen where you pasted the WSDL:
Click the right button and choose View Page Source (View source code)
Copy the contents of this screen and return to the OSB Click on the WSDL folder:
Now click on Menu and select File >> New >> File
In File Name: Place SelectDbAdapterBPELContract.wsdl and click Finish
We will have an empty WSDL:
Now paste the WSDL screen content that we copied earlier and looks like this:
But note that our WSDL is in trouble for this with some “X” as follows:
The problem here is just because he is not finding the reference to our XSD, ie, there is a XSD dependency that is not being found as shown in the Problems tab of our OSB:
In our WSDL locate the part below:
In schemaLocation line, leave just so:
schemaLocation=”../../OSBProject/XSD/SelectDbAdapterBPEL.xsd”/>
Because this is where this XSD in our project
Save the file and see that no more problems in our project:
Now let’s create our Business Service:
Click on the folder Business
Now click on the menu and select File >> New >> Business Service and File Name: place SelectDbAdapterBPELBusiness and Finish
In the screen below select the WSDL Web Service option and click Browse to locate our WSDL:
On the next screen choose: selectDBAdapterBPELProcess_pt(port) and click OK
On this screen, click Yes to confirm the changes
Save now the changes:
Everything OK, let’s now create our Proxy Service
In on the Proxy folder
Now click on the menu and select File >> New >> Proxy Service (be careful, it is not Proxy Server because there the two) and File Name: place SelectDbAdapterBPELProxy and Finish
In the screenshot below, again select the WSDL Web Service option and click Browse to locate our WSDL:
On this screen, click Yes to confirm the changes
Save the changes now:
Now click on the tab below Message Flow
At your right side in the Oracle Service Bus Message Flow tab and drag the Route component so that it is below its SelectDbAdapterBPELProxy, and release as follows:
Now to your right on Route Actions tab, choose the Routing component and drag into your RouteNode1 that should look like this:
Now click on the Routing and name below the Properties tab
Click Browse and select SelectDbAdapterBPELBusiness.biz as below and click OK.
Now the Properties tab select the process on invoking:
Click Save, and the Servers tab make Publish your project as below:
Note: If you have not configured your Server do the following:
Click the right mouse button on the Server tab that must be empty conform below:
Select New >> Server
Appears the box below, then the Oracle folder and choose Oracle WebLogic Server 11gR1 PatchSet 4 and click Next:
As indicated below, on the Configuration tab, under Domain diretory place where your domain and click Next:
In the image below OSB Configuration 1 select one and click the Add > button for it to go to the right side of the screen in the Configured tab and click Next
In the screenshot below you can now click Finish
After that, if you have not done yet, you can already do the Publish:
Make sure that your Publish was successful because it should be as follows (Started, Synchronized)
Let’s do the test to make sure everything worked perfectly.
In your browser go to http://localhost:9000/sbconsole
Note: The 9000 port is the number I chose to create my Domain OSB
Login:
Click Resource Browser and right side should appear to our Proxy SelectDbAdapterBPELProxy
On the right side the Actions tab click the icon that looks like a “green cockroach“:
You will see the screen below, and put the idCliente value 7839 which is a idCliente that exists in my base and then click Execute:
See Response Document in the response of our service:
Doubts? Leave your comment and download this Projet 🙂
Hugs and to the Next
/:-D
CESAR GUERRA said:
Hola,
Has trabajado con el Nodo ‘Publish’ en mi caso no con este nodo, se que es para invocar un Servicio ‘One-Way’. Desde este referencio a un BusinessService de un Servicio ‘One-Way’ y dentro de este Nodo estoy aplicando un Replace para que envía por medio de un XQuery el mensaje pero el mensaje no llega. Has visto el manejo de este Nodo.
Saludos.
Uans said:
Hola Cesar, Más tarde se creó un puesto específico para esto, pero de todos modos gracias por la crítica que siempre es bienvenida.