•;completed-app contains completed
application workspaces for the Business
Components application and the Web
service. (As you’ll see, the completed app
also includes some advanced capabilities.)
To follow the steps in this column, you’ll
need the studio edition of Oracle JDeveloper
11 g Release 2 ( 11. 1. 2. 2) or later, available
as a free download on Oracle Technology
Network. You’ll also need an Oracle Database
instance with an unlocked HR schema.
Preliminary setup tasks include changing
the database connection to point to your HR
database schema from both the Business
Components application project and the
Web services project, as follows:
1.;Launch Oracle JDeveloper 11 g Release 2.
Select File ->;Open, and navigate to
the directory containing the unpacked
sample application.
2.;Open the starter-app;folder and then
the WebService;folder, and select the
WebService.jws file, followed by Open.
The workspace will now open in Oracle
JDeveloper.
3.;Select View;->;Database;->;Database
Navigator, and expand the WebService
node to find the hrconn node.
4.;Right-click the hrconn node, and select
Properties from the context menu. Edit
the database connection information to
work with your setup. Test the changes,
and then click OK to close the connection properties.
With a working connection to your database, you can now deploy and run the Web
service using Oracle WebLogic Server, which
is integrated into Oracle JDeveloper. In the
Application Navigator
5.;Expand the hrDeptEmpService;project
node and then the oramag.sample.jaxws
. hr.session package structure.
6.;Continue expanding the package structure until you locate the class file
hrDeptEmpServiceBean.java.
7.;Right-click hrDeptEmpServiceBean.java
and choose Run;from the context menu
to deploy and run the service. (If a Create
Default Domain dialog box appears, create
a password for the default Oracle WebLogic
Server domain associated with Oracle
JDeveloper and click OK to continue.)
JAX-WS
Proxy Client
ADF Business
Components
JavaBean Wrapper
Entity Object
WsDepartments
extended by
WsEntity
Abstract Class
referenced by
View Object
WsDepartmentsView
extended by
WsViewObject
Abstract Class
exposed in
Application
Module
Figure 1: Sample Oracle ADF Web service integration architecture
At this point, the Web service has been
deployed and is running on the integrated
Oracle WebLogic Server. You must also provide
the correct database connection information
for the Business Components application:
8.;Using File;->;Open, navigate to the
OraMag-AdfBc WsApp folder.
9.;Select the OraMag-AdfBc WsApp.jws file.
10.;Click Open to open the workspace.
11.;Select View;->;Database;->;Database
Navigator. Expand the OraMag-
AdfBc WsApp node, and right-click the
hrconn node.
12.;Select Properties from the context menu
to edit the database connection information to work with your database configuration. Test your changes, and then
click OK to close the connection properties. You can now start integrating the
Business Components application and
the Web service.
Building;a;WeB;Service–BaSed
entity;OBject
Web services are integrated into Business
Components via programmatic view
objects. To implement CRUD behavior, the
view objects must be based on an entity
object that overrides the built-in frame-
work methods, doDML and doSelect, of the
Business Components entity object. You
provide information to Oracle JDeveloper
about the properties and datatypes provided
by the Web service. For the example integra-
tion, the Web service Departments entity has
the following properties defined: