Re: Web-friendly SOAP

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"

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>...
X-Routing-header: '<soap:routing>...


 Paul Prescod

Received on Sunday, 16 June 2002 16:54:42 UTC