W3C home > Mailing lists > Public > xml-dist-app@w3.org > June 2002

Re: Web-friendly SOAP

From: Paul Prescod <paul@prescod.net>
Date: Sun, 16 Jun 2002 13:54:31 -0700
Message-ID: <3D0CFB07.AA9AF77B@prescod.net>
To: Jacek Kopecky <jacek@systinet.com>, "xml-dist-app@w3.org" <xml-dist-app@w3.org>
CC: Mark Baker <distobj@acm.org>

Jacek Kopecky wrote:
> 
>...
> --------------- HTTP 1.0 example
> PUT /foo HTTP/1.0
> X-Jacek-header: bar; variant=b2
> Content-type: text/xml
> 
> <some>
>   <xmlData/>
> </some>
> ----------------
> --------------- SOAP/REST version of the example above
> <soap:Envelope>
>   <soap:Header>
>     <ns:Jacek-header>
>       <b2ns:bar/>
>     </ns:Jacek-header>
>   </soap:Header>
>   <soap:Body>
>     <rest:Put url="/foo">
>       <some>
>         <xmlData/>
>       </some>
>     </rest:Put>
>   </soap:Body>
> </soap:Envelope>
> -----------------------

I think it is questionable whether an entire message should be XML. XML
headers are obviously good but I think that putting the entire message
in a single XML document decreases the ease with which an intermediary
can deal with one part of a message and ignore others. For instance a
malformed body element could cause the entire message to fail a parse
and thus make unrelated parts of the message indecipherable. MIME has a
cleaner separation of concerns. And MIME has a better handling for
binary. And MIME is more compact for simple use cases. It keeps the
simple case simpler. MIME doesn't requre the redundant "Envelope"
elements and minimizes the markup for the "Header" and "Body"
constructs.

The framing technology of the future should combine the best features of
MIME and XML -- not slavishly use one or the other for (in my opinion)
primarily PR reasons. One proposal:

PUT /foo HTTP/1.0
Content-type: text/xml
X-Jacek-header: '<soap:env>...
...
...
</b2ns:bar>'
X-Routing-header: '<soap:routing>...
...
...
</soap:routing>'

<some>
  <xmlData/>
</some>

 Paul Prescod
Received on Sunday, 16 June 2002 16:54:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:10 GMT