HTTP binding: HTTP Header component's {element} property's declaration

There are two comments about the definition of the {element} property
of a HTTP Header component.

== Error on types not allowed ==

In Part 2, section 6.3 Default Binding Rules reads:

     * HTTP Header Construction. If the {http headers} property as defined
       in section 5.10 Declaring SOAP Header Blocks exists and is not empty
       in a Binding Message Reference or Binding Fault component, element
       information item conforming to the element declaration of a HTTP
       Header component's {element} property, in the {http headers}
       property, MUST be turned into a HTTP header for the corresponding
       message.

       Only element information items of type xs:string or xs:anyURI may be
       serialized. All complex data types are ignored. Attributes on data
       elements are ignored.

       Each such element information item is serialized as follows:

First, the reference should be 6.7 Declaring HTTP Headers and not 5.10
Declaring SOAP Header Blocks

Second, as we cannot serialize certain types of data, we shouldn't
encourage declaring HTTP header using an element that cannot be
used. We usually try to raised errors when we know there's a problem,
and we are not doing so here.

I therefore propose this new text for section 6.3 Default Binding
Rules:

  HTTP Header Construction.

    If the {http headers} property as defined in section 6.7 Declaring
    HTTP Headers exists and is not empty in a Binding Message
    Reference or Binding Fault component, HTTP headers conforming to
    the {element} property of each HTTP Header component present MUST
    be serialized as follows:

    [ Keep the two existing rules here and add a following third one ]

      * Attributes on the instance data element are ignored.

and to replace the current text in section 6.7 about the definition of {element}:

     * {element}, REQUIRED. A xs:QName, a reference to an XML element
       declaration in the {element declarations} property of the Description
       component. This element represents a HTTP header.

the following:

  {element}, REQUIRED.

    A xs:QName, a reference to an XML element declaration in the
    {element declarations} property of the Description component. This
    element represents a HTTP header. The element information item
    declared MUST be of the type xs:string or xs:anyURI.

== Types allowed ==

We restricted the serialization to xs:string or xs:anyURI.

1. What about types derived from xs:string, e.g. xs:token? How about
   allowing:

      "type xs:string or xs:anyURI, or of a derived type using those as a
      base type definition."

2. Any reason for not allowing xs:int?

-- 
Hugo Haas - W3C
mailto:hugo@w3.org - http://www.w3.org/People/Hugo/

Received on Wednesday, 24 August 2005 10:10:50 UTC