- From: Hugo Haas <hugo@w3.org>
- Date: Fri, 23 Sep 2005 14:30:51 +0200
- To: www-ws-desc@w3.org
- Message-ID: <20050923123051.GH19585@w3.org>
LC323[1] points out that we mention HTTP Accept headers in the HTTP
binding, but that we do not say how they come into play. This is
particularly interesting as {http output serialization} only allows
one value. Yet, expectedMediaType is mentioned.
Thinking about this more, I figured out what we had in mind with HTTP
Accept headers and mentioning expectedMediaType.
If one defines an output message as:
<xs:element name="pic">
<xs:complexType>
<xs:sequence>
<xs:element name="desc" type="xs:string"/>
<xs:element name="content" type="tns:PictureType"
xmime:expectedContentTypes="image/jpeg, image/png"/>
</xs:sequence>
</xs:complexType>
</xs:element>
And if this output message is serialized as application/xml, then if I
do an HTTP request with the following Accept headers "application/xml,
image/png", I am likely to be given back:
<pic>
<desc>Cool pic!</desc>
<content xmime:contentType="image/png">…</content>
</pic>
So, I don't believe that there is a technical issue with the spec. On
the other hand, this text is obviously confusing. I have thought of
providing a better wording, but in the end, I am wondering if this
really belongs to the HTTP Binding, as this is more related to the
Assigning Media Types to Binary Data in XML document.
I am therefore proposing to move this text to the primer, as follows.
In section 4.5 MTOM and Attachments Support, after "Note the use of
the xmime:expectedContentType and xmime:contentType … Data in XML]." —
though there may actually be a better place for this text —, add:
Also note that, when using the WSDL HTTP Binding, an
implementation MAY use incoming HTTP Accept headers to choose
between alternative media types listed in
xmime:expectedContentType.
Regards,
Hugo
1. http://www.w3.org/2002/ws/desc/5/lc-issues/#LC323
--
Hugo Haas - W3C
mailto:hugo@w3.org - http://www.w3.org/People/Hugo/
Received on Friday, 23 September 2005 12:31:05 UTC