BizTalk: E-Commerce the Microsoft Way I (2/3) - exploring XML
BizTalk: E-Commerce the Microsoft Way I
A BizTalk Document is a SOAP 1.1 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. The following concepts apply to BizTalk Documents.
- The time period during which a Document is meaningful. A Document must not be sent, accepted, processed or acknowledged beyond its lifetime.
- a universally unique token used to identify a Document.
- The act of being accepted for delivery by a receiver. A received Document is accepted if it is recognized as being intended for an endpoint served by the receiver, including Documents that are copies or duplicates of previously received Documents (based on the identity). Acceptance does not mean that all header entries and the body have been inspected and their contents verified for any specific purpose.
- the ability of a Document to be transmitted and accepted more than once with the same effect as being transmitted and accepted once.
- Biztalk Framework includes end-to-end protocols that prescribe certain receipts to be
sent by the receiver in order to ensure delivery semantics in some cases. These receipts are
first-class BizTalk Documents with a prescribed syntax. There are two kinds of receipts defined:
- Delivery: a receipt to acknowledge that the receiver accepted a given Document for delivery.
- Commitment: a receipt to acknowledge that, in addition to being accepted, a given Document has been inspected at the destination endpoint, all header entries marked mustUnderstand="1" have been understood, the correctness of their contents as well as the contents of the body has been verified, and there is a commitment to process the Document.
BizTags are the set of XML tags (both mandatory and optional) that are used to specify Business Document handling. More precisely, BizTags are elements and attributes defined by the BizTalk specification and used to construct BizTalk-specific SOAP header entries in the BizTalk Document. They are processed by the BizTalk Server, or by other applications facilitating the document interchange.
The BizTalk Framework does not prescribe the content or structure (schema) of individual Business Documents. The details of the Business Document content and structure, or Schema, are defined and agreed upon by the business entities involved.
A Schema is the metadata used to describe the structure of a class of XML documents, in particular for a class of Business Documents. This formal description is used by application developers to create systems that process corresponding Business Documents, or by parsers that validate a Business Document's conformance to the Schema at run time.
Organizations may publish their Schemas in the BizTalk Schemas Library, or through other means. Note that Schemas for Business Documents do not contain any BizTags. A schema contains only those tags required to support the business transaction, as agreed to by the cooperating business entities.
BizTalk Example Document
The following is an example of a simple BizTalk Document.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"> <SOAP-ENV:Header> <eps:endpoints SOAP-ENV:mustUnderstand="1" xmlns:eps="http://schemas.biztalk.org/btf-2-0/endpoints" xmlns:agr="http://www.trading-agreements.org/types/"> <eps:to> <eps:address xsi:type="agr:department">Book Orders</eps:address> </eps:to> <eps:from> <eps:address xsi:type="agr:organization">Book Lovers</eps:address> </eps:from> </eps:endpoints> <prop:properties SOAP-ENV:mustUnderstand="1" xmlns:prop="http://schemas.biztalk.org/btf-2-0/properties"> <prop:identity>uuid:74b9f5d0-33fb-4a81-b02b-5b760641c1d6</prop:identity> <prop:sentAt>2000-05-14T03:00:00+08:00</prop:sentAt> <prop:expiresAt>2000-05-15T04:00:00+08:00</prop:expiresAt> <prop:topic>http://electrocommerce.org/purchase_order/</prop:topic> </prop:properties> </SOAP-ENV:Header> <SOAP-ENV:Body> <po:PurchaseOrder xmlns:po="http://electrocommerce.org/purchase_order/"> <po:Title>Essential BizTalk</po:Title> </po:PurchaseOrder> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
This BizTalk Document consists of a standard SOAP 1.1 message that contains the following:
- An application-specific Business Document (in this case a book purchase order), with its own application-defined XML namespace, carried in the body of the SOAP message.
- BizTalk-specific <endpoints> and <properties> SOAP header entries, constructed using BizTags defined in standard BizTag namespaces, with schema and semantics defined in the BizTalk specification.
In general, the body of the SOAP message constituting a BizTalk Document contains several related Business Documents, and the header of the SOAP message contains several BizTalk-specific (and potentially other) header entries. The use of the SOAP-ENV:mustUnderstand attribute with a value of "1" implies (in accordance with the SOAP 1.1 specification) that the destination business entity receiving this Document must understand and correctly process the header entries so attributed, or if the header entry is not understood, the processing of the Document must be terminated with failure.
It is worth noting that the <to> and <from> routing tags often use business-entity names for source and destination addressing, rather than transport addresses such as HTTP URLs. The form and interpretation of the address content is indicated by the xsi:type attribute. The BizTalk Document structure and function are independent of the transports over which the Documents are carried.
Documents are sent in BizTalk Messages.
Produced by Michael Claßen
Created: Jan 07, 2002
Revised: Jan 07, 2002