Скачать презентацию Processing of structured documents Part 5 XML Скачать презентацию Processing of structured documents Part 5 XML

eb43b38a4d4f3db2bbd4a58a7ce81b5e.ppt

  • Количество слайдов: 40

Processing of structured documents Part 5 Processing of structured documents Part 5

XML for data interchange z Simple Object Access Protocol (SOAP) z Biz. Talk (Microsoft) XML for data interchange z Simple Object Access Protocol (SOAP) z Biz. Talk (Microsoft) z eb. XML (UN/CEFACT & OASIS). . . 2

Simple Object Access Protocol (SOAP) z A lightweight protocol for exchange of information in Simple Object Access Protocol (SOAP) z A lightweight protocol for exchange of information in a decentralized, distributed environment z XML-based protocol z submitted to W 3 C in May 2000; latest working drafts Dec 2001 (SOAP 1. 2) z IBM, Lotus, Microsoft, Develop. Mentor, User. Land Software 3

SOAP z Soap consists of three parts: yan envelope: defines a framework for describing SOAP z Soap consists of three parts: yan envelope: defines a framework for describing what is in a message and how to process it ya set of encoding rules for expressing instances of application-defined datatypes ya convention for representing remote procedure calls and responses z SOAP messages may be exhanged using a variety or ”underlying” protocols yusually used together with HTTP (Post) 4

Example: SOAP request <SOAP-ENV: Envelope xmlns: SOAP-ENV=”http: //www. w 3. org/2001. . . ” Example: SOAP request DIS 5

Example: SOAP response <SOAP-ENV: Envelope xmlns: SOAP-ENV=”http: //www. w 3. org. . . ” Example: SOAP response 34. 6 6

SOAP Message Exchange Model z. SOAP messages are fundamentally oneway transmissions between SOAP nodes, SOAP Message Exchange Model z. SOAP messages are fundamentally oneway transmissions between SOAP nodes, from a SOAP sender to a SOAP receiver z. SOAP messages are often combined (by applications) to implement patterns such as request/response y”conversations” 7

SOAP messages za SOAP message contains two SOAP specific subelements within the Envelope y. SOAP messages za SOAP message contains two SOAP specific subelements within the Envelope y. Header and Body ycontents of these subelements are application defined x. SOAP defines (partially) how these elements must be handled 8

SOAP messages za header is optional ythere may be intermediate SOAP nodes along a SOAP messages za header is optional ythere may be intermediate SOAP nodes along a message’s path from a sender to an ultimate receiver ythe intermediate nodes may provide valueadded services using the header information xwithout understanding the body zthe body is the mandatory element within an Envelope ymain information is carried in the body 9

SOAP message exchange z. SOAP is a simple messaging framework for transferring information in SOAP message exchange z. SOAP is a simple messaging framework for transferring information in the form of XML documents between a SOAP sender and receiver zthe scenarios typically involve multiple message exhanges ythe simplest form: request-response pattern 10

SOAP message exchange z. If the exchanged messages conform to a well-defined signature for SOAP message exchange z. If the exchanged messages conform to a well-defined signature for a remote call and its return, the exchange is modeled as Remote Procedure Calls (RPCs) zotherwise the message exchanges can be modeled simply as documents exchanged ysemantics are at the level of sending and receiving applications 11

Remote procedure call z. SOAP specification defines a uniform representation for RPC invocations and Remote procedure call z. SOAP specification defines a uniform representation for RPC invocations and responses ztarget (the procedure to be called) and the parameters have to be given y. RPC is carried as a part of the Body element xmodelled as struct which takes the name of the procedure or method xsubelements represent the parameters 12

Remote procedure call zencoding. Style attribute ytells how the contents (e. g. parameters) have Remote procedure call zencoding. Style attribute ytells how the contents (e. g. parameters) have been serialized y. SOAP specifies particular encoding schemes for various datatypes, but other encoding schemes may be used for application-specific data 13

Remote procedure call z. A transport binding supporting requestresponse pattern can provide the correlation Remote procedure call z. A transport binding supporting requestresponse pattern can provide the correlation between a request and a response (e. g. HTTP) zthe application designer can also put a correlation ID relating a call and its return in a SOAP header ymakes the RPC independent of any underlying transport 14

Apache SOAP implementation z. Apache SOAP is an open-source implementation of the SOAP v Apache SOAP implementation z. Apache SOAP is an open-source implementation of the SOAP v 1. 1 specification in Java z. Apache SOAP can be used yas a client library to invoke SOAP services available elsewhere yas a server-side tool to implement SOAP accessible services 15

Apache SOAP implementation z. As a client library it provides yan API for invoking Apache SOAP implementation z. As a client library it provides yan API for invoking SOAP RPC services and yan API for sending and receiving SOAP messages zas a mechanism to write new RPC accessible services or message accessible services, it expects to be hosted by a servlet container (e. g. Apache Tomcat) 16

Application-specific content z. SOAP is a simple and general framework zthe problem remains, how Application-specific content z. SOAP is a simple and general framework zthe problem remains, how to model the application-specific content? y. Applications/systems should interoperate. . . z(partial) solutions: ysemantics general to many application areas (e. g. E-commerce in general) yvertical schemas (e. g. for retail industry) 17

Biz. Talk Framework z Version 2. 0: Document and Message Specification y. Microsoft, 2000 Biz. Talk Framework z Version 2. 0: Document and Message Specification y. Microsoft, 2000 z provides a set of basic mechanisms required for most B 2 B electronic exchanges z does not prescribe the content or schema of individual business documents z builds upon HTTP, MIME, XML, SOAP 18

Biz. Talk concepts z Biztalk Framework Compliant (BFC) server yrepresented by the set of Biz. Talk concepts z Biztalk Framework Compliant (BFC) server yrepresented by the set of services providing the message-processing functionality defined in the Biz. Talk specifications z Application ya line-of -business system where the business data or logic are stored and executed yalso includes any additional adapters that may be required to input or output Business Documents (see below) and communicate with a BFC server 19

Biz. Talk concepts z Business Document ya well-formed XML document containing businesstransaction data (purchase Biz. Talk concepts z Business Document ya well-formed XML document containing businesstransaction data (purchase order, invoice, sales forecast…) z Biz. Talk Document ya SOAP message in which the body of the message contains the Business Documents, and the header contains Biz. Talk-specific header entries for enhanced message-handling semantics 20

Biz. Talk concepts z Schema ydescribes the content and structure of a class of Biz. Talk concepts z Schema ydescribes the content and structure of a class of XML documents, in particular for a class of Business Documents yis used by application developers to create systems that process corresponding Business Documents, or by parsers that validate Business Document’s conformance to the Schema at run time 21

Biz. Talk concepts z Biz. Tags ythe set of XML tags that are used Biz. Talk concepts z Biz. Tags ythe set of XML tags that are used to specify Business Documents handling (SOAP header entries) z Biz. Talk message ythe unit of wire-level interchange yare used to send Biz. Talk Documents and any related files ymust always contain a primary Biz. Talk Document that defines the semantics of the Message 22

Example: document structure <SOAP-ENV: Envelope> <SOAP-ENV: Header> <dlv: delivery SOAP-ENV: must. Understand=”true”> <dlv: to> Example: document structure Book Order Department Booklovers Anonymous … continues 23

Example: document structure <prop: properties SOAP-ENV: must. Understand=”true”> <prop: identity>uuid: 74 b 9…</prop: identity> Example: document structure uuid: 74 b 9… 2000 -05 -14 T 03: 00+08: 00 2000 -05 -15 T 04: 00+08 http: //electroniccommerce. org/purchase_order/ … continues 24

Example: document structure </SOAP-ENV: Header> <SOAP-ENV: Body> <po: Purchase. Order> <po: Title>Essential Biz. Talk</po: Example: document structure Essential Biz. Talk 25

In the example: z An application-specific Business Document (a book purchase order), carried in In the example: z An application-specific Business Document (a book purchase order), carried in the body of a SOAP message z Biz. Talk-specific and SOAP header entries, constructed using Biz. Tags 26

Biz. Tags z delivery (mandatory) z properties (mandatory) z manifest (optional) z process (optional) Biz. Tags z delivery (mandatory) z properties (mandatory) z manifest (optional) z process (optional) 27

delivery z Document routing is specified with delivery header entry z contains information about delivery z Document routing is specified with delivery header entry z contains information about the source and destination of the Biz. Talk Document z subelements yto: destination business entity (mandatory) xaddress yfrom: source business entity (mandatory) xaddress yreliability: reliable delivery (optional) xsend. Receipt. To xreceipt. Required. By 28

reliability z Optional element that contains the information necessary to perform reliable delivery of reliability z Optional element that contains the information necessary to perform reliable delivery of the enclosing Biz. Talk Document z if the element is present, the destination business entity is required to send a receipt back to the given URL upon receiving and accepting the document ysend. Receipt. To: URL to which a receipt must be sent yreceipt. Required. By: time instant, absolute time by which a receipt must be received 29

Example: delivery <dlv: delivery SOAP-ENV: must. Understand=”true”> <dlv: to><dlv: address xsi: type=”agr: department”> … Example: delivery www. we-lovebooks. org> 2000 -05 -14 T 08: 00+08: 00 30

properties z Document identity information and other concepts z subelements (all mandatory): yidentity: URI; properties z Document identity information and other concepts z subelements (all mandatory): yidentity: URI; identifies the document for purposes of logging, tracking, error handling. . . ysent. At: sending timestamp yexpires. At: expiration timestamp ytopic: URI that uniquely identifies the overall purpose of the Biz. Talk Document xinterest-based routing xverifying the consistency (Biz. Talk Document vs. the content) 31

manifest z Document catalog information z includes references to both the Business Documents carried manifest z Document catalog information z includes references to both the Business Documents carried within the primary Biz. Talk Document in the Biz. Talk Message, as well as any additional attachments, such as images of binary data, that may be considered a part of the Biz. Talk Message z purpose: provide a complete catalogue of the content for consistency checking, and for integrity and verification (e. g. digital signatures) 32

manifest z Subelements ysequence of <reference> elements yreference (mandatory) xuri: reference that resolves to manifest z Subelements ysequence of elements yreference (mandatory) xuri: reference that resolves to the resource denoted by the enclosing element • #id (within the Biz. Talk Document), CID: content-id-value (MIME attachments), URL (large attachments that are carried separately) xdescription: free text description of the Business Document or attachment • could be used as a supporting comment, or as a keyword for additional implementation-specific processing 33

Example: manifest <fst: manifest xmlns: fst=”…”> <fst: reference fst: uri=”#insurance_claim_document_id”> <fst: description>Insurance Claim</fst: description> Example: manifest Insurance Claim Facsimile of Signed Claim Document Photo of Damaged Car 34

process z Process-management information z includes information about the business process that provides the process z Process-management information z includes information about the business process that provides the processing context for the Biz. Talk Document 35

Example: process <prc: process SOAP-ENV: must. Understand=”true”> <prc: type>purchasing: Book_Purchase_Process</prc: type> <prc: instance>purchasing: Book_Purchase_Process#12345 Example: process purchasing: Book_Purchase_Process purchasing: Book_Purchase_Process#12345 port: po_receiver 36

process z Subelements: ytype: URI; the type of the business process involved, e. g. process z Subelements: ytype: URI; the type of the business process involved, e. g. , the process of purchasing a book (mandatory) xpattern of interchange that is agreed upon among two or more business partners yinstance: URI; uniquely identifies a specific instance of the business process (mandatory) xe. g. an instance of the process of purchasing a book in which Booklovers Anonymous is in the process of purchasing a copy of Essential Biz. Talk xe. g. extends the type URI with sequence number yhandle: URI; provides further information 37

eb. XML z International initiative established by UN/CEFACT and OASIS z vision: create a eb. XML z International initiative established by UN/CEFACT and OASIS z vision: create a single global electronic marketplace where enterprises of any size and in any geographical location can meet and conduct business with each other through the exchange of XML based messages z eb. XML: a set of specifications 38

eb. XML Architecture z a way to define business processes and their associated messages eb. XML Architecture z a way to define business processes and their associated messages and content z a way to register and discover business process sequences with related message exchanges z a way to define company profiles z a way to define trading partner agreements z a uniform message transport layer 39

Vertical specifications z ontologies, vocabularies, schemas z e. g. Global Commerce Internet Protocol y. Vertical specifications z ontologies, vocabularies, schemas z e. g. Global Commerce Internet Protocol y. Internet trading in the consumer good industry ymanufacturers (e. g. Coca-Cola, Kodak, Nestle, Philips) and retailers (e. g. Carrefour, Marks & Spencer, Wal. Mart Stores) + trade organisations representing 850000 companies (year 2000) yeb. XML for message transportation and routing 40