W3C home > Mailing lists > Public > www-ws-desc@w3.org > June 2004

Action item: HTTP binding for accepts header and output Serialization.

From: David Orchard <dorchard@bea.com>
Date: Wed, 23 Jun 2004 17:54:42 -0700
Message-ID: <32D5845A745BFB429CBDBADA57CD41AF087AAB52@ussjex01.amer.bea.com>
To: "Web Services Description" <www-ws-desc@w3.org>

?ED       2004-05-20: David Orchard to update HTTP binding to 
                      include discussion of how to generate an 
                      accepts header from schema annotations 
                      conformant to the media types extension 
                      document, and to use outputSerialization 
                      based on that information.

I don't recall exactly what I agreed to on this, but here's my best shot.  I wasn't able to figure out how to relate the schema annotations for binary directly to the Accept header and the outputSerialization, because the schema annotation is buried in an appinfo and not available as type for being referenced.  I haven't seen any use of XPath in WSDL to refer to an "unnamed" component, so that didn't seem the right way to go.  I'm sure I'm just missing something obvious that the media type folks will point out, so I didn't go any further on this.

Insert new Section 3.6.4 Serialization as Other

This serialization format is designed to allow a Web service to send or receive binary data.  The instance data of the input or output is serialized according to the media type of the instance data.  The media type that is expected or allowed on input, and the media type that may or will be sent on output is specified according to the Assigning Media types to binary data in XML.  The sender may specify an HTTP Accept header using the Abstract Data feature.  The Accept header value should be within the set of values defined by the expected Media Type element value.

Example requesting an image/gif
The following is a WSDL service that returns an image/gif or image/jpeg and allows the client to choose which to receive.


<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

<xs:import namespace="http://www.w3.org/@@@@/@@/xmlmime"

<xs:complexType name="Picture">
       <xs:extension base="xs:base64Binary" >
           <xs:attribute ref="xmlmime:contentType" use="optional" />

<xs:element name="companyPicture" type="tns:Picture" 
        <xs:documentation>This element designates the range of values 
        that the declared binary type will accept 
           <xmlmime:expectedMediaType>image/jpeg, image/gif</xmlmime:expectedMediaType>

<xs:complexType name="myDataType">
     <xs:element name="Accept"


<interface name="Image">
 <operation name="getImage" safe="true">
   <property uri="http://www.w3.org/@@@@/@@/features/AD/data">
    <constraint xmlns:foo="http://foo">
  <output element="tns:companyPicture"/>
  <operation ref="getImage" http:method="GET" >
    <output messageLabel="xs:NCName" http:outputSerialization="xmlmime:contentType" >

- I don't know how to relate the AD/data to the contentType explicitly because the expectedMediatype is buried in the Annotation. I think the relationship between companyPicture expectedMediaType and the AD myDataType is a bit tenous.  
- Can the outputSerialization be a reference rather than a value?
- Is the empty interface operation input to specify empty input params ok?  I *think* this means that the message content model property is set to #none.
- Any other bugs?

Received on Wednesday, 23 June 2004 20:54:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:06:41 UTC