- From: Eric van der Vlist <vdv@dyomedea.com>
- Date: Fri, 26 May 2006 10:49:39 +0200
- To: public-ws-desc-comments@w3.org
- Message-Id: <1148633379.19458.8.camel@localhost.localdomain>
Hi, My understanding of table 6-5 (http://www.w3.org/TR/wsdl20-adjuncts/#_http_serialization) is that all the whole instance is always transmitted when the input serialization is "application/xml". This seems to defeat a use case such as the following one: I wan to create a blog system conform to the REST principles. To create a new blog entry, I POST the following item to a generic location (for instance http://eric.van-der-vlist.com/blog/): +++++++++++++++++++++++++++++++++++++++++++++++++++++++ POST /blog/ HTTP/1.1 Authorization: Basic XXXsaXN0OmVpbGF0XXX= Host: eric.van-der-vlist.com Content-Length: XXX Content-Type: application/xml <item> <title>Validatting microformats</title> <description> <p>This blog entry is folowing up...</p> .../... </description> </titem> +++++++++++++++++++++++++++++++++++++++++++++++++++++++ The server might answer something such a: +++++++++++++++++++++++++++++++++++++++++++++++++++++++ HTTP/1.1 201 Created Date: Wed, 24 May 2006 16:26:52 GMT Location: http://eric.van-der-vlist.com/blog/2277_Validatting_microformats Content-Length: XXX Content-Type: application/xml <item id="2277"> <title>Validatting microformats</title> <description> <p>This blog entry is folowing up...</p> .../... </description> </titem> +++++++++++++++++++++++++++++++++++++++++++++++++++++++ I notice the typo in the first paragraph and update the item using a PUT at http://eric.van-der-vlist.com/blog/2277_Validatting_microformats: +++++++++++++++++++++++++++++++++++++++++++++++++++++++ PUT /blog//2277_Validatting_microformats HTTP/1.1 Authorization: Basic XXXsaXN0OmVpbGF0XXX= Host: eric.van-der-vlist.com Content-Length: XXX Content-Type: application/xml <item id="2277"> <title>Validatting microformats</title> <description> <p>This blog entry is following up...</p> .../... </description> </titem> +++++++++++++++++++++++++++++++++++++++++++++++++++++++ and the server returns: +++++++++++++++++++++++++++++++++++++++++++++++++++++++ HTTP/1.1 204 No Content Date: Wed, 24 May 2006 14:05:30 GMT +++++++++++++++++++++++++++++++++++++++++++++++++++++++ I notice the typo in the title and update the item using a PUT at http://eric.van-der-vlist.com/blog/2277_Validatting_microformats: +++++++++++++++++++++++++++++++++++++++++++++++++++++++ PUT /blog//2277_Validatting_microformats HTTP/1.1 Authorization: Basic XXXsaXN0OmVpbGF0XXX= Host: eric.van-der-vlist.com Content-Length: XXX Content-Type: application/xml <item id="2277"> <title>Validating microformats</title> <description> <p>This blog entry is following up...</p> .../... </description> </titem> +++++++++++++++++++++++++++++++++++++++++++++++++++++++ and the server returns: +++++++++++++++++++++++++++++++++++++++++++++++++++++++ HTTP/1.1 204 No Content Date: Wed, 24 May 2006 14:05:45 GMT +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Of course, cool URIs don't change and the URI of this post is still http://eric.van-der-vlist.com/blog/2277_Validatting_microformats even if the title has changed. This scenario creates several issues with the current Working Draft: * In the first PUT, the rule to derive the URI from the instance should be clever enough to map @id="2277" and <title>Validating microformats</title> into "2277_Validatting_microformats". This is already quite a challenge knowing that other blog systems migth want to follow other rules and map the same value into "2277%20Validatting%20microformats" or "2277+Validatting +microformats" or "2277ValidattingMicroformats" or whatever. * In the second put we definitely run out of chance since the information that has been used to generate the URI is no longer in the instance document. A suggestion to solve this problem would be to define in the WSDL document the input instance as: <whateverRoot> <location>2277_Validatting_microformats</location> <item id="2277"> <title>Validating microformats</title> <description> <p>This blog entry is following up...</p> .../... </description> </titem> </whateverRoot> And to add an HTTP binding attribute to give the XPath expression (that could be a subset of XPath) of what needs to be serialized as XML. The binding operation could be something such as: <operation ref="tns:retrieveByReservationQuery" whttp:location="{location}" whttp:method="PUT" whttp:inputSerialization="application/xml" whttp:inputPayload="/whateverRoot/item" /> ~~~~~~ The second comment I have is that it should be possible to "follow an hyperlink" and give an absolute URI in the whttp:location attribute. There seems to be no reason why the URIs should follow a predefined hierarchical structure and in this blog system example, we could imagine a central server powering different domains. The first POST could be at http://van-der-vlist.com/blog/ and the server could determine from my credentials a specific (and dynamic) domain name for the location of the blog entry (http://eric.van-der-vlist.com/blog/2277_Validatting_microformats). My understanding of the current WD is that whttp:location="{location}" wouldn't work if location was containing an absolute URI. Couldn't that behaviour be changed? ~~~~~~ The question I have is about the "URIPath Feedback Requested" in the WD: "The inclusion of elements of the instance data in the path of the request URI, whilst supported by WSDL 1.1, is not supported by XForms 1.0. Hence this mechanism MAY be removed in a future version of this specification. Feedback on this issue from users and implementers is highly encouraged." Although the mechanism isn't supported by XForms as such, I am wondering if it isn't need to support relative URIs in XForms submissions. Imagine we have a blog system that is more conform to the current WD and that the item is available at http://eric.van-der-vlist.com/blog/2277. This should allow to express whttp:location as "{@id}" (BTW, are attributes supported in these expression?). Using content negotiation the server could send an XHTML/XForms document to the user agents that support it and the XForm if the XForms submissions in this document use relative URIs, the value of the /item/@id attribute would be part of the URI even if XForms isn't aware of that fact. Isn't it a case where XForms would kind of implicitly support these URIPath mechanism? Thanks for your answers. Eric -- GPG-PGP: 2A528005 Curious about Relax NG? Read my book online. http://books.xmlschemata.org/relaxng/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------
Received on Friday, 26 May 2006 08:49:49 UTC