Download Why XML? - Tribury Media, LLC

Document related concepts

Database wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Object-relational impedance mismatch wikipedia , lookup

Database model wikipedia , lookup

Versant Object Database wikipedia , lookup

Clusterpoint wikipedia , lookup

Transcript
XML in Reality:
A Case Study Analysis
Software AG
Wednesday, May 24, 2017
“The XML Company”
Steve Hamby
IT Architect
404-441-4498
1
Agenda
 XML Uses and Case Studies
 XSL
 Java and XML
 Native vs. XML-Enabled
 Software AG’s Tamino
 Accessing Tamino
 Summary
2
providing the leading software platform to enable companies to transact
business, integrate applications and to collaborate over the internet by
leveraging XML.
3
XML Leadership from Software AG
 Michael Champion, DOM Working Group
 http://www.w3.org/TR/DOM-Level-2-Core
 Michael Kay, XSL Working Group
 Widely published author and expert on XSL and XSLT
 Creator of SAXON – http://users.iclway.co.uk/mhkay/
 Jonathan Robie, Query Working Group model
 http://www.w3.org/TR/query-data
 Juliane Harbarth, XSL Working Group
 Dr. Dietmar Gaerner, XML Standards & DOM Working Groups
 Nigel Hutchison, Tamino Chief Architect
4
Why XML?









XML is the eXtensible Markup Language
XML is simple and easy to understand and use
XML is dynamic and can change with data
XML makes data self-describing
XML is a user-driven standard
XML is platform and application independent
XML is application and human readable
XML embraces all types of data
XML is at the heart of the web
5
XML: Separation of Document Components
Structure
Presentation
ABC
Content
Text
Pictures
6
XML is eXtensible
<?xml version=“1.0”?>
<weather-report>
<date>November 28, 2001</date>
<time>9am</time>
<area>
<city>San Francisco</city>
<country>USA</country>
</area>
<measurements>
<skies>sunny</skies>
<temp scale=“C”>22</temp>
</measurements>
</weather-report>
7
XML is eXtensible
<?xml version=“1.0”?>
<weather-report>
<date>November 28, 2001</date>
<time>9am</time>
<area>
<city>San Francisco</city>
<state>California</state>
<country>USA</country>
</area>
<measurements>
<skies>sunny</skies>
<temp scale=“C”>22</temp>
</measurements>
</weather-report>
8
XML Uses – XML Importance
 Document / Content Management
 Internet and Wireless
 Portals
 Application Integration
 Publishing
 Data Exchange
 Electronic Business
9
XML Uses – Document / Content Management
 Content Sources – Standard
 Process Oriented QA / Approval
 Content Access and Security
 Versioning and Control
 Repurposing Content
 Document or Content based
 WebDAV
10
memIQ
 Offers personal internet service
 Legal documents, Bank statements, Tax receipts, etc
 Delivers documents electronically via powerful query GUI
 Strong encryption and security
 Architecture built for performance and fail-over
 Redundant hardware (switches, firewalls, servers, etc)
 Redundant BEA Web Logic servers accessing redundant
Tamino databases
 “Tamino … is the only vehicle that has shown the ability to
accommodate very demanding, high volume XML retrieval
applications.” – IDC on memIQ architecture
11
memIQ
12
Lear
Lear is the fifth largest supplier of vehicle parts and the largest supplier
of car seats and car seat safety equipment
13
Lear
 Record
 Archive
 Manage:
 Manufacturing
 Testing
 Assembly Data for Car Seats Which Include:
 Texts
 Statistics
 Diagrams
 Images
14
Lear Requirements




Legal Requirement
Speed of Data Access
Supply Chain
Ease of Use
 Accessibility
 Types of Data Supported
 Multi-Language
 Quick Implementation – Less than 6 weeks & 3 employees
15
What is the Lexign Trusted Content Alliance?
 A true end-to-end solution
 Comprehensive features, including:
 XML forms
 Signing
 Process Automation
 Content Management
 Certificate Authentication
 Best-of-breed technologies, including:
 Zions Bancorp: ThinkXML, Digital Signature Trust, eLock, IcomExpress
 Authentidate: Date/time stamping, version managment
 Software AG: The market leading XML Server
The Trusted Content Alliance will save the world!
16
Lexign Trusted Content Alliance
 Ensure that employees follow pre-defined company
procedures designed to comply with regulations
 Secure, restrict, and control access to documents by
staff and public
 Improve security by authenticating users while verifying
that data has not been altered
 Digitally sign and authorize transactions online
 Create clear audit trails for compliance documentation
 Five technologies all built on Tamino
17
Trusted Content Alliance
E-Government Portal
Dept
Dept
Dept
Dept
Dept
Dept
E-Form
Digital
Signature
Timestamp
Repository
Workflow
Integration
X_________
a
14:40.102 08-08-2001
Tamino
EntireX
18
XML Uses – Internet and Wireless
 HTML Maintenance
 Personalization
 WML
 VoiceXML
 Web Content Sources
 Reuse
19
DaimlerChrysler FleetBoard
Existing customer
system
Browser
Links the existing customer
system via XML
Internet
The access via
browser enables each
registered users to
access relevant data.
All information is
attainable via WAP
independent of location.
(mobile phone)
WAP
Logistical
information
loaded to Tamino
for access from
WAP client
20
XML Uses – Portals
 Content Source – Disparate Systems
 Personalization
 Wireless Access
 Security
 Categorization
 Search
 Complex Links
 Reuse Across Enterprise, Intranet, and Extranet
21
Content Management – European Parliament
 Challenge : Management of
 Tons of legislative documents
 11 .. soon15 languages
 Short delivery timeframes
 Reuse of existing information
 Problem : Gathering existing Information into 1 document
 Spread in multiple locations / DBs
 Content changing continuously
 “Not easily reusable because hierarchies are stored in
RDBMSs”
22
Content Management – European Parliament
PV
Report
PV
PVReport
Report
PV Report
HTML
XQuery
XQuery
XML
WAP
RTF
DB
PDF
Email
Java
XML
…
23
Corechange Portal
 Access to other systems
 Solution that would work across multiple platforms
 Access from multiple devices
 Better management of metadata
 Security of content
24
Corechange Portal
Web
Browser
B2B
Application
Mobile/
Ubiquitous
Desktop
Viewer
Portal Systems
Management
Content Management and Presentation Services
Personalization
Profiling
Dynamic Publishing
Content Workflow
Categorization
Subscription
Portal Services
Security
Systems Management
Transaction Management
Unstructured Data
Metadata
& Content
Repository
Search
Categorization
Globalization
ERP
CRM
Mainframe Data
25
Aylesbury Vale District Council
Local Authority Implementing e-Government
 The project
 Front End
 Intranet
 Customer Management
 Hierarchy-Controlled Workflow
 Legacy Integration
 XML content
 Component Based Architecture
 Web publishing & page creation
 Customer Management
 Security
 Storage
 Delivery
26
XML Uses – Application Integration
 EAI “Adapters”
 Web Services
 XML-based Applications
 Peer-To-Peer Collaboration
 XML “Log“
 audit trail
 what is being used
27
XML Uses – Web Services
 Model for creating dynamic distributed applications
 Based on emerging standards using the Web infrastructure
(XML, SOAP, WSDL, UDDI)
 Publishing of Application Functionality through Internet
Interfaces
B2B Hub
Internet
Supplier
Get Quote Reservation
ACME
Supplies
Purchase
Order
 Examples
 Credit card validation
 Hotel reservation
 Credit check
XML
Buyer
28
California State Board Of Equalization
Enables Government to Accept Sales and Use Tax Returns Online
Mission:
Allow businesses to use real-time Internet
technology to file their Sales and Use Tax
returns and arrange for payment of tax.
Solution:
Implement Tamino native XML database as a middle tier component to
store Sales and Use Tax returns filed online from business owners.
Result:
- Facilitates e-government initiatives
- Allows extending current mainframe system to the Internet
- Reduced data entry, administration and errors
29
XML Uses – Publishing
 Electronic Forms
 Many Formats
 XSL:FO
30
MCIWorldComm
 Publish telephone bills to multiple formats (PDF, Word,
print, etc)




Use existing data
Allow data to be queried via text searching
Allow access from multiple devices
Also use for press articles and testimonials for sales force
31
MCI WorldComm Tamino
• Internet
Java
Front-end
Application
Developed
In Bolero
• Wireless
• Voice
(future)
Adabas
Natural
32
XML Uses – Data Exchange
 Extensible - Easy Maintenance
 Routing Rules as XML Metadata
 Exchange Different Formats
 Access to Data
 Audit Trail
33
About Leeds & Holbeck
Established in 1875
Over half million members
Over £3 billion pounds assets
62 branches throughout the UK
Rated as one of the Top 10 building societies.
34
Why XML?
Solid foundation for e-Business

Embraces and utilizes industry standards for both
storing and transferring data

Taps into emerging channels to business

XML based integration provides a sound foundation
on which future developments can be based to
accommodate the changes that are envisaged for the
future.
35
Features of the solution:
 Exploits existing investment
 Delivers new channels for customers
 Establishes a platform for growth
36
Mortgage Processing Requirements
 Deploy a system over the Internet
 Quote
on different types of mortgages
 Provide a “mortgage decision over the Internet”
37
XML Based Approach
The way customers locate
information has changed
Customer
Need a more flexible
extensible approach
Browser
IFA
Digital TV
PDAs / Mobiles
HTML
Need to interact with
customers and other
organizations in different ways
WML
XML
VB
VB
VB
MTS
Search Engines/
Agents
Need to transform data to the
appropriate display.
AssureWeb
Oracle
MISYS
Other
Portals
Intermediaries
e-Branch
38
XML Uses – Electronic Business
 CMS, eCatalogs, and Publishing
 Data Integration and Exchange
 Search
 Internet and Wireless
 Ease of maintenance
39
Order transaction
9. invoice
Customer
1. selects articles
2. enters customer
information
7. order confirmation by E-mail
3. checks availability
5. orders articles
Südkraft
shipping, storage
8. invoicing
information
BOC
invoices,
refunds
4. authorization inquiry
6. credit card charge
credit card
payment system
40
Agenda
 XML Uses and Case Studies
 XSL
 Java and XML
 Native vs. XML-Enabled
 Software AG’s Tamino
 Accessing Tamino
 Summary
41
XSL
 eXtensible Stylesheet Language
 Consists of:
 Transformation (XSLT)
 Formatting Objects (XSL:FO)
 Processing oriented
 Either linked or called
42
Anatomy of an XSL Style Sheets
XSL Style Sheet
XML Tree
<xsl:template match="pattern">
HTML Tags
more Style Sheet processing
</xsl:template>
1. Pattern matching
2. Formatting
XSL Syntax
<xsl:apply-templates>
<xsl:apply-templates select="..">
<xsl:for-each select="..">
<xsl:if test="expression">
<xsl:choose>
<xsl:when test="expr">
<xsl:otherwise>
<xsl:sort>
<xsl:value-of select="..">
Process children of current node
Process specified nodes
Iterative processing
Conditional processing
Decide structure
Element of Decide structure
"else" processing
Process child nodes in
sorted order
Insert text
Style Sheet Processing
XML
Style Sheet
Processor
XSL Style Sheet
HTML Page
XSL Style Sheet
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<HTML>
<HEAD><TITLE>Weather Report</TITLE></HEAD>
<BODY><H1>Weather Report</H1>
<xsl:for-each select="//Weather-Report">
<P><xsl:apply-templates/></P>
</xsl:for-each>
</BODY>
</HTML>
</xsl:template>
<xsl:template match=„temperature">
<xsl:value-of /><BR/>
</xsl:template>
</xsl:stylesheet>
XSL as Part of an XML Application
<?xml?>
<weather-report>
<date>September 10,
1999</date>
<time>08:00 </time>
<area>
DTD
<city>Darmstadt</city>
<temperature
scale=“C”>25</temperatu
re>
Style
Sheet
Parser
Style Sheet
Processor
HTML
Page
Application
Document Tree
47
XSL:FO




2nd part of XSL
XML application
Describes how XML will look
Defines four basic area types
1.
2.
3.
4.
regions
block areas
line areas
inline areas
48
XSL:FO Formatting Objects



















fo:basic-link
fo:bidi-override
fo:block
fo:block-container
fo:character
fo:color-profile
fo:conditional-page-masterreference
fo:declarations
fo:external-graphic
fo:float
fo:flow
fo:footnote
fo:footnote-body
fo:initial-property-set
fo:inline
fo:inline-container
fo:instream-foreign-object
fo:layout-master-set
fo:leader
fo:list-block
fo:list-item
fo:list-item-body
fo:list-item-label
fo:marker
fo:multi-case
fo:multi-properties
fo:multi-property-set
fo:multi-switch
fo:multi-toggle
fo:page-number
fo:page-number-citation
fo:page-sequence
fo:page-sequence-master
fo:region-after
fo:region-before
fo:region-body
fo:region-end
fo:region-start


















fo:repeatable-page-masteralternatives
fo:repeatable-page-masterreference
fo:retrieve-marker
fo:root
fo:simple-page-master
fo:single-page-master-reference
fo:static-content
fo:table
fo:table-and-caption
fo:table-body
fo:table-caption
fo:table-cell
fo:table-column
fo:table-footer
fo:table-header
fo:table-row
fo:title
fo:wrapper
49
XSL:FO Example
<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="only">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-name="only">
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="20pt" font-family="serif" line-height="30pt"> Hydrogen
</fo:block>
<fo:block font-size="20pt" font-family="serif" line-height="30pt" > Helium </fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
50
Agenda
 XML Uses and Case Studies
 XSL
 Java and XML
 Native vs. XML-Enabled
 Software AG’s Tamino
 Accessing Tamino
 Summary
51
Does XML compete with Java? NO!!!
 “Java is for portable code, XML is for portable data”
 Jon Bosak of Sun was one of the primary authors of the XML
1.0 specification
 The majority of XML applications are written in Java
 Sun’s ONE Web services initiative is the Java counterpart to
Microsoft .NET
 XML tools will be baked in to the core of JDK 1.4
52
Java and XML – Similarities





Designed for the Internet
Simplicity
Portability
Flexibility
Open development process
53
XML Buzzwords – the JAX Pack
 “JAXP (Processing): DOM, SAX, XSLT and schema processing
 JAXM (Messaging): SOAP and others
 JAXB (Data Binding): Generating Java classes from XML
schemas/DTDs
 JAXR (Registry): UDDI and ebXML registries
 JAXRPC (Remote Procedure Calls) Java RPCs using XML
54
XML in JDK 1.4 “Merlin”
 “JAX Pack” tools are currently separate products
 XML support will be bundled in JDK itself (in rt.jar?)
 JAXP – parser, SAX, DOM, XSLT
 JAXB – data binding tool
 Pluggability layer
 User can select from any conformant parser or transformer
implementing the abstract API
 JDOM will not be bundled with Merlin
55
JAXP Programming – SAX and DOM
Document
DTD
Parser
startDocument
startElement
startElement
Application
implements
DocumentHandler
endElement
endElement
endDocument
Document Tree
1
56
The Document Object Model
XML Document
Structure
<?xml version="1.0"?>
<books>
<book>
<title>The XML Handbook</title>
<author>Goldfarb</author>
<author>Prescod</author>
<publisher>Prentice Hall</publisher>
<pages>688</pages>
<isbn>0130811521</isbn>
<price currency="USD">44.95</price>
</book>
<book>
<title>XML Design</title>
<author>Spencer</author>
<publisher>Wrox Press</publisher>
...
</book>
</books>
books
book
title
The XML
Handbook
author
Goldfarb
Prescod
publisher
Prentice
Hall
pages
655
isbn
...
1
57
The Document Object Model
 Provides a standard interface for access to and manipulation of
XML structures.




Represents documents in the form of a hierarchy of nodes.
Is platform- and programming-language-neutral
Is a recommendation of the W3C (October 1, 1998)
Is implemented by many parsers
58
DOM - Structure Model
Document
books
book
book
Node
title
author
publisher
pages
isbn
Element
The XML
Handbook
Goldfarb
Prescod
Prentice
Hall
655
...
NodeList
1
59
DOM Methods for Navigation
parentNode
previousSibling
nextSibling
firstChild
lastChild
childNodes
(length, item())
getElementsByTagName
60
DOM Methods for Manipulation
createElement
createAttribute
createTextNode
appendChild
insertBefore
replaceChild
removeChild
61
SAX - Simple API for XML
Document
DTD
Parser
startDocument
startElement
Application
implements
DocumentHandler
startElement
endElement
endElement
endDocument
1
62
SAX - Simple API for XML





Event-driven parsing model
"Don't call SAX, the parser calls you."
Developed by the members of the XML-DEV Mailing List
Released on May 11, 1998
Supported by many parsers and now made official by Sun
63
DOM and SAX Design Patterns
 DOM
 Creating a parser instance
 Parsing the whole document
 Processing the DOM tree
 SAX
 Creating a parser instance
 Registrating event handlers with the parser
 Parser calls the event handler during parsing
64
“Data Binding” – Alternative to SAX or DOM
 Uses XML DTD or Schema to generate code that automatically
handles data conforming to those constraints
 Supported by numerous tools
 Optimal for simple “data” formats – insulates programmers from
XML syntax
 Doesn’t work well for “document” formats with recursive
elements, mixed content, etc.
1
65
JAXB
 Starts with an XML Schema
 Generates Java classes automatically that
 Parse
 Load
 Validate data corresponding to the schema.
 Code formerly required to parse XML text into meaningful
objects not required.
 Application focuses on semantics represented by the data, not
the syntax.
66
Other Java APIs for XML
 JDOM
 Originally independent effort, now JCP activity
 DOM is generic, JDOM is Java-specific
 DOM defines interfaces, JDOM classes
 Main focus is on convenience for user
 dom4j
 Main focus is on lightweight implementation
 Defines interfaces, not classes
 Supports more W3C specs (XPath, XSD)
67
Agenda
 XML Uses and Case Studies
 XSL
 Java and XML
 Native vs. XML-Enabled
 Software AG’s Tamino
 Accessing Tamino
 Summary
68
What is an XML Server ?
a server offering services to
store, manage, publish and exchange
XML documents
69
The Need For A Complete XML Platform
Core
Transaction
Systems
EJB/COM+ /
CORBA
Message
Middleware
Machines
Humans
Web Server
Web-Based XML Applications
Remote
applications
SQL
RDBMS
XML to App
Mapping
XML to SQL
Mapping
Native
XML Database
70
Tamino – The XML Server
Core
Transaction
Systems
Machines
Humans
Web Server
X-Application / XML Tools
Remote
applications
SQL
DBMS
X-Tension
X-Node
Tamino
Database
71
Native XML Database Requirements
 XML Storage Model
Physically store data compatible with XML structure
 XML for Database Definition
Import DTD or Schema to define the database structure
 Dynamic Format Evolution
Easy to change database structure as schema evolves
 XPath for Queries
XPath supported as XML Query Language
 DOM API Support
DOM API for data access and manipulation
 Standards Based
Adherence to all applicable standards
72
Native XML vs. XML-Enabled RDBMS
 Ease of use and setup with no “hidden costs”
 Advanced query and indexing capabilities
 Boolean and relational operators vs. no boolean or predicate




expressions
 Full XPath support with Structure Indexing vs. limited XPath
with text indexing only; no structure indexing
 XQuery support
Performance
Fully supports Unicode
Support for recursive schemas
Stylesheet transformations within native platform
73
Native XML vs. XML-Enabled RDBMS
 Few RDBMS’s have support for XML standards like XPath or
XML Schema
 Normalizing data is expensive and cannot handle very
complex structures
 Data structure and content integrity
 Overhead of continuous bi-directional data formatting
 The XML mapping information is stored externally potential integrity exposure
 Performance – Tamino is as much as 50X faster than
leading RDBMS’s in recent 3rd party benchmarks
74
Benefits of implementing Native XML
 Speed
 Rapid development
 Easy learning curve
 Flexibility
 Minimal Risk – Architecturally & Technically
 Better position to respond to external challenges
 Efficiency
 Leverages existing applications and infrastructure
 Reduces Total Cost of Ownership
Agenda
 XML Uses and Case Studies
 XSL
 Java and XML
 Native vs. XML-Enabled
 Software AG’s Tamino
 Accessing Tamino
 Summary
76
Tamino Business Case
Business Issues and Requirements
 Store, Publish, & Exchange Electronic Documents
 Single Content, Multiple Formats
 Information Exchange
 B2B, EAI, EDI
 Existing Data Integration
 RDBMS
 Legacy Applications
 Other 85% of Data
100 % pure XML
77
Worldwide Market Leader
Other
16.8%
Computer
Associates
International
19.4%
Software AG
40.5%
eXcelon Corp.
23.3%
Worldwide XML and Virtual DBMS Market Share
by Vendor, 2000
Source IDC 2001
78
Tamino – Conceptual View
79
Core Services







Storage Service
Query Service
Full-Text Retrieval Service
XML Schema Service
X-Tension Service
Administration Service
Security Service
80
Enabling Services












HTTP Service
API Services / EJB Service
External Database Service
Interactive Service
Application Framework Service
Tamino WebDAV Service
UDDI Service
Mobile Synchronization Service
Integration with EntireX Service
Repository Service
Transformation Service
XForms Service
81
Architecture
The Complete XML Platform for Electronic Business
82
Software AG Solution – Tamino
•
•
•
•
Lotus Notes
NT
Unix
Linux
MS SQL
Server
• COBOL
• CICS
• OS/390
DB2
Oracle
• Internet
• Wireless
Adabas
Natural
• Java
• C++
• VB
83
EntireX Adapters
Adapter Technology
EntireX Orchestrator
Integration Broker
EntireX Communicator
EntireX Workbench
Leveraging EntireX and Tamino
 Integration Services
 Tamino server extensions
(written in Java, VB, or C++)
can hook into EntireX
 Open Interfaces to Enterprise
Communication Broker
Applications
 Standardized Adapters for
Enterprise Resources
Services
Services
Services
 Standardized Business
Services (Web Services)
Tamino XML Server
84
EntireX Orchestrator
Web
Applications
CRM
ERP
Legacy
Database
Middleware
WebSphere
WebLogic
BroadVision
Siebel
Vantive
Clarify
SAP
PoeopleSoft
JDEdwards
Oracle
CICS, IMS,
3270, 5250
COBOL
Natural
VSAM
File, Program
DB2, Oracle
Sybase
Informix
SQL Server
Adabas
MQSeries
Socket
COM*
CORBA*
Adapter
Adapter
Adapter
Adapter
Adapter
Adapter
Transformation
Repository
Integration
Routing
Rules
Management
* via EntireX Communicator
85
Agenda
 XML Uses and Case Studies
 XSL
 Java and XML
 Native vs. XML-Enabled
 Software AG’s Tamino
 Accessing Tamino
 Summary
86
DOM API Implementations





Active X C++ and VB
Java
Java Script (Interactive Interface)
Perl
C
87
Tamino DOM API Architecture
Application
Bolero, Natural,Visual Basic, IE5, C++
Active X
Language Layer
DOM Layer
HTTP Layer
Java
Script
Microsoft.XMLDOM
Microsoft.XMLHTTP
Perl
XML::DOM
LWP
Java
DOM Docuverse
Java HTTP API
88
Java API Architecture Overview
Client
Object Model
Connection
DOM
Accessor
JDOM
SAX
Response
Stream Meta-Data Non-XML XML
Info Content
Query Content
Command Invocation
XTS (Future)
HTTP
Tamino
89
Transaction Management
Enterprise
Java
Bean
query / insert /
update / delete
commit/rollback
DataSource/
Driver
(4)
commit/rollback
register
(6)
(8)
Tamino EJB
API
Tamino API Wrapper
(1) begin
JTA
(5)
(2) newConnection()
JNDI
(3) lookup()
commit/rollback
(9)
Tamino API
commit/rollback
(7)
JTS
(10)
commit/rollback
Tamino
Server
90
DOM API
 All implementations have the same functionality
 Supports transactionality
 start session, stop session
 rollback and commit
 Basis functionality
 define, undefine Schema, XML load
 insert, delete, update
 query
91
DOM API
 Advanced functions
 insert before, append child*
 remove-, replace child*
 first, next, last and previous Result Set
 get / set NonXml
 Diagnose functions
 echo, ping
*Only available with ISAPI Filter Server Side Update
92
Java API Architecture
 Extensibility
 Conform to new functionality without having to touch given functionality
 Provide means so that the API client can add functionality as well
 Flexibility
 Client accesses Tamino in the way it wants (Stream, DOM, JDOM etc.)
 Client defines Parser (SAX, DOM) that should be used
 High level object models for access are plugged in (DOM, JDOM, etc.)
 Robustness
 API provides well defined exception handling
 API has to be robust against communication or server problems
 API is robust against functional extensions
93
Component Interfaces: Services
TXPath
TXMLStreamAccessor
TXMLObjectAccessor
TNonXMLObjectAccessor
TXMLMetaDataAccessor
Accessor
TXMLObject
ObjectModel
Connection
TNonXMLObject
TLocalTransaction
TConnectionFactory
TXMLObjectIterator
TConnection
TNonXMLObjectIterator
Response
TResponseInfoContent
TResponseQueryContent
TResponse
94
General Use Case
 Establish Connection
 Obtain concrete Accessor from Connection
 Use the Connection to set the Local Transaction Mode
 Invoke an access operation on the Accessor
 Obtain the Response
 Commit/Rollback the operation
 Use the Connection to set the Auto Commit Mode
 Process the Response
95
Coding Example: Javascript
var client=new TaminoClient(databaseURL+'/ino:collection',0);
var result= client.query("ino:collection");
var nodes;
if (result && (nodes=result.nodes())) {
for (var i = 0;i< nodes.length;i++) {
:
}
:
}
96
Coding Examples: JavaScript GET Method
<HTML>
<HEAD></HEAD>
<BODY>
<B>HTTP Headers:</B><BR>
<DIV ID="header"></DIV>
<P><B>Tamino Response:</B><BR>
<DIV ID="response"></DIV>
<script language="JScript">
var method = "GET";
// In all upper case letters
var url
= http://localhost/tamino/xml/sailing?_xql=/yacht ;
var data
= null;
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open(method,url,false);
xmlhttp.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded; charset=utf-8");
xmlhttp.send(data);
header.innerText = "HTTP-Status: " + xmlhttp.status + "
" +
xmlhttp.statusText + "\n\n" + xmlhttp.getAllResponseHeaders();
response.innerText = xmlhttp.responseText;
</script>
</BODY>
</HTML>
Coding Examples: XML Data Islands and asp
<XML
ID="xmlDoc"
SRC="http://.../xml/sailing?_xql=/yacht">
</XML>
With MSIE 5 XML Data Islands
Var xmlDoc;
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoc.load
("http://.../xml/sailing?_xql=/yacht");
With the MS XMLDOM ActiveX Object
Jscript Example – MSXMLDOM
<html><head><title>Tamino Example</title></head>
<body>
<script language="JScript">
var xmlDoc, inoReturnValue, inoMessageLine;
var url = "http://www.ebiz1.com/tamino/xml/sailing";
var query = "_xql=yacht[name='AQUIVA']";
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoc.load(url + "?" + query);
inoReturnValue = xmlDoc.documentElement.
getElementsByTagName("ino:message").
item(0).getAttribute("ino:returnvalue");
document.writeln("Tamino Return Value: " + inoReturnValue);
</script>
</body>
</html>
99
JScript API – Tamino DOM
<html><head><title>All Yachts</title>
<script src="TaminoLib.js"></script></head>
<body> <div id="space"><div>
<script>
var myDatabase="http://localhost/tamino/xml/sailing";
var myQuery="/yacht";
var client = new TaminoClient(myDatabase);
client.pageSize = 0;
var result= client.query(myQuery);
if (result.errorNo == "0") {
var xqlResult=result.getResult();
if (xqlResult) {
var yachts = xqlResult.childNodes;
for (i=0;i<yachts.length;i++)
{ var yacht = yachts.item(i);
document.write("Name
: " + yacht.getElementsByTagName("name")
.item(0).childNodes.item(0).data + "<BR>");
document.write("Type
: " + yacht.getElementsByTagName("type")
.item(0).childNodes.item(0).data + "<P>");
}}
else document.write("No Data Returned"); }
else
document.write("Error = "+result.errorText);
</script>
</body></html>
JScript API - POST
<HTML>
<HEAD></HEAD>
<BODY>
<B>HTTP Headers:</B><BR>
<DIV ID="header"></DIV>
<P><B>Tamino Response:</B><BR>
<DIV ID="response"></DIV>
<script language="JScript">
var method = "POST";
// In all upper case letters
var url
= http://localhost/tamino/xml/sailing ;
var data
= "_xql=/yacht";
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open(method,url,false);
xmlhttp.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded; charset=utf-8");
xmlhttp.send(data);
header.innerText = "HTTP-Status: " + xmlhttp.status + "
" +
xmlhttp.statusText + "\n\n" + xmlhttp.getAllResponseHeaders();
response.innerText = xmlhttp.responseText;
</script>
</BODY>
</HTML>
10
Coding Examples: HTML Form
<FORM ACTION="http://.../tamino/xml/sailing"
METHOD="POST"
ENCTYPE="multipart/form-data">
<INPUT TYPE=TEXT SIZE=64 NAME=_xql(1,16)>
<INPUT TYPE=FILE SIZE=64 NAME=_Process>
<INPUT TYPE=SUBMIT VALUE="Process">
</FORM>
Coding Example: Java HTTP
InoConnection inoConnection = new
InoConnection("http://localhost/tamino/xml/sql");
query = “customer[custnumber=\'" + sqlKey + "\']";
String result1 = inoConnection.xql(query);
int inoidStart = result1.indexOf("ino:id");
int inoidEnd = result1.indexOf("\">", inoidStart) + 1;
inoid = result1.substring(inoidStart,inoidEnd);
.
.
.
String query = “customer[custnumber=\'" + sqlKey + "\']";
result = inoConnection.process(query);
10
Coding Example: Java DOM API
c = new BasicElement(doc,"Fax");
c.appendChild(new BasicText(doc,"06150-896177"));
adresse.appendChild(c);
telephone.appendChild(adresse);
/*
/*
/*
/*
Now the DOM Element telephone is complete
Use method printTree of class TaminoClient to printout the
just created document tree */
TaminoClient.printTree(telephone);
use method insert of class TaminoClient to insert the document
into tamino database , default collection*/
TaminoResult tr= tamino.insert(telephone);
end of transaction */
tamino.commit(false);
10
Coding Example: Java DOM API – Insert XML
...
TConnection connection = TConnectionFactory.newConnection( url , userId , passwd);
TAccessLocation accLoc = new TAccessLocation( collection )
TXMLObjectAccessor xmlObjectAccessor = connection.newXMLObjectAccessor( accLoc , JDOM.getInstance() );
TXMLObject xmlObject = TXMLObject.newInstance( jdomElement , collection , doctype );
LocalTransaction localTransaction = connection.useLocalTransactionMode();
try {
TResponse response = xmlObjectAccessor.insert( xmlObject );
System.out.println( “Response:“ + response );
localTransaction.commit();
}
catch (TInsertException insertException) {
localTransaction.rollback();
System.out.println( “Insert Failure:“ + insertException.getAccessFailureMessage() );
}
finally {
connection.useAutoCommitMode();
}
...
10
Coding Example: EJBConnection
public MyAccountPK ejbCreate(String accountID, String owner, double amount) throws CreateException,
RemoteException
{
try {
this.accountID = accountID; // set local fields representing the persistent state of the database
this.ownerName = owner;
this.balance = amount;
TEJBConnectionFactory tcf = TEJBConnectionFactory.getInstance(); // get connection
TEJBConnection conn = tcf.newConnection("java:comp/env/tamino/accountDS");
TXMLStreamAccessor taminoAccessor = conn.newXMLStreamAccessor(); // get accessor
TXMLObject tXMLObject = TXMLObject.newInstance(
newDoc(accountID, ownerName, mount), “Account”, “Account” );
TInputStream tIn = taminoAccessor.insert(tXMLObject);
conn.close();
return new MyAccountPK(accountID);
}
catch ...
...
10
Coding Examples: Tamino Browse C++
if (m_lpDOMDocument != NULL)
{
// Update XMLStatement
UpdateData(TRUE);
CWaitCursor wait;
lpRet=m_CTaminoX.GetNext (m_lpDOMDocument);
PrintMessage("GetNext");
CheckError();
}
10
Coding Examples: Tamino Modify C++
if (lpDOMElement != NULL)
{
UpdateData (TRUE);
piDOMElement = new IXMLDOMElement;
piDOMElement->AttachDispatch(lpDOMElement);
piDOMNode = new IXMLDOMNode;
piDOMNode->AttachDispatch(lpDOMElement);
vOrt = piDOMElement->getAttribute ("city");
vName = piDOMElement->getAttribute ("name");
vPLZ = piDOMElement->getAttribute ("zip");
PrintMessage("GetInoId");
COleVariant vaInoID = m_CTaminoX.GetInoId(piDOMElement->m_lpDispatch);
CheckError();
}
10
Coding Examples: VB
'Create a late-binding til the TAMINOX
Set TaminoTree = CreateObject("TAMINOX.TaminoX1")
'Initialize the connection to the Tamino
lngError = TaminoTree.Initialize()
'Creates a connection to a DB with a URL
TaminoTree.csDatabaseUrl = "http://localhost/tamino/RealEstate/Property"
'No. of results in a page
TaminoTree.lPageSize = 5
'Creates a Xpath Query
Set trees = TaminoTree.DoQuery("Property[@PropertyReference='CASAN00001']")
'Puts the result from the query in a DOM-tree structure (use locals view to view this)
Set result = TaminoTree.ReturnNodes(trees)
'This is a VERY simple example of getting the data
For Each child In result.Item(0).childNodes
MsgBox child.Text
Next
10
Solution: Key Benefits
 Support of XML Standards
 non-proprietary
 Speed of implementation
 quick ROI
 High availability
 fail-over and load balancing options
 High performance
 robust and fast
 NT to UNIX to OS/390
 multi-platform support
 access to backend systems
11
Summary – Software AG Value Add:
 Providing the leading software platform to enable
companies to
transact business,
integrate applications and
to collaborate over the Internet
 by leveraging XML
11