W3C

SOAP Message Transmission Optimization Mechanism: Experimental Data Model Formulation

Editors Copy Date: 2003/07/20 12:59:00 21 July 2003

This version:
http://www.w3.org/TR/2003/WD-soap12-mtom-20030721
Latest version:
http://www.w3.org/TR/soap12-mtom
Editors:
Noah Mendelsohn, IBM
Mark Nottingham, BEA
Hervé Ruellan, Canon

Abstract

This document describes an abstract feature and a concrete implementation of it for optimizing the transmission and/or wire format of SOAP messages. This version includes experimental draft changes illustrating the use of XPath 1.0/ XQuery 2.0 Data Model terminology.

Status of this Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. The latest status of this document series is maintained at the W3C.

This is a modified version of the first W3C Working Draft of the SOAP Message Transmission Optimization Mechanism document. It has been produced by the XML Protocol Working Group (WG), which is part of the Web Services Activity.

This version of the document was forked on August, 19, 2003. The purpose of this version is to explore the use of XPath 1.0 / XQuery 2.0 terminology as the basis for the presentation of this feature. This version is experimental, and has been developed at the request of the task force considering the data model changes. This draft has no official status, except as subject for discussion by the workgroup.

Discussion of this document takes place on the public xml-dist-app@w3.org mailing list (public archive) under the email communication rules in the XML Protocol Working Group Charter .

Patent disclosures relevant to this specification may be found on the Working Group's patent disclosure page.

This is a modified version of a public W3C Working Draft. It is a draft document and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". A list of all W3C technical reports can be found at http://www.w3.org/TR/.


Short Table of Contents

1. Introduction
2. Abstract Transmission Optimization Feature
3. Inclusion Mechanism
4. HTTP Transmission Optimization Feature
A. Mapping between Infosets and Data Models
B. References
C. Change Log (Non-Normative)


Table of Contents

1. Introduction
    1.1 Notational Conventions
    1.2 Relation to other specifications
        1.2.1 Use of the Infoset and the XQuery 1.0 and XPath 2.0 Data Model
        1.2.2 Relationship to the SOAP Processing model
2. Abstract Transmission Optimization Feature
    2.1 Introduction
    2.2 Abstract Transmission Optimization Feature Name
    2.3 Abstract Transmission Optimization Feature Properties
    2.4 Abstract Transmission Optimization Feature Processing
        2.4.1 Sending a message
        2.4.2 Receiving a message
        2.4.3 Intermediaries
3. Inclusion Mechanism
    3.1 Introduction
    3.2 Inclusion element
        3.2.1 Include element
        3.2.2 href attribute
    3.3 MIME Multipart/Related Serialization
        3.3.1 Introduction
        3.3.2 Serialization of a SOAP message
        3.3.3 Deserializing a SOAP message
4. HTTP Transmission Optimization Feature
    4.1 Introduction
    4.2 HTTP Transmission Optimization Feature Name
    4.3 Implementation
        4.3.1 Sending a SOAP message
        4.3.2 Receiving a SOAP message

Appendices

A. Mapping between Infosets and Data Models
    A.1 Infoset Mapping at Sending Nodes
    A.2 Infoset Mapping at Receiving Nodes
B. References
C. Change Log (Non-Normative)


1. Introduction

The first part of this document (2. Abstract Transmission Optimization Feature) describes an abstract feature for optimizing the transmission and/or wire format of a SOAP message by selectively re-encoding portions of the message, while still presenting an XML Infoset to the SOAP application.

This Abstract Transmission Optimization Feature is intended to be implemented by SOAP bindings, however nothing precludes implementation as a SOAP module.

Unlike SOAP itself, which is defined in terms of XML Infosets [XMLInfoset], this feature models message envelopes using the XQuery 1.0 and XPath 2.0 Data Model [XML Query Data Model], which is a typed superset of the Infoset. This feature uses type information only for optimization purposes; it does not provide for reconstruction of type information at receivers, except as necessary to support optimization. Nonetheless, use of the data model in this specification facilitates optimized transmission of query results through SOAP, and should provide a useful foundation if, for example, digital signature canonicalizations were to be developed for data model instances. Use of the data model here should also facilitate the work of those who may wish to develop features to provide for optimized transmission of the full typed model: the changes needed to this specification should be straightforward, and the optimizations provided herein should be easy to generalize for such use.

The usage of the Abstract Transmission Optimization Feature is a hop-by-hop contract between a SOAP node and the next SOAP node in the SOAP message path, providing no normative convention for optimization of SOAP transmission through intermediaries. Additional specifications could in principle be written to provide for optimized multi-hop facilities similar to those provided herein, or in other ways that build on this specification (e.g. by providing for transparent passthrough of optimized messages).

The second part (3. Inclusion Mechanism) describes an Inclusion Mechanism implementing part of the Abstract Transmission Optimization Feature in a binding-independant way. The third part (4. HTTP Transmission Optimization Feature) uses this Inclusion Mechanism for implementing the Abstract Transmission Optimization Feature for an HTTP binding.

This document represents a transmission optimization mechanism which was inspired by a similar mechanism in the PASWA document (see [PASWA]). The WG plans to work later on the other parts of that document (assigning media types to binary data in XML infosets and including representations of Web resources in SOAP messages) and to publish other drafts which will include such mechanisms.

1.1 Notational Conventions

The keywords "MUST", , "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC 2119].

This specification uses a number of namespace prefixes throughout; they are listed in Table 1. Note that the choice of any namespace prefix is arbitrary and not semantically significant (see XML Infoset [XML InfoSet]).

Table 1: Prefixes and Namespaces used in this specification.
Prefix Namespace Notes
dm "???" Consistent with [XML Query Data Model], this prefix is used to qualify accessor names in the XQuery 1.0 and XPath 2.0 Data Model. Apparently, no URI has been reserved to correspond to this prefix.
env "http://www.w3.org/2003/05/soap-envelope" A normative XML Schema [XML Schema Part 1], [XML Schema Part 2] document for the "http://www.w3.org/2003/05/soap-envelope" namespace can be found at http://www.w3.org/2003/05/soap-envelope.
xbinc "http://www.w3.org/2003/06/soap/features/binary-inclusion" The namespace of the 3. Inclusion Mechanism.
xdt "http://www.w3.org/2003/05/xpath-datatypes" The namespace of the XPath data types.
xs "http://www.w3.org/2001/XMLSchema" The namespace of XML Schema data types [XML Schema Part 2].
Editorial note: NRM 
Need biblio reference for XPath Data Types.

1.2 Relation to other specifications

This specification has currently no well-defined relation with the [SOAP 1.2 Attachment Feature] specification. However, it may be expected that this specification will supersede the [SOAP 1.2 Attachment Feature] specification once this specification has reached a stable state.

Even if this specification does not target specifically attachments to a SOAP message, it is expected that it will fulfill all attachment feature requirements described in [SOAP 1.2 Attachment Feature].

The implementation of the abstract feature as a binding feature for an HTTP binding is intended to enhance the SOAP HTTP binding described in [SOAP Part 2] SOAP HTTP Binding or an updated version of it.

See 1.2.1 Use of the Infoset and the XQuery 1.0 and XPath 2.0 Data Model for a discussion of the XML Infoset ([XML InfoSet]), and the XQuery 1.0 and XPath 2.0 Data Model ([XML Query Data Model]), and their use by this specification.

This document has been produced in conjunction with the development of requirements, embodied in the requirements document [SOAP Attachment Requirements]. The requirements document is a work in progress. No reconciliation of this document and the requirements document has been done for this publication. It is expected that this document and the requirements document will iteratively evolve over time.

1.2.1 Use of the Infoset and the XQuery 1.0 and XPath 2.0 Data Model

The SOAP Recommendation provides for processing of SOAP "envelopes", which are modeled as XML Information Sets ([XML InfoSet]). Such Infosets capture the tree structure, the names of the elements, the character content of elements and attributes, and so on. The Infoset does not model schema data types, such as integer, and thus provides no association between character strings and values. Schema validation is not in general required for processing of SOAP messages.

The purpose of this feature is to optimize the transmission of SOAP envelopes by relying on type information that may be available to the sender. This feature does not specify any particular means by which such type information is to be determined: schema validation is one possibility, but senders MAY determine or establish types using other means. Type information need be provided only for element nodes that are to be optimized.

Unlike the Infoset, the XQuery 1.0 and XPath 2.0 Data Model ([XML Query Data Model] ... hereinafter referred to as the "data model") provides a model that carries type and value space information for each element and attribute. Accordingly, this feature is expressed in terms of that data model. A precondition for use of this feature is therefore availability of a data model for the message to be transmitted. Details of the correspondence between SOAP Infosets and data models are provided in A. Mapping between Infosets and Data Models. The data model introduces accessors such as dm:string-value, dm:type and dm:typed-value, which are used in this specification.

The SOAP envelope does not in general convey schema type information, and the purpose of this feature is to optimize but not otherwise change the SOAP processing model. Accordingly, as described in 2.4.2 Receiving a message, this feature does not require that dm:type or dm:typed-value be reconstructed at a receiving node. This feature thus implements a "lossy" model, in which type information available to the sender may be used for purposes of optimization, but need not in general be provided to the receiver (except insofar as necessary in the binding to implement the optimization). The envelope data models at sender and receiver are therefore identical in overall structure, dm:string-value, and dm:children content, but not necessarily with respect to dm:type and dm:typed-value.

1.2.2 Relationship to the SOAP Processing model

This feature makes no changes to the SOAP processing model. Although type information is used to optimize transmission of SOAP envelopes, that type information in no way affects the processing of messages once received. As described in A. Mapping between Infosets and Data Models, there is in all cases an untyped Infoset corresponding to each transmitted and received envelope data model. The data models transmitted MUST in all cases correspond to legal SOAP envelope Infosets, and SOAP processing MUST be performed on received Infosets in the manner prescribed by the SOAP Recommendation.

2. Abstract Transmission Optimization Feature

2.1 Introduction

The Abstract Transmission Optimization Feature enables SOAP bindings to optimize the transmission and/or wire format of a SOAP message by selectively re-encoding portions of the message, whilst still presenting an XML Infoset to the SOAP application.

The Abstract Transmission Optimization Feature also enables SOAP applications to provide hints about what part of a SOAP message could be re-encoded in an efficient way. However, it is up to the implementation to decide if and how it will optimize the transmission of a given SOAP message.

2.2 Abstract Transmission Optimization Feature Name

This Abstract Transmission Optimization Feature is identified by the URI:

  • "http://www.w3.org/2003/06/soap/features/abstract-optimization".

2.3 Abstract Transmission Optimization Feature Properties

The Abstract Transmission Optimization Feature defines the set of properties described in Table 2.

Table 2: Property definitions for the Abstract Transmission Optimization Feature
Property Name Property Description
http://www.w3.org/2003/06/soap/features/abstract-optimization/OptimizationCandidates A list containing zero or more (pointers to) element nodes within the SOAP envelope data model; such nodes are identified as candidates for optimized transmission. Identified nodes MUST have a dm:type of xs:base4Binary, and must have a dm:string-value that is in the canonical lexical form for that value as proposed in [XML Schema Part 2 Errata] at base64Binary. The specific representation of node identifications, as programming language structures for example, is at the discretion of the implementation.

Note: Among the possible choices for identifying element nodes in the http://www.w3.org/2003/06/soap/features/abstract-optimization/OptimizationCandidates are XPaths relative to the Envelope element node, or pointers to the internal implementation of the element nodes in question. Indeed the list may be implicit in the content of the data model itself. For example, any element node with a dm:type of xs:base64Binary and dm:string-value in canonical form could be implicitly included in the list if desired.

Editorial note: NRM 
The Schema Part 2 Errata reference above is to a non-normative document. Must be fixed before MTOM goes to Recommendation status.
Editorial note: HR 
Does "enabling" an Abstract Feature make sense for a SOAP node? If this is not the case, another property should be created for reflecting the fact that the Abstract Transmission Optimization Feature is enabled or not.
Editorial note: HR per Noah's remark 
Do we allow the optimization of only base64 binary content or do we allow to generalize the http://www.w3.org/2003/06/soap/features/abstract-optimization/OptimizationCandidates as a list of (type, node) pairs? This would allow for binary transmission of integers, floats, and so on.

2.4 Abstract Transmission Optimization Feature Processing

2.4.1 Sending a message

To send a SOAP message using the Abstract Transmission Optimization Feature, an application MUST enable the Abstract Transmission Optimization Feature. In addition it SHOULD define the value of the http://www.w3.org/2003/06/soap/features/abstract-optimization/OptimizationCandidates property.

When sending a SOAP message with the Abstract Transmission Optimization Feature enabled, a SOAP node using a binding implementing the Abstract Transmission Optimization Feature SHOULD optimize the transmission of all the SOAP message element nodes listed in the value of the http://www.w3.org/2003/06/soap/features/abstract-optimization/OptimizationCandidates property. The means of optimization is at the discretion of the binding. The fact that optimization candidates are known to be of dm:type=xs:base64binary and in canonical form implies that transmission of the dm:typed-value is sufficient to enable reconstruction of the required dm:string-value at the receiving node. Bindings MAY use such means of optimization if desired.

In addition, the SOAP node binding MAY optimize the transmission of other SOAP message element nodes not listed in the value of the http://www.w3.org/2003/06/soap/features/abstract-optimization/OptimizationCandidates property. In particular, if the http://www.w3.org/2003/06/soap/features/abstract-optimization/OptimizationCandidates property is not defined or if it has an empty value, the SOAP node binding MAY optimize the transmission of any SOAP message element node(s) which have a dm:type of xs:base64binary and which are known to be in canonical form.

Editorial note: HR 
Do we allow the optimization of the Envelope , Header , Body element information items, or of a full Header Block?
Editorial note: HR 
If the binding used does not implement the Abstract Transmission Optimization Feature there are several options which can be followed: fault; send the message ignoring the request for using the Abstract Optimization Feature; send the message including the request for using the Abstract Transmission Optimization Feature (allows an intermediary implementing it to use its implementation).

2.4.2 Receiving a message

When receiving a SOAP message using an implementation of the Abstract Transmission Optimization Feature, a SOAP node MUST fault if it does not support the implementation used or the Abstract Transmission Optimization Feature.

When receiving a SOAP message using an implementation of the Abstract Transmission Optimization Feature, a SOAP node binding MUST reconstruct the transmitted data model, with the following exceptions:

  • The dm:type of any or all received data model nodes may be set as indeterminate, using the mechanisms of dm:type.
  • For any such nodes, the dm:typed-value must be adjusted accordingly, E.g. to return the same characters as dm:string-value for elements and attributes of simple type (see dm:typed-value).
  • Implementations are free to reconstruct only those portions actually needed for processing, or to present information from the message in a form convenient for efficient processing. For example, a value sent in an optimized form (e.g. binary) MAY be made available in that form as well as in the character form mandated by dm:string-value.

The receiving node MUST reconstruct from the data model an Envelope Infoset, as described in A.2 Infoset Mapping at Receiving Nodes; the receiving node MUST then perform SOAP processing on the reconstructed Infoset.

When receiving a SOAP message using an implementation of the Abstract Transmission Optimization Feature, a SOAP node binding MUST enable the Abstract Transmission Optimization Feature. In addition, the SOAP node binding SHOULD/MAY set the value of the http://www.w3.org/2003/06/soap/features/abstract-optimization/OptimizationCandidates property to reflect the SOAP message parts whose transmission was optimized in the incoming message.

Editorial note: HR 
We should decide on a SHOULD or on a MAY. In addition, the http://www.w3.org/2003/06/soap/features/abstract-optimization/OptimizationCandidates property is not very meaningful on the receiver side. We may create another property for reflecting element information items whose transmission was effectively optimized (an efficient implementation will provide this property to allow efficient retrieval of the optimized element information items).

2.4.3 Intermediaries

The usage of the Abstract Transmission Optimization Feature is a hop-by-hop contract between a SOAP node and the next SOAP node in the SOAP message path. Therefore, no specific rules exist for a SOAP intermediary implementing the Abstract Transmission Optimization Feature.

However a SOAP intermediary implementing the Abstract Transmission Optimization Feature MUST still follow the rules related to the usage of an implementation of the Abstract Transmission Optimization Feature when receiving the message (see 2.4.2 Receiving a message) and those related to the usage of an implementation of the Abstract Transmission Optimization Feature when sending the message (see 2.4.1 Sending a message). In addition, it MUST follow the rules for relaying SOAP messages (see [SOAP Part 1] Relaying SOAP Messages).

3. Inclusion Mechanism

3.1 Introduction

The Inclusion Mechanism expands upon the Abstract Transmission Optimization Feature by describing parts of an implementation of this feature. This specification does not describe a full implementation but is intended to provide support for building a full implementation of the Abstract Transmission Optimization Feature. In particular, this specification does not specify the use of any transport for the SOAP message. A full implementation based on this specification is describe in 4. HTTP Transmission Optimization Feature.

The Inclusion Mechanism is divided into two parts, the first one describing an xbinc:Include element node for including external data of any type in an XML data model or document. (Consistent with the rest of this specification, data model terminology is used to describe the xbinc:Include element and its attributes.)

The second part describes a serialization of a SOAP message optimized for transmission. This serialization uses the xbinc:Include element node and a MIME Multipart/Related ([RFC 2387]) packaging for encapsulating the SOAP message.

3.2 Inclusion element

3.2.1 Include element

The xbinc:Include element node is used for logically including generic data into an XML data model. The full XML data model can be reconstructed by replacing the xbinc:Include element node among the dm:children of its parent: the replacement content of dm:children must be a dm:text node; the dm:string-value of that text node MUST be the canonical lexical representation of the base64 encoded value of the data referred to in the href attribute of the xbinc:Include element node.

The xbinc:Include element node accessor values are as follows:

  • dm:node-kind MUST be element.

  • dm:node-name MUST be {http://www.w3.org/2003/06/soap/features/binary-inclusion;Include} .

  • There MUST be no element nodes among dm:children.

  • There MUST be one or more attribute nodes comprising dm:attributes. Among these MUST be the following:

  • dm:nilled MUST be false.

  • Other accessors such as dm:parent MUST be set according to the context.

3.2.2 href attribute

The href attribute node is used to identify the external data logically included by the xbinc:Include element node.

The href attribute node has the following data model accessor values:

  • dm:node-kind MUST be attribute.

  • dm:node-name MUST be {(no-namespace-URI);href} .

  • dm:type MUST be xs:anyURI.

  • dm:typed-value MUST be a URI referencing the part of the multipart serialization comprising the data logically included by the dm:parent element (I.e. the xbinc:Include).

  • Other accessors such as dm:parent MUST be set according to the context.

Editorial note: NRM 
Should we refer to the typed-value or string-value of the href attribute for purposes of dereference? Since we talk about type, I like the typed-value, which makes clear that it carries the semantics of a Web pointer. String-value is just a string, IMO.
Editorial note: NRM 
The data model does not seem to reconstruct a "specified" property, which we set as TRUE in the infoset formulation. Do we care here? I'm not sure it matters. We already say that the wire format and optimzation are at the discretion of the binding. I think it's implicit that this whole mechanism doesn't mean anything if the href is implied. This is also a small example of why I told a small lie in claiming the dm is a superset of infoset. Apparently not quite.

3.3 MIME Multipart/Related Serialization

3.3.1 Introduction

The MIME Multipart/Related serialization provides part of an implementation of the Abstract Transmission Optimization Feature by describing how to serialize a SOAP envelope data model in an optimized way, using MIME Multipart/Related packaging. This serialization uses the 3.2 Inclusion element element for linking the main SOAP message with element nodes serialized in a compact form.

3.3.2 Serialization of a SOAP message

For transmitting a SOAP message for which the Abstract Transmission Optimization Feature is enabled, the MIME Multipart/Related serialization helps optimizing the transmission of the message by allowing to transmit in a compact form parts of the SOAP message. The SOAP message is serialized into a MIME Multipart/Related ([RFC 2387]) packaging: one body part, the root, containing an XML representation of the SOAP envelope, while other body parts contain the parts of the SOAP message transmitted in a compact form.

Unless otherwise stated, serializing a SOAP envelope data model with the MIME Multipart/Related serialization MUST be semantically equivalent to performing the following steps separately, and in the order given.

  1. Create a MIME Multipart/Related packaging.

  2. Create a list of the element nodes whose transmission is to be optimized. This list SHOULD contain all the element nodes of the SOAP message pointed to in the http://www.w3.org/2003/06/soap/features/abstract-optimization/OptimizationCandidates property. This list MAY contain other element nodes of the SOAP message provided those nodes have a dm:type of xs:base64Binary, and a dm:string-value which is in the canonical form for that type.

  3. Add a serialization of the content of each element node in the list in a body part of the MIME Multipart/Related packaging.

    Editorial note: HR 
    How do we set the Content-type?
  4. Modify the SOAP envelope data model by replacing the dm:children of each element node in the list by an xbinc:Include element node referring to the body part of the MIME Multipart/Related packaging containing its serialization.

  5. Serialize the resulting SOAP envelope data model, using XML 1.0, in the root object of the MIME Multipart/Related packaging.

    Editorial note: HR 
    Do we allow only an XML 1.0 serialization?

3.3.3 Deserializing a SOAP message

When receiving a SOAP message using the MIME Multipart/Related serialization, deserializing MUST, at least logically, provide access to the reconstructed SOAP envelope data model.

The reconstruction of the SOAP envelope data model from the data contained in the MIME Multipart/Related packaging MUST be semantically equivalent to performing the following steps separately, and in the order given.

  • Extract the SOAP envelope from the root object of the MIME Multipart/Related packaging and deserialize it to a data model representation.

  • Extract and deserialize each other body part of the MIME Multipart/Related packaging.

  • Find every xbinc:Include element node in the SOAP envelope data model.

    For each xbinc:Include element node, find the body part of the MIME Multipart/Related packaging which is referred to by the href attribute node of the xbinc:Include element node. For the element node which had the xbinc:Include element node as the value of its dm:children, set the value of dm:children to a newly constructed text node. That text node MUST have as its dm:string-value the canonical lexical representation of the base64binary value of the referred to body part.

When reconstructing a SOAP message data model, the implementation:

  • SHOULD generate an "env:Sender" SOAP fault with a subcode of xbinc:MissingHRef if an xbinc:Include element node does not contain a href attribute node among its dm:attributes.

  • SHOULD generate an "env:Sender" SOAP fault with a subcode of xbinc:NotFoundHRef if no body part of the MIME Multipart/Related packaging matches the href attribute node of an xbinc:Include element node.

4. HTTP Transmission Optimization Feature

4.1 Introduction

The HTTP Transmission Optimization Feature is a binding-level feature implementing the Abstract Transmission Optimization Feature in an HTTP binding. This HTTP Transmission Optimization Feature uses the 3. Inclusion Mechanism as the basis of its implementation.

This HTTP Transmission Optimization Feature builds upon the current HTTP binding (see [SOAP Part 2] SOAP HTTP Binding), enhancing it with the support of the Abstract Transmission Optimization Feature. In all aspects not described in this section, the rules of the HTTP binding are not modified.

4.2 HTTP Transmission Optimization Feature Name

This HTTP Transmission Optimization Feature is identified by the URI:

  • "http://www.w3.org/2003/06/soap/features/http-optimization".

4.3 Implementation

The HTTP Transmission Optimization Feature uses the 3. Inclusion Mechanism for implementing the Abstract Transmission Optimization Feature. It serializes the SOAP message using the 3.3.2 Serialization of a SOAP message and puts the resulting MIME Multipart/Related packaging in the HTTP body.

4.3.1 Sending a SOAP message

When sending a SOAP message for which the Abstract Transmission Optimization Feature is enabled, the HTTP Transmission Optimization Feature optimizes the transmission of the message by serializing it using the 3.3.2 Serialization of a SOAP message. Unless otherwise stated, serializing a SOAP message infoset into the HTTP body MUST be semantically equivalent to performing the following steps separately, and in the order given.

  1. Serialize the SOAP Message into a MIME Multipart/Related packaging as described in 3.3.2 Serialization of a SOAP message.

  2. Serialize the MIME Multipart/Related packaging into the HTTP body.

4.3.2 Receiving a SOAP message

When receiving a SOAP message using the HTTP Transmission Optimization Feature, the HTTP binding MUST, at least logically, provide access to the reconstructed SOAP message infoset.

The reconstruction of the SOAP message infoset from the data contained in the HTTP Body MUST be semantically equivalent to performing the following steps separately, and in the order given.

  • Extract the MIME Multipart/Related packaging from the HTTP body.

  • Deserialize the SOAP message from the MIME Multipart/Related packaging as described in 3.3.3 Deserializing a SOAP message.

A. Mapping between Infosets and Data Models

The SOAP Recommendation models message envelopes as XML Infosets; this feature uses the XQuery 1.0 and XPath 2.0 Data Model to augment the information available in such Infosets with typing information, which is used as the basis for optimization. This Appendix sets out in detail the correspondence between SOAP Infosets and SOAP data models, for purposes of implementation of this feature.

A.1 Infoset Mapping at Sending Nodes

The [XML Query Data Model] provides a normative mapping from the Post Schema Validation Infoset to a data model. Except as specified here, that mapping is used to construct data models from SOAP envelope infosets at a sending node. The differences are as follows:

  • Neither SOAP nor this feature requires schema validation of messages by sender or receiver. The means by which dm:type and dm:typed-value are determined are at the discretion of the sending SOAP node, except that the dm:typed-value must be consistent with the dm:string-value for the assigned dm:type.
  • In the case where no type information is available, perhaps because no schema validation was performed or because no type was assigned by such validation, the conventions described at dm:type. MUST be used to indicate that the type is indeterminate.
Editorial note: NRM 
Should xdt:untypedAtomic be used for leaf nodes with only text content? Seems preferable to me, but for some reason the dm is looser.

A.2 Infoset Mapping at Receiving Nodes

The [XML Query Data Model] provides a normative mapping from a Data Model to an Infoset. That mapping is used to construct the SOAP envelope Infoset at the receiver. Note that this mapping makes use only of dm:string and text node dm:children: in no case is the dm:type or dm:typed-value used to construct the Infoset. Thus, this mapping enforces the goal of this feature, which is to use type information as a means of optimization, but not to affect the semantics of SOAP processing.

B. References

[SOAP Part 1]
W3C Recommendation "SOAP Version 1.2 Part 1: Messaging Framework", M. Gudgin, M. Hadley, N. Mendelsohn, J-J. Moreau, H. F. Nielsen, May 2003. (See http://www.w3.org/TR/soap12-part1/.)
[SOAP Part 2]
W3C Recommendation "SOAP Version 1.2 Part 2: Adjuncts", M. Gudgin, M. Hadley, N. Mendelsohn, J-J. Moreau, H. F. Nielsen, May 2003. (See http://www.w3.org/TR/soap12-part2/.)
[SOAP 1.2 Attachment Feature]
W3C Working Draft "SOAP 1.2 Attachment Feature", H. F. Nielsen, H. Ruellan, September 2002. (See http://www.w3.org/TR/soap12-af/.)
[SOAP Attachment Requirements]
W3C Editors' copy "SOAP Attachment Feature Requirements", M. A. Jones, May 2003. (See http://www.w3.org/2000/xp/Group/3/02/24-soap-attachment-feature.html.)
[XML 1.0]
W3C Recommendation "Extensible Markup Language (XML) 1.0 (Second Edition)", Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, 6 October 2000. (See http://www.w3.org/TR/2000/REC-xml-20001006.)
[Namespaces in XML]
W3C Recommendation "Namespaces in XML", Tim Bray, Dave Hollander, Andrew Layman, 14 January 1999. (See http://www.w3.org/TR/1999/REC-xml-names-19990114/.)
[XML InfoSet]
W3C Recommendation "XML Information Set", John Cowan, Richard Tobin, 24 October 2001. (See http://www.w3.org/TR/2001/REC-xml-infoset-20011024/.)
[XML Schema Part 1]
W3C Recommendation "XML Schema Part 1: Structures", Henry S. Thompson, David Beech, Murray Maloney, Noah Mendelsohn, 2 May 2001. (See http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/.)
[XML Schema Part 2]
W3C Recommendation "XML Schema Part 2: Datatypes", Paul V. Biron, Ashok Malhotra, 2 May 2001. (See http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/.)
[XML Schema Part 2 Errata]
W3C Internal Working Draft 7 March 2003 Id: datatypes-with-errata.xml,v 1.5 2003/03/07 19:54:00 (See http://www.w3.org/XML/Group/2002/09/xmlschema-2/datatypes-with-errata.html.)
[RFC 2119]
IETF "RFC 2119: Keywords for use in RFCs to Indicate Requirement Levels", S. Bradner, March 1997. (See http://www.ietf.org/rfc/rfc2119.txt.)
[RFC 2387]
IETF "The MIME Multipart/Related Content-type", E. Levinson, August 1998. (See http://www.ietf.org/rfc/rfc2387.txt.)
[PASWA]
"Proposed Infoset Addendum to SOAP Messages with Attachments", April 2003. (See http://www.gotdotnet.com/team/jeffsch/paswa/paswa61.html.)
[XML Query Data Model]
"XQuery 1.0 and XPath 2.0 Data Model", April 2003. (See http://www.w3.org/TR/xpath-datamodel/.)

C. Change Log (Non-Normative)

Table 3: Changes since first draft.
Who When What
NRM 20030819 First draft of Data Model based presentation..
HR 20030703 Changed 1. Introduction paragraph 2 to include Noah's text on hop-by-hop contract.
HR 20030703 Changed 3.3.2 Serialization of a SOAP message bullet 4 as per Gudge suggestion (ie "the content" of each eii). Changed bullet 3 in the same way.
HR 20030703 Added Introductory text from Jacek relating document to PASWA and telling about future inclusion of PASWA related stuff.
HR 20030701 Added relation with requirements document.
HR 20030630 Added an URI table as in other specs, and a Notational Convention section.
HR 20030630 Named properties with URIs.
HR 20030630 Put all eii and aii names in monospace.
HR 20030630 Corrected specific typos found by Tony Graham.
HR 20030620 Split up HTTP implementation into an 3. Inclusion Mechanism and an 4. HTTP Transmission Optimization Feature using this 3. Inclusion Mechanism
HR 20030620 Added a link to other specification section (1.2 Relation to other specifications).
HR 20030620 Added a references section (B. References).
HR 20030620 Changed main title from "Optimization Mechanism" to "SOAP Message Transmission Optimization Mechanism".
HR 20030620 Changed abstract feature name from "Abstract Optimization Feature" to "Abstract Transmission Optimization Feature".
HR 20030620 Changed/removed all occurences of "Working Draft".
HR 20030620 Removed all colored-diff marks.
HR 20030618 Changed document's name from "Inclusion Mechanism" to "Optimization Mechanism", and changed abstract feature name and HTTP feature name.
HR 20030618 Corrected typos and other editorial errors.
HR 20030618 Added a publication date.
HR 20030618 Added an abstract.
HR 20030618 Improved general introduction (1. Introduction).
HR 20030618 Changed the presentation of the processing rules in 2.4.1 Sending a message, 2.4.2 Receiving a message.
HR 20030618 Shortened 2.4.3 Intermediaries.
HR 20030618 Improved HTTP implementation introduction (4.1 Introduction).
HR 20030618 Added a description of the Include element information item and of the href attribute information item.
HR 20030618 Changed the presentation for sending a SOAP message through the HTTP binding.
HR 20030618 Improved the presentation for receiving a SOAP message through the HTTP binding.