Issue 54: "full-potato" proposal

I took an action item to draft a "full-potato" version of the solution
for issue 54. For reference purposes, the original combined proposal
is at [1].

=======================================================================

Background
==========

The idea around this new proposal, as discussed on last week's call,
is to be able to specify the HTTP method directly in the binding,
instead of using the currently so-called method — which isn't the HTTP
method itself — alias for a combination of an HTTP method, input
serialization, output serialization, message patterns, and operation
style required.

In order to make the syntax not too verbose, sensible defaults for
usual HTTP methods need to be defined.

Proposal
========

-=- Defining three attributes: method, inputSerialization, -=-
-=- outputSerialization on http:operation                  -=-

Binding an operation to HTTP has the following parameters:

- the HTTP method used, identified with the method attribute. The type
  of the method attribute is xsd:string. The value of the method
  attribute must be an HTTP/1.1 (RFC2616) token:

       token          = 1*<any CHAR except CTLs or separators>
       separators     = "(" | ")" | "<" | ">" | "@"
                      | "," | ";" | ":" | "\" | <">
                      | "/" | "[" | "]" | "?" | "="
                      | "{" | "}" | SP | HT
       CTL            = <any US-ASCII control character
                        (octets 0 - 31) and DEL (127)>
       SP             = <US-ASCII SP, space (32)>
       HT             = <US-ASCII HT, horizontal-tab (9)>

  Note: we may want to define a restriction of the xsd:string type
  with is an HTTP/1.1 token; if I got it right:

      <xsd:simpleType name='usasciistring'>
        <xsd:restriction base="xsd:string">
   <xsd:pattern value='[&#032;-&#126;]+'/>
 </xsd:restriction>
      </xsd:simpleType>

      <xsd:simpleType name="http11token">
 <xsd:restriction base="myns:usasciistring">
   <xsd:pattern value='[^()&lt;&gt;@,;:\\"/\[\]{} \t]+'/>
 </xsd:restriction>
      </xsd:simpleType>

- the input serialization used, identified with the inputSerialization
  attribute. The type of the inputSerialization attribute is
  xsd:string, and its value MUST be the name of a IANA media type
  token.

- the output serialization used, identified with the
  outputSerialization attribute. The type of the outputSerialization
  attribute is xsd:string, and its value MUST be the name of a IANA
  media type token.

The methodDefault attribute on http:binding sets the default method
attribute for http:operation (unchanged).

HTTP/1.1 being a request-response protocol, the following WSDL 2.0
MEPs are supported by the HTTP binding: In-Only, Robust In-Only,
In-Out.

-=- Defining useful defaults -=-

The default input and output serializations are "application/xml".

For the GET and DELETE HTTP/1.1 methods, the default input
serialization is application/x-www-form-urlencoded.

-=- Noting that certain serializations come with restrictions -=-

The application/xml does not have any restriction on the operation
style used.

However, the two following restrictions are defined:
- application/x-www-form-urlencoded: URI style;
- multipart/form-data: Multipart style.

Other media types may require restrictions on the operation styles.
These are not defined in this specification.

Examples
========

That means that, for the methods we have currently defined in table
3-1, we would have the following equivalents:

  get:
    <http:operation method="GET" />
  post:
    <http:operation method="POST" />
  form-post-data:
    <http:operation method="POST" inputSerialization="multipart/form-data" />
  put:
    <http:operation method="PUT" />
  delete:
    <http:operation method="DELETE" />

Another example would be:

  <http:operation method="M-GET"
                  inputSerialization="application/x-www-form-urlencoded" />

And yet another one:

  <http:operation method="POST"
                  inputSerialization="multipart/form-data"
                  outputSerialization="image/svg+xml" />

=======================================================================

Comments?

Regards,

Hugo

  1. http://lists.w3.org/Archives/Public/www-ws-desc/2004Apr/0093.html
-- 
Hugo Haas - W3C
mailto:hugo@w3.org - http://www.w3.org/People/Hugo/

Received on Tuesday, 18 May 2004 12:13:52 UTC