Download - Webservice Based business components
![Page 1: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/1.jpg)
S319117 - WEBSERVICE BASED
BUSINESS COMPONENTS
Aino Andriessen
Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
![Page 2: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/2.jpg)
AMIS
• Systems integrator
• Co-sourcing
• Maintenance
• Oracle, Java, Open Source, ADF, DBA, SOA
• AMIS technology school
• APS
• http://www.amis.nl
• http://technology.amis.nl/blog/
![Page 3: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/3.jpg)
AINO ANDRIESSEN
Technical Consultant
Technical Architect
Java, ADF, PL/SQL, XML, ...
SOA , Integration
Software engineering
Quality management
Agile development
http://www.fttech.net
![Page 4: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/4.jpg)
S319117 - WEBSERVICE BASED
BUSINESS COMPONENTS
Aino Andriessen
Monday, September 20, 10:00 | Hotel Nikko, Monterey I / II
![Page 5: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/5.jpg)
Forms
New App
ADF
Main App
ws ws
![Page 6: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/6.jpg)
ADF ARCHITECTURE
![Page 7: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/7.jpg)
ADF BUSINESS COMPONENTS 2
Application Modules
ViewObjects
Entities
Stored Procedures
Tables and views
ADF BC's
Database
![Page 8: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/8.jpg)
ADF BUSINESS COMPONENTS 1
• ORM
• Entities
– An entity object represents a row in a database table and
simplifies modifying its data by handling all data manipulation
language (DML) operations for you.
– CRUD
• ViewObjects
– A view object represents a SQL query and simplifies working
with its result.
– CRUD
• Application Modules
– An application module is the transactional component that UI
clients use to work with application data. It defines an
updatable data model and top-level procedures and functions
(called service methods) related to a logical unit of work
related to an end-user task.
![Page 9: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/9.jpg)
ADF BC 'DOMAINMODEL'
Jobs
![Page 10: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/10.jpg)
CHALLENGE - 10G
• The standard option is to base ADF BC's on database
objects (tables, views).
• Programmatic BC's allow other sources.
– webservices, ref cursor, properties, etc.
– but you must do all the work yourself
– guidelines are available
![Page 11: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/11.jpg)
CHALLENGE - 11G
• Programmatic BC's
• ADF BC's can be, natively, based on webservices
– but only if they have a so-called service interface
• avaliable with ADF BC based webservices
– SDO
– very new feature
![Page 12: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/12.jpg)
DEMO
• Let's demo the hard-way with programmatic BC's
• Then the easy, future, way with SDO's
![Page 13: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/13.jpg)
DEMO EXPLANATION
• A Webservice that provides access to jobs information.
• An ADF application to manage employees, that needs the
jobs information to translate the jobId (AD_PRES) to a
description (President).
WS Consumer
WS Producer
EmpJob
Job
UI
![Page 14: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/14.jpg)
![Page 15: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/15.jpg)
WEBSERVICE PRODUCER
• Standard ADF BC's
• Remote interface
• AM client interface method
– objects must be serializable
• Pojo's
• Deploy
![Page 16: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/16.jpg)
![Page 17: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/17.jpg)
WEBSERVICE CONSUMER
• webservice proxy
– standard client to access webservice
– can easily be generated
![Page 18: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/18.jpg)
DEMO CONTINUED
![Page 19: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/19.jpg)
![Page 20: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/20.jpg)
CHALLENGE
![Page 21: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/21.jpg)
ADF app / WS Consumer
ACCESS WEBSERVICE
WS Producer
JobGenerated Proxy
DataAccess
JobEO JobsVw
ProgrammaticResultSet
Pojo
![Page 22: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/22.jpg)
• BaseClasses
– Overriden methods
– General methods
• Utility classes
– Hold retrieved data
– Conversion
– Service access via proxy
![Page 23: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/23.jpg)
BASECLASSES
JobEOinsertRow()updateRow()deleteRow()getCurrentRow()
JobsVwgetProgrammaticResultSet()
EntityBasedoDML()doSelect()
VOBasecreate()executeQueryForCollection()hasNextForCollection()createRowFromResultSet()getQueryHitCount()releaseUserDataForCollection()
DAJobs
DataAccess
![Page 24: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/24.jpg)
OVERRIDE METHODS
• Entity
– doSelect()
– doDML()
• ViewObject
– create()
– executeQueryForCollection()
– hasNextForCollection()
– createRowFromResultSet()
– getQueryHitCount()
– releaseUserDataForCollection()
• viewlinkaccessors
![Page 25: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/25.jpg)
CONVERTERS
• Generic code
– to support multiple objects
• Represent data in tabular form (rows, colums)
– ProgrammaticResultSet
![Page 26: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/26.jpg)
![Page 27: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/27.jpg)
![Page 28: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/28.jpg)
SHORT WRAP UP
• Producer
• Consumer
– ws proxy
– programmatic BC's
– override a few standard methods
– lot of custom code, especially for conversion
![Page 29: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/29.jpg)
![Page 30: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/30.jpg)
![Page 31: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/31.jpg)
SERVICE INTERFACE PRODUCER
• Special webservice
– Business Components service interface
• Create on top of BC's
– Create BC's
– Enable service interface
• VO's are published as SDO's
– compare to custom POJO in 10g impl.
– extends from org.eclipse.persistence.sdo.SDODataObject
• Service is also available as EJB
• Support for relations
![Page 32: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/32.jpg)
SERVICE INTERFACE CONSUMER
• Create Entity
– Service Interface entity
• Base VO on entity
• Include common jar from
producer (with object
definitions)
• Configure connection
<DataSource
DataSourceClass="oracle.jbo.datasource.svc.SIEODataSourceImpl"
Type="ServiceInterface">
<ServiceInterface
ServiceName="{/nl/amis/demo/wsbc/jobprod/model/ams/common/}JobSDOService"
SDOName="{/nl/amis/demo/wsbc/jobprod/model/queries/common/}JobsVwSDO"
SVIName="Jobs"
CreateOpName="createJobs"
UpdateOpName="updateJobs"
GetOpName="getJobs"
FindOpName="findJobs"/>
</DataSource>
![Page 33: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/33.jpg)
SERVICE DATA OBJECT
• Service Data Objects is a technology that allows
heterogeneous data to be accessed in a uniform way.
– The SDO specification was originally developed in 2004 as a
joint collaboration between BEA and IBM and approved by
the Java Community Process.
– Version 2.0 of the specification was introduced in November
2005 as key part of the Service Component Architecture.
• Java standaard
• Disconnected
![Page 34: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/34.jpg)
ISSUES
• Connection either via SOAP or EJB
• Configuration
• In webapp:
– Only EJB works
– SOAP will work in the next JDev version
• Very new feature
![Page 35: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/35.jpg)
SERVICE BASED WEBSERVICE
INTERACTION
• WS datacontrol
• WebService proxy
– WSDL
• Custom interaction
– REST
• Jersey Client
• Commons HTTPClient
![Page 36: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/36.jpg)
![Page 37: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/37.jpg)
• Business Components can be based on webservices but it's
not a trivial exercise and requires a lot of work
• Others have done it before so don't invent the wheel again.
• It's much easier to use 11g service interface BC's, but they
requires service interface webservices and are still under
development, although almost done.
![Page 38: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/38.jpg)
![Page 39: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/39.jpg)
S313467 - ADF BUILD PROCESS WITH
MAVEN AND HUDSON
Aino Andriessen
Thursday, September 23, 11:00 | Hotel Nikko, Peninsula
![Page 40: Webservice Based business components](https://reader035.vdocuments.us/reader035/viewer/2022081622/613d1693736caf36b7592be3/html5/thumbnails/40.jpg)