Oracle SOA : Exposing data using Web Service

Hi folks! Welcome to my new post on Oracle SOA.
 
This post explains the use of Mediator as a component to expose the data through a Web Service Adapter to outside world, received from DB Adapter.
[The WSDL URL obtained later, can be consumed in an ADF Application. Check out this post]
To start with, I have the following resources handy
ü  Jdeveloper IDE  (11.1.1.7.0) + SOA Extensions

ü  Oracle DB XE 11G (Up & Running!)

ü  WL Servers 10.3.6 (Up & Running!)

ü  Internet Explorer 10 (10.0.9200.16384)


Here it goes,

Ø  Create a SOA Application with Empty Composite as below.


 


Ø  Drag & drop a “Database Adapter” from component palette to the External References swim lane as pictured below.
 
 

Ø  Click “Next” in the popup invoked to configure the DB adapter.
 

 

Ø  Input a Service Name, choose a DB Connection.
Ø  Remember the JNDI name & configure the same in the Admin Console as well as update the DB Adapter Plan. [ For more details on how to configure, check this site http://smconsultants.in/2012/08/working-with-the-database-adapter-in-oracle-soa-suite-11g.html ]
Ø  Choose “Select” operation and import the “Employee” Table.
Ø  Don’t bother about dependencies and move on to create a parameter upon which, it will be queried.
 
 
 
Ø  Configure the “Web Service” Adapter by dragging & dropping on the “Exposed Services” swim lane as given below. 
 
Ø  Name the Service, generate the WSDL from schema – choose a “Synchronous” Interface for type, add Input & Output part names. 
 

Ø  Click “OK” to return back to Web Service Configuration popup, again press “OK” to finish it.
 

Ø  Now add a “Mediator” component to components swim lane as shown below.

 
Ø  Name the Mediator & choose “Define Interface Later” Template and click “OK”.
Ø  Wire the WS to Mediator & Mediator to the DB Adapter to look similar as below.  
Ø  Double click the Mediator to configure the mapping of “Request” & “Response” in mplan.
 
 
 
 

[Note: Expand the tree node and map individual attributes. Values are populated only for the mapped attributes.]
Ø  Click on Save & deploy the Application Server.

Ø  If the Build is successful, check the EM console for the deployed application.

Ø  Select the application & click on “Test” to test the Service.

Ø  Enter a value for “empID” parameter & invoke the Test Web Service button to see the response.
 
 

Ø  Finally the required output is achieved. [Note down the WSDL URL for client accessing] 

Comments

Popular posts from this blog

Oracle ADF: Add a Favicon to Page, Page Template

Oracle ADF : Dynamic Regions

Oracle ADF : Working with Parameters