- From: Hugo Haas <hugo@w3.org>
- Date: Tue, 18 Oct 2005 18:06:43 +0200
- To: Sanjiva Weerawarana <sanjiva@opensource.lk>
- Cc: WS-Description WG <www-ws-desc@w3.org>
- Message-ID: <20051018160643.GU12190@w3.org>
* Sanjiva Weerawarana <sanjiva@opensource.lk> [2005-10-13 22:47+0600] > > Consider a service that takes a URI and returns a picture. > > Input message: > > <element name="input"> > <complexType> > <sequence> > <element name="id" type="xsd:string"/> > </sequence> > </complexType> > </element> > > Output message: > > <element name="output"> > <complexType> > <sequence> > <element name="image" type="xsd:base64" > xmime:expectedContentType="image/*"/> > </sequence> > </complexType> > </element> > > Operation: > > <operation name="gimme-image" > style="style/iri style/one-binary-thing"> > <input message="tns:input"/> > <output message="tns:output"/> > </operation> > > Note that the use of the style "style/iri" on /operation effectively > constrains the input element. The addition of the style > "style/one-binary-thing" constrains the output schema to be of the > pattern above: exactly one child in the sequence and it must be declared > as xsd:base64 along with the xmime:expectedContentType attribute. > > And now the all important binding: > > <binding name="foo" interface=".."> > <operation name="gimme-image" whttp:operation="GET" > whttp:outputSerialization="image/jpg"/> > </binding> > > When we document the "one-binary-thing" style we say that that if that > style is used then the output serialization must be set to something > that conforms to the expected content type given in the schema. > > This obviously needs to be spec'ized to become real, but is it really > that simple? That's a nice trick which I think works, and works well for binary content. However, in LC337, the DAWG talks about HTML, plain text, RDF. Won't they be forced to declare say their RDF as Base64-encoded? <element name="output"> <complexType> <sequence> <element name="my-rdf" type="xsd:base64" xmime:expectedContentType="application/rdf+xml"/> </sequence> </complexType> </element> Cheers, Hugo -- Hugo Haas - W3C mailto:hugo@w3.org - http://www.w3.org/People/Hugo/
Received on Tuesday, 18 October 2005 16:07:46 UTC