1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT...

111
1 XML in Reality: Software AG Monday, July 4, 2022 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis A Case Study Analysis

Transcript of 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT...

Page 1: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

1

XML in Reality:

Software AG Friday, April 21, 2023

“The XML Company” Steve Hamby

IT Architect

404-441-4498

A Case Study AnalysisA Case Study Analysis

Page 2: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

2

Agenda

XML Uses and Case Studies

XSL

Java and XML

Native vs. XML-Enabled

Software AG’s Tamino

Accessing Tamino

Summary

Page 3: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

3

providing the leading software platform to enable companies to transactbusiness, integrate applications and to collaborate over the internet by

leveraging XML.

Page 4: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

4

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

Page 5: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

5

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

Page 6: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

6

XML: Separation of Document Components

TextText

PicturesPictures

ContentContent

ABCABC

PresentationPresentationStructureStructure

Page 7: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

7

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>

Page 8: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

8

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>

Page 9: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

9

XML Uses – XML Importance

Document / Content Management

Internet and Wireless

Portals

Application Integration

Publishing

Data Exchange

Electronic Business

Page 10: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

10

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

Page 11: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

11

memIQ

Offers personal internet serviceLegal documents, Bank statements, Tax receipts, etcDelivers documents electronically via powerful query GUIStrong 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

Page 12: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

12

memIQ

Page 13: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

13

Lear

Lear is the fifth largest supplier of vehicle parts and the largest supplier Lear is the fifth largest supplier of vehicle parts and the largest supplier of car seats and car seat safety equipmentof car seats and car seat safety equipment

Page 14: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

14

Lear

Record

Archive

Manage:

Manufacturing

Testing

Assembly Data for Car Seats Which Include:Texts

Statistics

Diagrams

Images

Page 15: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

15

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

Page 16: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

16

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!

Page 17: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

17

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

Page 18: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

18

Trusted Content Alliance

E-Government Portal

E-Form

Tamino

X_________

a 14:40.102 08-08-2001

DigitalSignature

Timestamp

Repository

Workflow

EntireXIntegration

Dept Dept DeptDept Dept Dept

Page 19: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

19

XML Uses – Internet and Wireless

HTML Maintenance

Personalization

WML

VoiceXML

Web Content Sources

Reuse

Page 20: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

20

DaimlerChrysler FleetBoard

Existing customer system

Links the existing customer system via XML

Browser

WAP

The access via browser enables each registered users to access relevant data.

All information is attainable via WAP independent of location. (mobile phone)

Internet

Logistical information loaded to Tamino for access from WAP client

Page 21: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

21

XML Uses – Portals

Content Source – Disparate Systems Personalization Wireless Access Security Categorization Search Complex Links Reuse Across Enterprise, Intranet, and Extranet

Page 22: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

22

Content Management – European Parliament

Challenge : Management of Tons of legislative documents11 .. soon15 languagesShort delivery timeframesReuse of existing information

Problem : Gathering existing Information into 1 document Spread in multiple locations / DBsContent changing continuously “Not easily reusable because hierarchies are stored in

RDBMSs”

Page 23: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

23

Content Management – European Parliament

PV ReportPV ReportPV ReportPV Report XQuery

Java XML

XQuery

HTML

WAP

RTF

PDF

Email

XML

DB

Page 24: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

24

Corechange Portal

Access to other systems

Solution that would work across multiple platforms

Access from multiple devices

Better management of metadata

Security of content

Page 25: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

25

WebBrowser

B2BApplication

Mobile/Ubiquitous

DesktopViewer

Content Management and Presentation Services

Personalization Content WorkflowProfiling CategorizationDynamic Publishing SubscriptionPortal Services

Security SearchSystems Management CategorizationTransaction Management Globalization

Portal SystemsManagement

Metadata& ContentRepository

Unstructured Data ERPCRM Mainframe Data

Corechange Portal

Page 26: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

26

Aylesbury Vale District CouncilLocal 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

Page 27: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

27

XML Uses – Application Integration

EAI “Adapters”

Web Services

XML-based Applications

Peer-To-Peer Collaboration

XML “Log“

audit trail

what is being used

Page 28: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

28

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

Examples

Credit card validation

Hotel reservation

Credit checkBuyer

Internet

B2B Hub

Supplier

ACMESupplies

Get Q

uo

teR

ese

rvatio

n P

urc

ha

seO

rde

r

XML

Page 29: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

29

California State Board Of EqualizationEnables 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

Page 30: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

30

XML Uses – Publishing

Electronic Forms

Many Formats

XSL:FO

Page 31: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

31

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

Page 32: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

32

MCI WorldComm Tamino

• Internet

• Wireless• Voice (future)

AdabasNatural

JavaFront-endApplicationDevelopedIn Bolero

Page 33: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

33

XML Uses – Data Exchange

Extensible - Easy Maintenance

Routing Rules as XML Metadata

Exchange Different Formats

Access to Data

Audit Trail

Page 34: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

34

About Leeds & Holbeck

Leeds & Holbeck Building Society

Leeds & Holbeck Building Society

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.

Page 35: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

35

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.

Page 36: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

36

Features of the solution:

Exploits existing investment

Delivers new channels for customers

Establishes a platform for growth

Page 37: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

37

Mortgage Processing Requirements

Deploy a system over the Internet

Quoteon different types of mortgages

Provide a “mortgage decision over the Internet”

Page 38: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

38

XML Based Approach

Oracle

MTS

VBVB VB

Browser Digital TV PDAs / Mobiles

XML

Intermediaries

AssureWeb

OtherPortals

MISYS

Customer

Search Engines/Agents

IFA

HTML WML

e-Branch

The way customers locate information has changed

Need a more flexible extensible approach

Need to interact with customers and other organizations in different ways

Need to transform data to the appropriate display.

Page 39: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

39

XML Uses – Electronic Business

CMS, eCatalogs, and Publishing

Data Integration and Exchange

Search

Internet and Wireless

Ease of maintenance

Page 40: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

40

Customer

1. selects articles2. enters customer information

3. checks availability

4. authorization inquiry

7. order confirmation by E-mail

5. orders articles

6. credit card charge

8. invoicing information

9. invoice

Südkraft shipping, storage

credit card payment system

BOCinvoices,refunds

Order transaction

Page 41: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

41

Agenda

XML Uses and Case Studies

XSL

Java and XML

Native vs. XML-Enabled

Software AG’s Tamino

Accessing Tamino

Summary

Page 42: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

42

XSL

eXtensible Stylesheet Language

Consists of:

Transformation (XSLT)

Formatting Objects (XSL:FO)

Processing oriented

Either linked or called

Page 43: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

Anatomy of an XSL Style Sheets

XSL Style Sheet

XML Tree

<xsl:template match="pattern">

</xsl:template>

<xsl:template match="pattern">

</xsl:template>

1. Pattern matching

HTML Tagsmore Style Sheet processing

2. Formatting

Page 44: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

XSL Syntax

<xsl:apply-templates> Process children of current node

<xsl:apply-templates select=".."> Process specified nodes

<xsl:for-each select=".."> Iterative processing

<xsl:if test="expression"> Conditional processing

<xsl:choose> Decide structure

<xsl:when test="expr"> Element of Decide structure

<xsl:otherwise> "else" processing

<xsl:sort> Process child nodes in sorted order

<xsl:value-of select=".."> Insert text

Page 45: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

Style Sheet Processing

XML

XSL Style Sheet

Style SheetProcessor

HTML Page

Page 46: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

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: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>

Page 47: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

47

XSL as Part of an XML Application

DTD

HTMLPage

Style Sheet Processor

StyleSheet

Document Tree

Application

<?xml?><weather-report> <date>September 10, 1999</date> <time>08:00 </time> <area> <city>Darmstadt</city> <temperature scale=“C”>25</temperature>

Parser

Page 48: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

48

XSL:FO

2nd part of XSL

XML application

Describes how XML will look

Defines four basic area types

1. regions

2. block areas

3. line areas

4. inline areas

Page 49: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

49

XSL:FO Formatting Objects

fo:basic-link fo:bidi-override fo:block fo:block-container fo:character fo:color-profile fo:conditional-page-master-

reference 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:repeatable-page-master-alternatives

fo:repeatable-page-master-reference

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

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-bodyfo:region-end fo:region-start

Page 50: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

50

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>

Page 51: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

51

Agenda

XML Uses and Case Studies

XSL

Java and XML

Native vs. XML-Enabled

Software AG’s Tamino

Accessing Tamino

Summary

Page 52: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

52

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

Page 53: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

53

Java and XML – Similarities

Designed for the Internet

Simplicity

Portability

Flexibility

Open development process

Page 54: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

54

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

Page 55: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

55

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

Page 56: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

561

Document Tree

JAXP Programming – SAX and DOM

Parser

Docu-ment DTD

Applicationimplements

DocumentHandler

endDocument

startDocument

endElement

endElement

startElement

startElement

DOM SAX

Page 57: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

571

Prescod

PrenticeHall

<?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>

The Document Object Model

XML DocumentStructure

The XMLHandbook Goldfarb 655

books

book

publisher pages isbnauthortitle

...

Page 58: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

58

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

Page 59: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

591

DOM - Structure Model

Document

Node

NodeList

Element

Prescod

book

PrenticeHall

The XMLHandbook Goldfarb 655

books

book

publisher pages isbnauthortitle

...

Page 60: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

60

DOM Methods for Navigation

firstChild lastChild

nextSiblingpreviousSibling

parentNode

getElementsByTagNamechildNodes

(length, item())

Page 61: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

61

DOM Methods for Manipulation

appendChildinsertBeforereplaceChildremoveChild

createElementcreateAttributecreateTextNode

Page 62: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

621

SAX - Simple API for XML

Docu-ment DTD

Applicationimplements

DocumentHandler

endDocument

startDocument

endElement

endElement

startElement

startElement

Parser

Page 63: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

63

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

Page 64: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

64

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

Page 65: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

651

“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.

Page 66: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

66

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.

Page 67: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

67

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)

Page 68: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

68

Agenda

XML Uses and Case Studies

XSL

Java and XML

Native vs. XML-Enabled

Software AG’s Tamino

Accessing Tamino

Summary

Page 69: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

69

What is an XML Server ?

a server offering services to

store, manage, publish and exchange

XML documents

Page 70: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

70

EJB/COM+ / CORBA

Message Middleware

The Need For A Complete XML Platform

SQLRDBMS

Remote applications

NativeXML DatabaseXML to SQL

Mapping

XML to AppMapping

Web-Based XML Applications

Web Server

Machines Humans

Core Transaction

Systems

Page 71: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

71

Tamino – The XML Server

Tamino Database

X-Node

X-Tension

X-Application / XML Tools

Web Server

Machines Humans

SQLDBMS

Remote applications

Core Transaction

Systems

Page 72: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

72

Native XML Database Requirements

XML Storage ModelPhysically store data compatible with XML structure

XML for Database DefinitionImport DTD or Schema to define the database structure

Dynamic Format EvolutionEasy to change database structure as schema evolves

XPath for QueriesXPath supported as XML Query Language

DOM API SupportDOM API for data access and manipulation

Standards BasedAdherence to all applicable standards

Page 73: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

73

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

Page 74: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

74

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

Page 75: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

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

Page 76: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

76

Agenda

XML Uses and Case Studies

XSL

Java and XML

Native vs. XML-Enabled

Software AG’s Tamino

Accessing Tamino

Summary

Page 77: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

77

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

Page 78: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

78

Worldwide Market Leader

16.8%

40.5%

23.3%

19.4%

Other

Software AG

eXcelon Corp.

ComputerAssociates

International

Source IDC 2001

Worldwide XML and Virtual DBMS Market Shareby Vendor, 2000

Page 79: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

79

Tamino – Conceptual View

Page 80: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

80

Core Services

Storage Service Query Service Full-Text Retrieval Service XML Schema Service X-Tension Service Administration Service Security Service

Page 81: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

81

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

Page 82: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

82

Architecture

The Complete XML Platform for Electronic Business

Page 83: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

83

Software AG Solution – Tamino

Oracle

• Internet• Wireless

AdabasNatural

• COBOL• CICS• OS/390

DB2MS SQLServer

• Lotus Notes• NT• Unix• Linux

• Java• C++• VB

Page 84: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

84

EntireX CommunicatorCommunication Broker

EntireX OrchestratorIntegration Broker

EntireX AdaptersAdapter Technology

Entir

eX W

orkb

ench

Leveraging EntireX and Tamino

Integration Services

Tamino server extensions (written in Java, VB, or C++) can hook into EntireX

Open Interfaces to Enterprise Applications

Standardized Adapters for Enterprise Resources

Standardized Business Services (Web Services)

Tamino XML Server

Services Services Services

Page 85: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

85

EntireX Orchestrator

TransformationTransformation

RoutingRouting

RulesRules

Web Applications

Web Applications CRMCRM ERPERP LegacyLegacy DatabaseDatabase MiddlewareMiddleware

Repository

AdapterAdapter AdapterAdapter AdapterAdapter AdapterAdapter AdapterAdapter AdapterAdapter

Management

Integration

* via EntireX Communicator

WebSphereWebLogic

BroadVision

WebSphereWebLogic

BroadVision

SiebelVantiveClarify

SiebelVantiveClarify

SAPPoeopleSoftJDEdwards

Oracle

SAPPoeopleSoftJDEdwards

Oracle

CICS, IMS, 3270, 5250

COBOL NaturalVSAM

File, Program

CICS, IMS, 3270, 5250

COBOL NaturalVSAM

File, Program

DB2, OracleSybaseInformix

SQL ServerAdabas

DB2, OracleSybaseInformix

SQL ServerAdabas

MQSeriesSocketCOM*

CORBA*

MQSeriesSocketCOM*

CORBA*

Page 86: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

86

Agenda

XML Uses and Case Studies

XSL

Java and XML

Native vs. XML-Enabled

Software AG’s Tamino

Accessing Tamino

Summary

Page 87: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

87

DOM API Implementations

Active X C++ and VB

Java

Java Script (Interactive Interface)

Perl

C

Page 88: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

88

Tamino DOM API Architecture

Java HTTP APIMicrosoft.XMLHTTP LWPHTTP Layer

DOM DocuverseMicrosoft.XMLDOM XML::DOMDOM Layer

Java

Java Script

Active X Perl

Language Layer

Bolero, Natural,Visual Basic, IE5, C++Application

Page 89: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

89

Java API Architecture Overview

Command Invocation

Connection AccessorDOM SAXJDOM

Info Content Query ContentStream Meta-Data Non-XML XML

Object ModelObject Model

Response

Client

Tamino

HTTP XTS (Future)

Page 90: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

90

Transaction Management

JTS

JTA

JNDIT

am

ino

EJ

B

AP

I

Tamino API

TaminoServer

EnterpriseJavaBean

DataSource/ Driver

Tamino API Wrapper(1) begin

newConnection()(2)

lookup()(3)

reg

iste

r

(4)

query / insert /update / delete

(5)

commit/rollback(6)

commit/rollback

(7)

com

mit/

rollb

ack

(8)commit/rollback (9)

(10)commit/rollback

Page 91: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

91

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

Page 92: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

92

DOM API

Advanced functions

insert before, append child* remove-, replace child* *Only available with ISAPI Filter Server Side Update

first, next, last and previous Result Set

get / set NonXml

Diagnose functions

echo, ping

Page 93: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

93

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

Page 94: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

94

Component Interfaces: Services

TConnection

TLocalTransaction

Connection

TConnectionFactory

TXPath

TXMLMetaDataAccessorTNonXMLObjectAccessor

TXMLObjectAccessorTXMLStreamAccessor

Accessor TXMLObjectIteratorTXMLObject

TNonXMLObject TNonXMLObjectIterator

ObjectModel

TResponseQueryContent

TResponse

Response

TResponseInfoContent

Page 95: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

95

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

Page 96: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

96

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++) { : }: }

Page 97: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

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>

<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>

Page 98: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

Coding Examples: XML Data Islands and asp

<XML ID="xmlDoc" SRC="http://.../xml/sailing?_xql=/yacht">

</XML>

<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");

Var xmlDoc;xmlDoc = new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async = false;xmlDoc.load

("http://.../xml/sailing?_xql=/yacht");

With the MS XMLDOM ActiveX Object

Page 99: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

99

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>

<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>

Page 100: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

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>

<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>

Page 101: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

101

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>

<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>

Page 102: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

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>

<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>

Page 103: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

103

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);

Page 104: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

104

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);

Page 105: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

105

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();

}

...

Page 106: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

106

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 databasethis.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 accessorTXMLObject tXMLObject = TXMLObject.newInstance(

newDoc(accountID, ownerName, mount), “Account”, “Account” ); TInputStream tIn = taminoAccessor.insert(tXMLObject);conn.close();return new MyAccountPK(accountID);}

catch ......

Page 107: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

107

Coding Examples: Tamino Browse C++

if (m_lpDOMDocument != NULL)if (m_lpDOMDocument != NULL){{

// Update XMLStatement// Update XMLStatementUpdateData(TRUE);UpdateData(TRUE);CWaitCursor wait; CWaitCursor wait;

lpRet=m_CTaminoX.GetNext (m_lpDOMDocument);lpRet=m_CTaminoX.GetNext (m_lpDOMDocument);PrintMessage("GetNext");PrintMessage("GetNext");CheckError();CheckError();

}}

Page 108: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

108

Coding Examples: Tamino Modify C++Coding Examples: Tamino Modify C++

if (lpDOMElement != NULL)if (lpDOMElement != NULL) { { UpdateData (TRUE); UpdateData (TRUE);

piDOMElement = new IXMLDOMElement; piDOMElement = new IXMLDOMElement; piDOMElement->AttachDispatch(lpDOMElement); piDOMElement->AttachDispatch(lpDOMElement); piDOMNode = new IXMLDOMNode; piDOMNode = new IXMLDOMNode; piDOMNode->AttachDispatch(lpDOMElement); piDOMNode->AttachDispatch(lpDOMElement); vOrt = piDOMElement->getAttribute ("city"); vOrt = piDOMElement->getAttribute ("city"); vName = piDOMElement->getAttribute ("name"); vName = piDOMElement->getAttribute ("name"); vPLZ = piDOMElement->getAttribute ("zip"); vPLZ = piDOMElement->getAttribute ("zip");

PrintMessage("GetInoId");PrintMessage("GetInoId"); COleVariant vaInoID = m_CTaminoX.GetInoId(piDOMElement->m_lpDispatch); COleVariant vaInoID = m_CTaminoX.GetInoId(piDOMElement->m_lpDispatch);

CheckError();CheckError(); }}

Page 109: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

109

Coding Examples: VB

'Create a late-binding til the TAMINOX 'Create a late-binding til the TAMINOX Set TaminoTree = CreateObject("TAMINOX.TaminoX1") Set TaminoTree = CreateObject("TAMINOX.TaminoX1")

'Initialize the connection to the Tamino 'Initialize the connection to the Tamino lngError = TaminoTree.Initialize() lngError = TaminoTree.Initialize() 'Creates a connection to a DB with a URL 'Creates a connection to a DB with a URL TaminoTree.csDatabaseUrl = "http://localhost/tamino/RealEstate/Property" TaminoTree.csDatabaseUrl = "http://localhost/tamino/RealEstate/Property"

'No. of results in a page 'No. of results in a page TaminoTree.lPageSize = 5 TaminoTree.lPageSize = 5

'Creates a Xpath Query 'Creates a Xpath Query Set trees = TaminoTree.DoQuery("Property[@PropertyReference='CASAN00001']") Set trees = TaminoTree.DoQuery("Property[@PropertyReference='CASAN00001']")

'Puts the result from the query in a DOM-tree structure (use locals view to view this) 'Puts the result from the query in a DOM-tree structure (use locals view to view this) Set result = TaminoTree.ReturnNodes(trees) Set result = TaminoTree.ReturnNodes(trees) 'This is a VERY simple example of getting the data 'This is a VERY simple example of getting the data For Each child In result.Item(0).childNodes For Each child In result.Item(0).childNodes MsgBox child.Text MsgBox child.Text Next Next

Page 110: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

110

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

Page 111: 1 XML in Reality: Software AG Thursday, January 07, 2016 “The XML Company” Steve Hamby IT Architect 404-441-4498 A Case Study Analysis.

111

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