RE: LC323: mention of HTTP Accept headers in the HTTP binding

 

> -----Original Message-----
> From: www-ws-desc-request@w3.org 
> [mailto:www-ws-desc-request@w3.org] On Behalf Of Hugo Haas
> Sent: Friday, Sep 23, 2005 5:31 AM
> To: www-ws-desc@w3.org
> Subject: LC323: mention of HTTP Accept headers in the HTTP binding
> 
> 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>
> 

You are right, this was the intent. 

> 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.

You gave me a heart attack until I read the following below ;-)

> 
> 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.

Probably we should tone it down as the "MAY" is too formal for the
primer, i.e. s/MAY/may/

> 
> Regards,
> 
> Hugo

--umit

> 
>   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 Saturday, 24 September 2005 00:22:05 UTC