Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to XML, SOAP and Biztalk M Arie Leeuwesteijn

Similar presentations


Presentation on theme: "Introduction to XML, SOAP and Biztalk M Arie Leeuwesteijn"— Presentation transcript:

1 Introduction to XML, SOAP and Biztalk M Arie Leeuwesteijn ariele@microsoft.com

2 Content  XML use cases  What is XML ?  XML syntax  Document definitions and validation  XML parsers  XSL translations  SOAP, a.k.a. Web Services  Biztalk overview

3 Objectives  Reading XML documents  Understanding XML terminology and acronyms  Examples of XML applications

4 XML Use Cases  Application integration  Generic format for data transfer for E-commerce and other web applications  Storing and accessing structured data

5 Application Integration  High costs and effort because application data is  Proprietary  Incompatible  Undocumented legacy data  Different data formats

6 Same data, different format fifteen XV “15” 1111 15.00   0x0F 0001 0101

7 The Internet  The ultimate integration environment  Many different systems and platforms  Time to market measured in internet time  Today XML is already integrated in  Operating systems  Applications  Databases  Development tools  Browsers  …

8 XML design goals  Flexible, extensible and support for wide variety of applications  Must be simple and light weight  Straightforwardly usable over the internet

9 What is XML?  Meta language for self describing structured data  Consists of data and tags  Extensible language, users can define their own specific tags  Version 1.0 specification approved by W3C as recommendation

10 XML History  Subset of Standard Generalized Markup Language (SGML)  Far less complex  20% of SGML features  80% of SGML functionality  (XML spec is 26 pages, SGML 500+)

11 XML vs. HTML XML  Subset of SGML  Extensible  Focus on data HTML  SGML application  Fixed  Focus on presentation

12 XML Document Structure … <!DOCTYPE name [ … ]> Document data Document definition (optional) (optional) XML declaration (processing instructions) XML declaration (processing instructions)

13 Basic XML syntax  Human “readable” text  Support for Unicode character set  Syntax is stricter than for example HTML

14 Tags And Data  Document consists of data marked up by tags  Tags describe meaning and structure of data  An element is a group of start-tag/end-tag with the data in between Essential XML Essential XML Start-tagEnd-tagData

15 Start- and End-Tags  Element must have a matching start- and end-tag hello world  hello world   Empty elements can be written as    Tags are case sensitive

16 XML Basic Syntax  XML elements can have nested child elements to structure to structure document in levels   text 

17 Root element  A XML document must have one root element:  XML in action Essential XML  XML in action Essential XML XML in action  Essential XML XML in action  Essential XML  What is the document root ?

18 Comments  Syntax for comments is:  Syntax for comments is:  Comments be placed everywhere in the document except inside element tags > 

19 Attributes  Attributes associate named values to an element  Attributes are part of the start-tag XML in action XML in action 49.99 49.99  Values must be double or single quoted

20 XML Example <library><book> XML in action XML in action 49.99 0-7356-0562-9 49.99 0-7356-0562-9 3 3 </book><book> Essentail XML Essentail XML 34.95 0-201-70914-7 34.95 0-201-70914-7 4 4 </book> RootRoot Book element Currency attribute for price element Processing instruction Child elements of Book

21 Valid vs. Well Formed XML  Well formed: Valid XML syntax  Valid document: Content of document valid conform specification of document  A valid document is automatically a well formed document  A well formed document is not always a valid document

22 Document specifications  Describes structure and contents of XML document  Parsers can use schema’s to validate a document  Validation is optional  Think if/where validation should take place  Document Type Definitions (DTD), part of XML 1.0 standard

23 DTD example <!DOCTYPE CATALOG [ <!ELEMENT PRICE(#PCDATA) ]> XML in action 49.95

24 DTD Issues  Good DTD’s are difficult to write (Extended Backus Naur Form notation)  DTD’s are not extensible and many limitations  Most important limitation is lack of data types

25 XML Schemas  Alternative for DTD’s  XML is used to describe the structure of the document, no need to learn new language or use other tools  Lifts most limitations of DTD’s (data types )  XSD,  XML schema specification  W3C recommendation  XDR  Early MS version of XSD

26 </Schema> XML-Data Schemas simple example

27 XML Parsers  Parse XML document  Validate XML syntax (always)  Validate content (optional)  Access data  Update data  Translate data (XSL)

28 XML Parser types Two different parser models  Document Object Model (DOM)  Complete document in memory  Easy access for applications  Queries on data  Translations  Simple API for XML (SAX)  Generates event per parsed element  Large documents  Batch processing  More difficult to use than DOM

29 Document Object Model  DOM defines logical structure of a parsed XML document  DOM defines how data can be accessed and manipulated  Provides standardized API (level 1, 2 and 3)  DOM can also be used to create or modify XML documents

30 Document Object Model document root node node Node lists A node can contain child nodes or text

31 Querying the DOM through XPath  XPath declarative language for locating nodes and fragments in XML trees  Allow you to locate nodes by:  Absolute or relative position  Element or attribute types  Element or attribute values  Combinations using boolean operators  Also used in XSL, XPointer and XLink specifications

32 XPath examples  All books in the current context book (equal to./book)  All books anywhere in the document //book  All books with specified element value book[title=“Essential XML”]  or a specified attribute value book[@type=“paperback”]  or just having the attribute book[@type]  The first 3 books book[index()<4]

33 Extended Stylesheet Language XSL  Similarities with CSS, but more powerful  Applies translations to data that matches a pattern  Close to becoming a standard (draft status W3C)

34 XSL translations  XSLT is based on pattern matching and templates  A template rule consist of a pattern and a template  Processor finds best matching pattern and applies related template for translation

35 XSL stylesheet example … … Essential XML XML in action Essential XML XML in action Essential XML XML in action XML Data XSL style sheet (partial) HTMLoutput + =

36 XSL usage  Formatting and displaying XML data as HTML, PDF, etc.  Converting XML document:  Other XML document structures (XML->XML)  Other data formats (CSV, Edifact)  MS Biztalk mapping editor generate XLS to convert XML, Flat file and Edifact documents to XML and back.

37 XML Applications  XML in real applications  Simple Object Access Protocol  Microsoft Biztalk 2000 Note this is not a training on SOAP and Biztalk

38 Software integration  Today’s middleware  Vendor and language depended COM+ v.s. EJBCOM+ v.s. EJB Interoperability problemsInteroperability problems  Was not designed to use over the internet Reliable communicationsReliable communications FirewallsFirewalls  Complex

39 SOAP  Simple Object Access Protocol  Invoking object methods using XML and HTTP  Specification written by Microsoft, IBM, Software and Developmentor  Vendor and middleware independency (the end of middleware battles ?)  Supported and available today from most major vendors (MS,IBM,IONA etc.)  Core technology in Microsoft.NET web services

40 SOAP Vendor A Vendor B This whole process is transparent for client and component ClientapplicationComponent XML/HTTP2 2.Soap proxy intercepts call and constructs and transmits XML request message Soaplistener3 3.Soap listener receives, parses and validates request 4 4.Listener calls component message 56 5.Listener takes result of call and constructs and transmits XML response 6.Proxy receives and parses response and returns result to client Soapproxy 1 1.Client application makes call

41 Simple SOAP Request POST /StockQuote HTTP/1.1 Host: www.stockquoteserver.com Content-Type: text/xml; charset="utf-8“ Content-Length: 323 SOAPAction: Some-Namespace-URI#GetLastTradePrice MSFT MSFT GetLastTradePrice(“MSFT”) Envelope Body HTTP headers

42 Simple SOAP Response HTTP/1.1 200 OK Content-Type: text/xml; charset="utf-8“ Content-Length: nnnn 160.95 160.95 </SP:Envelope> Result HTTP headers Envelope Body

43 What Is Biztalk ? Biztalk Community (Biztalk.org) Biztalk Community (Biztalk.org) Library for business document specification Library for business document specification Stimulate reuse Stimulate reuse Submit and retrieve document specifications Submit and retrieve document specifications 400+ third-party XML business documents 400+ third-party XML business documents 150+ registered organizations 150+ registered organizations Biztalk Framework Biztalk Framework XML Specification for document routing and exchange (SOAP 1.1 compliant) XML Specification for document routing and exchange (SOAP 1.1 compliant) Biztalk Server Biztalk Server Microsoft server product for processing, transforming, signing, routing of documents Microsoft server product for processing, transforming, signing, routing of documents

44 B2B challenges My company Suppliers Customers

45 Business to Business Different data format (EDI, CSV, XML…) Different data format (EDI, CSV, XML…) Different document structures Different document structures Different protocols Different protocols Different encryption technologies Different encryption technologies Different operating systems Different operating systems Legacy ERP and other back office systems Legacy ERP and other back office systems

46 Design time tools Design time tools Schema, transformation definition Schema, transformation definition Document processing server Document processing server Messaging Messaging Communication Communication Transformation Transformation Routing Routing Encryption Encryption Workflow Workflow Orchestration Orchestration Biztalk Server

47 XSL Engine XSL map XSL Map Biztalk Mapper Parser InternalXMLdoc Serialize Serializer Internal XML doc EDIdocCSVfileXMLdoc Inbound document EDIdocCSVfileXMLdoc Outbound document Doc spec editor Biztalk editor XML in Biztalk

48 VisioDiagram Scheduler XLANG Runtime XLANGschedule Applications BiztalkMessaging Compile

49 XML in Biztalk Server  XML for describing all in- and outbound business documents as an extended Data- Schema  XSL for document translations  XML as internal format for all processed documents  XLANG workflow schedules

50 Biztalk demos  Biztalk Editor Biztalk Editor Biztalk Editor  Biztalk Mapper Biztalk Mapper Biztalk Mapper  Biztalk Orchestration Biztalk Orchestration Biztalk Orchestration

51 Things to read… XML in Action MS-Press ISBN 0735605629 Professional XML WROX ISBN 1861003110 Understanding SOAP SAMS ISBN 0672319225 Essential XML Addison Wesley ISBN 0201709147

52 Places to go…  http://www.w3c.org (all mentioned standards) http://www.w3c.org  http://msdn.microsoft.com/xml (tutorials and reference on xml) http://msdn.microsoft.com/xml  http://msdn.microsoft.com/soap (tutorials and reference on xml) http://msdn.microsoft.com/soap  http://www.biztalk.org http://www.biztalk.org (Biztalk organization)

53 <QUESTIONS/>

54 Biztalk Orchestration

55 Biztalk Editor

56 Biztalk Mapper


Download ppt "Introduction to XML, SOAP and Biztalk M Arie Leeuwesteijn"

Similar presentations


Ads by Google