xml data control - oracle openworld preview amis - richard olrichs en wilfred van der deijl
DESCRIPTION
Many organizations want to leverage their existing or newly developed web services in Oracle Application Development Framework (Oracle ADF) applications. Oracle ADF’s data binding layer provides a declarative way to access different types of data controls. Several of these data controls can be used to access XML content. They tend to be either easy to implement or very powerful. As a result of the Oracle ADF community’s effort, now there is a free open source XML Oracle ADF data control that is both simple and powerful. It can be used with SOAP web services, Oracle Business Process Management human tasks, or any other XML data. It is declarative, without the need for JAX-WS proxies or custom beans—although it is extensible with custom code. Come to this session to learn more.TRANSCRIPT
ADF EMG
XML DataControl Powerful and Easy ADF Datacontrol for XML
About Us
Richard Olrichs
MN
www.olrichs.nl
@richardolrichs
Wilfred van der Deijl
The Future Group
www.redheap.com
@wilfreddeijl
Agenda
● History
● Alternatives
● Live product demo
● Summary
XML DataControl History
● Development started at MN in August 2012
● Adopted by Spir-it since March 2014
● Open to the public o ADF EMG sub project
o https://adfxmldc.atlassian.net/wiki
Alternatives Calling WebService from ADF
1. ADF WebService DataControl
1. JAX-WS Proxy with Bean DataControl
1. Programmatic Business Components
ADF WebService DataControl Alternatives
● Not customizable, for simple web services
● Dates and enumerations not supported
● Only for simple web services like stock info
or weather info
JAX-WS Proxy with Bean DC Alternatives
● Lots of work: o Generate JAX-WS Proxy classes
o Domain POJO’s
o Mapper classes (and back).
● Labor intensive when services change
● JAX-WS Proxy cannot be used directly as
bean DataControl
o Dates and enumerations not supported
o JAXBElement getters/setters not supported
● Lot of work:
o JAX-WS Proxy
o ViewObjects
o EntityObjects
o Mappers (and back)
● BC is very database (SQL) centric
o Commit, Rollback, Fault-In selects, locking,
connection pooling, etcetera
● Requires extensive coding in ADF BC base
classes
Programmatic ADF BC Alternatives
ADF EMG XML DataControl
Developer’s Guide: “Data controls abstract the
implementation technology of a business service by using
standard metadata interfaces to describe the service's
operations and data collections, including information
about the properties, methods, and types involved.”
● XML Schema is the key
● XML DataControl gets its structure from XSD
● Runtime XML document can come from
anywhere o Web service, Human task payload, Static resource,
or… wherever you like
ADF EMG
ADF EMG
ADF EMG
Demo Time ADF EMG XML DataControl
ADF EMG XML DataControl
● Minimal effort to setup, yet powerful and
customizable
● JDeveloper 11.1.1 and 12.1.3
Powerful Providers
● Data Provider - Fetch XML Element
● Customization - Supplies customization classes
● Type Mapper - Map XML to Java types
● Structure Provider - Builds DC structure from XSD
DataProvider Nesting
● Plain DataProviders o WSDataProvider - Web Service
o ELDataProvider - Expression Language
o ResourceDataProvider - XML file from classpath
● Nesting DataProviders o Can manipulate dynamic parameters going into the
nested dataprovider
o Get XML from nested provider and can manipulate it
before returning it to the caller
Nesting DataProviders
● XSL Transformation
● XML Schema Validation
● Caching
● Multi Nesting o UnionFilter - Combines result from multiple providers
o Build your own...
WSDataProvider EmployeeService
<Employee>
<Type>MGR</Type>
…
</Employee>
WSDataProvider ReferenceDataService
WSDataProvider EmployeeService
<Employee>
<Type>MGR</Type>
…
</Employee>
<EmployeeTypes>
<Type>
<Code>MGR</Code>
<Desc>Manager</Desc>
</Type>
…
</EmployeeTypes>
WSDataProvider ReferenceDataService
WSDataProvider EmployeeService
UnionFilter
<Employee>
<Type>MGR</Type>
…
</Employee>
<EmployeeTypes>
<Type>
<Code>MGR</Code>
<Desc>Manager</Desc>
</Type>
…
</EmployeeTypes>
<Union>
<Employee>
…
</Employee>
<EmployeeTypes>
...
</EmployeeTypes>
</Union>
WSDataProvider ReferenceDataService
WSDataProvider EmployeeService
UnionFilter
XSLFilter
<Employee>
<Type>MGR</Type>
…
</Employee>
<EmployeeTypes>
<Type>
<Code>MGR</Code>
<Desc>Manager</Desc>
</Type>
…
</EmployeeTypes>
<Employee>
<Type>MGR</Type>
<TypeDesc>Manager</TypeDesc>
…
</Employee>
<Union>
<Employee>
…
</Employee>
<EmployeeTypes>
...
</EmployeeTypes>
</Union>
WSDataProvider ReferenceDataService
WSDataProvider EmployeeService
CacheFilter
UnionFilter
XSLFilter
<Employee>
<Type>MGR</Type>
…
</Employee>
<EmployeeTypes>
<Type>
<Code>MGR</Code>
<Desc>Manager</Desc>
</Type>
…
</EmployeeTypes>
<Employee>
<Type>MGR</Type>
<TypeDesc>Manager</TypeDesc>
…
</Employee>
<Union>
<Employee>
…
</Employee>
<EmployeeTypes>
...
</EmployeeTypes>
</Union>
Java Customizers
● Java Classes with Annotations
● Can alter structure and behavior of
datacontrol elements o Calculated Attributes
o Transient Attributes
o Attribute Validation
o Element Validation
o Post Attribute Change
o Post Element Created
o Custom operations/methods
Wiki - adfxmldc.atlassian.net/wiki
Next Steps
Subscribe for product announcements:
http://bit.ly/signupxml
Subscribe to ADF EMG:
http://www.adfemg.org
Follow XML DataControl development:
https://adfxmldc.atlassian.net/wiki
Questions
Demo shots
Creating Data Control
Initial Data Control
in 2 minutes
Dynamic
Parameter from
DataControls.dcx
Drag-Drop
Data Control
onto Page
Dynamic
Parameter value
(typically from EL)
Initial Task Flow
in 5 minutes
Which Data
Collection is this
customizing ?
Calculated (Read
Only) Attribute
Transient (Read
Write) Attribute
Attribute Validation
Register
Customization
Class(es) with
Data Control
Calculated Attribute
Transient Attribute
Transient Attribute
Calculated Attribute
Attribute Validation