40
Processing of structured documents Part 5

Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

Embed Size (px)

Citation preview

Page 1: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

Processing of structured documents

Part 5

Page 2: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

2

XML for data interchange

Simple Object Access Protocol (SOAP)BizTalk (Microsoft)ebXML (UN/CEFACT & OASIS)...

Page 3: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

3

Simple Object Access Protocol (SOAP)

A lightweight protocol for exchange of information in a decentralized, distributed environment

XML-based protocolsubmitted to W3C in May 2000; latest

working drafts Dec 2001 (SOAP 1.2)IBM, Lotus, Microsoft, DevelopMentor,

UserLand Software

Page 4: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

4

SOAP

Soap consists of three parts: an envelope: defines a framework for describing

what is in a message and how to process it a set of encoding rules for expressing instances

of application-defined datatypes a convention for representing remote procedure

calls and responses

SOAP messages may be exhanged using a variety or ”underlying” protocols usually used together with HTTP (Post)

Page 5: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

5

Example: SOAP request

<SOAP-ENV:Envelope

xmlns:SOAP-ENV=”http://www.w3.org/2001...”

SOAP-ENV:encodingStyle=”http://www.w3.….”>

<SOAP-ENV:Body>

<m:GetLastTradePrice xmlns:m=”Some-URI”>

<symbol>DIS</symbol>

</m:GetLastTradePrice>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 6: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

6

Example: SOAP response

<SOAP-ENV:Envelope

xmlns:SOAP-ENV=”http://www.w3.org...”

SOAP-ENV:encodingStyle=”http://www.w3.….”>

<SOAP-ENV:Body> <m:GetLastTradePriceResponse

xmlns:m=”Some-URI”>

<Price>34.6</Price>

</m:GetLastTradePriceResponse>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 7: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

7

SOAP Message Exchange Model

SOAP messages are fundamentally one-way transmissions between SOAP nodes, from a SOAP sender to a SOAP receiver

SOAP messages are often combined (by applications) to implement patterns such as request/response ”conversations”

Page 8: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

8

SOAP messages

a SOAP message contains two SOAP specific subelements within the Envelope Header and Body contents of these subelements are

application definedSOAP defines (partially) how these elements

must be handled

Page 9: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

9

SOAP messagesa header is optional

there may be intermediate SOAP nodes along a message’s path from a sender to an ultimate receiver

the intermediate nodes may provide value-added services using the header informationwithout understanding the body

the body is the mandatory element within an Envelope main information is carried in the body

Page 10: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

10

SOAP message exchange

SOAP is a simple messaging framework for transferring information in the form of XML documents between a SOAP sender and receiver

the scenarios typically involve multiple message exhanges the simplest form: request-response

pattern

Page 11: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

11

SOAP message exchange

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)

otherwise the message exchanges can be modeled simply as documents exchanged semantics are at the level of sending and

receiving applications

Page 12: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

12

Remote procedure call

SOAP specification defines a uniform representation for RPC invocations and responses

target (the procedure to be called) and the parameters have to be given RPC is carried as a part of the Body element

modelled as struct which takes the name of the procedure or method

subelements represent the parameters

Page 13: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

13

Remote procedure call

encodingStyle attribute tells how the contents (e.g. parameters)

have been serialized SOAP specifies particular encoding

schemes for various datatypes, but other encoding schemes may be used for application-specific data

Page 14: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

14

Remote procedure call

A transport binding supporting request-response pattern can provide the correlation between a request and a response (e.g. HTTP)

the application designer can also put a correlation ID relating a call and its return in a SOAP header makes the RPC independent of any

underlying transport

Page 15: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

15

Apache SOAP implementation

Apache SOAP is an open-source implementation of the SOAP v1.1 specification in Java

Apache SOAP can be used as a client library to invoke SOAP

services available elsewhere as a server-side tool to implement SOAP

accessible services

Page 16: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

16

Apache SOAP implementation

As a client library it provides an API for invoking SOAP RPC services and an API for sending and receiving SOAP

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

Page 17: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

17

Application-specific content

SOAP is a simple and general frameworkthe problem remains, how to model the

application-specific content? Applications/systems should interoperate...

(partial) solutions: semantics general to many application

areas (e.g. E-commerce in general) vertical schemas (e.g. for retail industry)

Page 18: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

18

BizTalk Framework

Version 2.0: Document and Message Specification Microsoft, 2000

provides a set of basic mechanisms required for most B2B electronic exchanges

does not prescribe the content or schema of individual business documents

builds upon HTTP, MIME, XML, SOAP

Page 19: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

19

BizTalk concepts

Biztalk Framework Compliant (BFC) server represented by the set of services providing the

message-processing functionality defined in the BizTalk specifications

Application a line-of -business system where the business

data or logic are stored and executed also includes any additional adapters that may be

required to input or output Business Documents (see below) and communicate with a BFC server

Page 20: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

20

BizTalk concepts

Business Document a well-formed XML document containing

business-transaction data (purchase order, invoice, sales forecast…)

BizTalk Document a SOAP message in which the body of the

message contains the Business Documents, and the header contains BizTalk-specific header entries for enhanced message-handling semantics

Page 21: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

21

BizTalk concepts

Schema describes the content and structure of a class

of XML documents, in particular for a class of Business Documents

is 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

Page 22: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

22

BizTalk concepts

BizTags the set of XML tags that are used to specify

Business Documents handling (SOAP header entries)

BizTalk message the unit of wire-level interchange are used to send BizTalk Documents and any

related files must always contain a primary BizTalk

Document that defines the semantics of the Message

Page 23: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

23

Example:document structure

<SOAP-ENV:Envelope>

<SOAP-ENV:Header>

<dlv:delivery SOAP-ENV:mustUnderstand=”true”>

<dlv:to>

<dlv:address xsi:type=”agr:department”>

Book Order Department</dlv>

</dlv:to>

<dlv:from>

<dlv:address xsi:type=”agr:organisation”>

Booklovers Anonymous</dlv>

</dlv:from></dlv:delivery> … continues

Page 24: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

24

Example: document structure

<prop:properties SOAP-ENV:mustUnderstand=”true”>

<prop:identity>uuid:74b9…</prop:identity>

<prop:sentAt>2000-05-14T03:00:00+08:00

</prop:sentAt>

<prop:expiresAt>2000-05-15T04:00:00+08

</prop:expiresAt>

<prop:topic>

http://electroniccommerce.org/purchase_order/

</prop:topic>

</prop:properties> … continues

Page 25: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

25

Example: document structure

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<po:PurchaseOrder>

<po:Title>Essential BizTalk</po:Title>

</po:PurchaseOrder>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 26: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

26

In the example:

An application-specific Business Document (a book purchase order), carried in the body of a SOAP message

BizTalk-specific <delivery> and <properties> SOAP header entries, constructed using BizTags

Page 27: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

27

BizTags

delivery (mandatory)properties (mandatory)manifest (optional)process (optional)

Page 28: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

28

deliveryDocument routing is specified with delivery

header entrycontains information about the source and

destination of the BizTalk Documentsubelements

to: destination business entity (mandatory)address

from: source business entity (mandatory)address

reliability: reliable delivery (optional)sendReceiptToreceiptRequiredBy

Page 29: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

29

reliability

Optional element that contains the information necessary to perform reliable delivery of the enclosing BizTalk Document

if the <reliability> element is present, the destination business entity is required to send a receipt back to the given URL upon receiving and accepting the document sendReceiptTo: URL to which a receipt must be

sent receiptRequiredBy: time instant, absolute time by

which a receipt must be received

Page 30: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

30

Example: delivery<dlv:delivery SOAP-ENV:mustUnderstand=”true”>

<dlv:to><dlv:address xsi:type=”agr:department”>

… </dlv:address></dlv:to>

<dlv:from>

<dlv:address xsi:type=”agr:organisation”>

… </dlv:address></dlv:from>

<dlv:reliability>

<dlv:sendReceiptTo>www.we-love-

books.org></dlv:sendReceiptTo>

<dlv:receiptRequiredBy>

2000-05-14T08:00:00+08:00</dlv:receiptRequiredBy>

</dlv:reliability></dlv:delivery>

Page 31: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

31

propertiesDocument identity information and other

conceptssubelements (all mandatory):

identity: URI; identifies the document for purposes of logging, tracking, error handling...

sentAt: sending timestamp expiresAt: expiration timestamp topic: URI that uniquely identifies the overall purpose

of the BizTalk Documentinterest-based routingverifying the consistency (BizTalk Document vs. the content)

Page 32: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

32

manifestDocument catalog information includes references to both the Business

Documents carried within the primary BizTalk Document in the BizTalk Message, as well as any additional attachments, such as images of binary data, that may be considered a part of the BizTalk Message

purpose: provide a complete catalogue of the content for consistency checking, and for integrity and verification (e.g. digital signatures)

Page 33: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

33

manifest

Subelements sequence of <reference> elements reference (mandatory)

uri: reference that resolves to the resource denoted by the enclosing <reference> element

• #id (within the BizTalk Document), CID:content-id-value (MIME attachments), URL (large attachments that are carried separately)

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

Page 34: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

34

Example: manifest<fst:manifest xmlns:fst=”…”>

<fst:reference fst:uri=”#insurance_claim_document_id”>

<fst:description>Insurance Claim</fst:description>

</fst:reference>

<fst:reference fst:uri=”CID:[email protected]”>

<fst:description>Facsimile of Signed Claim

Document</fst:description>

</fst:reference>

<fst:reference fst:uri=”CID:[email protected]”>

<fst:description>Photo of Damaged Car</fst:description>

</fst:reference>

</fst:manifest>

Page 35: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

35

process

Process-management informationincludes information about the business

process that provides the processing context for the BizTalk Document

Page 36: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

36

Example: process

<prc:process SOAP-ENV:mustUnderstand=”true”>

<prc:type>purchasing:Book_Purchase_Process</prc:type>

<prc:instance>purchasing:Book_Purchase_Process#12345

</prc:instance>

<prc:handle>port:po_receiver</prc:handle>

</prc_process>

Page 37: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

37

processSubelements:

type: URI; the type of the business process involved, e.g., the process of purchasing a book (mandatory)

pattern of interchange that is agreed upon among two or more business partners

instance: URI; uniquely identifies a specific instance of the business process (mandatory)

e.g. an instance of the process of purchasing a book in which Booklovers Anonymous is in the process of purchasing a copy of Essential BizTalk

e.g. extends the type URI with sequence number

handle: URI; provides further information

Page 38: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

38

ebXML

International initiative established by UN/CEFACT and OASIS

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

ebXML: a set of specifications

Page 39: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

39

ebXML Architecture

a way to define business processes and their associated messages and content

a way to register and discover business process sequences with related message exchanges

a way to define company profilesa way to define trading partner

agreementsa uniform message transport layer

Page 40: Processing of structured documents Part 5. 2 XML for data interchange zSimple Object Access Protocol (SOAP) zBizTalk (Microsoft) zebXML (UN/CEFACT & OASIS)

40

Vertical specifications

ontologies, vocabularies, schemase.g. Global Commerce Internet Protocol

Internet trading in the consumer good industry manufacturers (e.g. Coca-Cola, Kodak, Nestle,

Philips) and retailers (e.g. Carrefour, Marks & Spencer, WalMart Stores) + trade organisations representing 850000 companies (year 2000)

ebXML for message transportation and routing