introduction to xml for soa
DESCRIPTION
Lee H. Burstein, President 2525 Justin Lane Wilmington, DE 19810-2223 302-477-0180. Introduction to XML for SOA. Topics. Introduction Where used Structure What is neeeded Short comings How can we use it. Introduction. Introduction. It’s really e X tensible M arkup L anguage - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/1.jpg)
Another PillowTalk Presentation2004 Dynamic Systems, Inc.
[email protected]://www.dynamicsys.com
Introduction to XML for SOA
Lee H. Burstein, President
2525 Justin Lane
Wilmington, DE 19810-2223
302-477-0180
![Page 2: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/2.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 2
Topics
Introduction Where used Structure What is neeeded Short comings How can we use it
![Page 3: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/3.jpg)
Another PillowTalk Presentation2004 Dynamic Systems, Inc.
[email protected]://www.dynamicsys.com
Introduction
![Page 4: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/4.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 4
Introduction
It’s really eXtensible Markup Language A set of standards defining a toolkit for describing
data HTML describes how information is displayed Both use tags
XML tags tend to be user defined, must be balanced and is highly structured
Need a Schema or DTD
![Page 5: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/5.jpg)
Another PillowTalk Presentation2004 Dynamic Systems, Inc.
[email protected]://www.dynamicsys.com
Where Used
![Page 6: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/6.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 6
Where Used? US Government
IRS DOD SEC
Compliment/replacement for EDI Healthcare, banks, retail, wholesale RPC
SOAP Web services SOA
Represent multivalue data in a relational database
![Page 7: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/7.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 7
For Example
XBRL eXtensible Business Reporting Language Standard tags for financial reporting
Period, Current Assets, Balance Sheet, etc. www.serence.com, download Klipfolio
Uses XML to define properties FusionWare XML Server
Uses XML to combine data from dissimilar data sources into one web presentation
Oracle, DB2, SQL Server have XML data types
![Page 8: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/8.jpg)
Another PillowTalk Presentation2004 Dynamic Systems, Inc.
[email protected]://www.dynamicsys.com
Structure
![Page 9: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/9.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 9
Structure
Text document containing balanced, nested tags starting with an XML declaration
Tags denote fields and are self describing Tags can have attributes
![Page 10: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/10.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 10
Processing Tag Structure
<? processing instructions ?>Special tag containing
Processing instructions.Begins with <?Ends with ?>
![Page 11: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/11.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 11
Data Tag Structure
<TagName>data</TagName>
Opening tag Element Closing tag
![Page 12: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/12.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 12
Data Tag Structure
<TagName RecKey=12345> <Attr1>data1</Attr1> <Attr2>data2</Attr2>
</TagName>
Attribute
![Page 13: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/13.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 13
XML Declaration Tag
<?xml version="1.0" encoding="ISO-8859-1"?> This identifies the document as XML conforming
to version 1.0 specification Using character encoding for Latin-1
![Page 14: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/14.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 14
XML Data
<?xml version=“1.0” encoding=“ISO-8859-1”?>
<Record ID=123>
<FirstName>Lee</FirstName>
<LastName>Burstein</LastName>
<!--Here comes multivalue data -->
<Phones>
<Phone>3024770180</Phone>
<Phone>3025551212</Phone>
<Phones>
</Record>
MultivalueData
Comment
![Page 15: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/15.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 15
Namespaces
Namespaces can be defined to prevent tag naming conflicts
A tag associated with a namespace helps guarantee its uniqueness
![Page 16: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/16.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 16
Namespaces
<dsi:Customer xmlns:dsi=“http://www.dynamicsys.com/Cust”><dsi:Record ID=1234>
<dsi:FirstName>Lee</dsi:FirstName></dsi:Record>
</dsi:Customer><f:Customer xmlns:f=“http://www.somewhere.com/stuff”>
<f:Record ID=1234><f:FirstName>Sam</f:FirstName>
<f:Record></f:Customer>
![Page 17: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/17.jpg)
Another PillowTalk Presentation2004 Dynamic Systems, Inc.
[email protected]://www.dynamicsys.com
What Is Needed
![Page 18: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/18.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 18
What is needed?
XML describes data only No display information
What is displayed How is it displayed
No validation
![Page 19: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/19.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 19
DTD
Document Type Definition This is the old way of describing and validating
XML Cannot support data types or complex
relationships The DTD is referenced in the XML document
<!DOCTYPE Customer SYSTEM “Cust.dtd”> An error is generated if your XML does not
conform to your DTD
![Page 20: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/20.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 20
XML Schema
W3C recommendation DTD alternative written in XML Validates XML Supports data types Can define data patterns, ranges, defaults More powerful, understandable and flexible that
DTDs Stored in an XSD file
![Page 21: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/21.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 21
XSD Schema
<schema><element name=“Name” type=“string” id=“Name”/><element name=“HireDate” type=“date” id=“HireDate”/>
</schema>
![Page 22: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/22.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 22
XSL
eXtensible Stylesheet Language Stylesheet language (like CSS) for XML You will use a combination of Xpath,
XSLT and XSL-FO to Select the part of the XML document to display Transform it Format it
![Page 23: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/23.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 23
Xpath
Query language for extracting elements from an XML document
Result is dependant upon where you are in the XML document The same syntax could return different results
![Page 24: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/24.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 24
XSLT
eXtensible Stylesheet Language for Transformation
Select the value of one node Select the values of all nodes of the same
name Conditionally select value Sort results
![Page 25: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/25.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 25
XSL-FO
XSL Formatting Objects Defines page layout, regions of a page Output can be a variety of formats
PDF RTF TXT PostScript
![Page 26: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/26.jpg)
Another PillowTalk Presentation2004 Dynamic Systems, Inc.
[email protected]://www.dynamicsys.com
Short Comings
![Page 27: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/27.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 27
Short comings
Remember, this is a standard that continues to evolve
Requires bandwidth Heavyweight protocol There is a lot to put together
![Page 28: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/28.jpg)
Another PillowTalk Presentation2004 Dynamic Systems, Inc.
[email protected]://www.dynamicsys.com
How Can We Use It
![Page 29: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/29.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 29
How can we use it?
Quite easy to write a program to export data in a proper XML structure
Most, if not all, databases have tools to read and write XML data using a XSL or DTD
Relational data bases now have XML data type SOAP Web Services SOA
![Page 30: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/30.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 30
SOAP
Simple Object Access Protocol XML based Can be used for
Messaging systems RPC Distributed processing
Structure is quite specific Cannot use DTD’s
![Page 31: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/31.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 31
Web Services
Uses SOAP, XML (Web Service Description Language), HTTP
An object’s methods are publicly exposed You can use them in your applications You can expose portions of you application
to the world
![Page 32: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/32.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 32
SOA
Service Oriented Architecture Collection of services that communicate with each
other Services are loosely coupled
From different applications On different servers Using different databases
Using XML and Web Services to communicate
![Page 33: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/33.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 33
Can I Do This?
Sure! All multivalue applications can be accessed
via .net All multivalue applications can be accessed via
java All multivalue applications can be accessed via
XML You may need to separate screen I/O from
business logic
![Page 34: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/34.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 34
Why Would I Want To?
You control what discrete portions of your application are available via SOA
Improve customer and vendor communication and access to information
Horizontal parts of your application can be generally available increasing your exposure
Provide On-Demand access to your application
![Page 35: Introduction to XML for SOA](https://reader036.vdocuments.site/reader036/viewer/2022081421/5681510d550346895dbf2c10/html5/thumbnails/35.jpg)
2004 Dynamic Systems, Inc. [email protected]
http://www.dynamicsys.com
Page 35
Resources
www.w3schools.com msdn.microsoft.com/xml www.xml.com www.xmethods.net www.w3.org www.develop.com/xml www.xbrl.org http://webservices.xml.com/pub/a/ws/2003/09/30/soa.html http://www.service-architecture.com/