On 06/12/06, Alexander Johannesen <[EMAIL PROTECTED]> wrote: > > > > > > > Hi, > > On 12/6/06, Steve Jones <[EMAIL PROTECTED]> wrote: > > What is the media type for an invoice? > > Does it matter? If it comes back as a PDF, your only choice is to > print it, if it's a text file I guess you just read it, if it's an XML > application I guess you look at the DOCTYPE or the namespace of the > root element, and so forth.
So I have to guess what the structure of the invoice is and to guess which link goes to the customer and which link goes to the supplier and which link goes to each of the various products? > If you view with a browser, you probably > view the document, but if you're an application, then you can do a > number of things with it. An invoice is probably an application of > XML, in which you inspect the XML to see if you understand the schema > it was written in. If it was, then you're good to go. So you have to communicate the XML Schema associated with the URI before someone uses it. Fine, how is this normally done for REST? > > > How do I know how to get from invoice to customer? > > How do you do that on any other stack, or any other technology? Well with a WSDL I get given the Schemas upfront and these are consumed into the tools so I can see these within my IDE. > > > I'm getting really confused as to how a link traversals meaning is > > documented via a media type, unless of course you create a whole new > > ontology of media types for every project. > > When you browse a URL, what does it mean? When you use a SOAP service, > what does it mean? When communicating on this mailing-list, what does > it mean? I think you're stretching the term "meaning" here ... :) No I'm not. When I use a SOAP service I have the name of the SOAP endpoint and the port as well as the schemas that define the documents. There is the concept of this being published upfront in a standard way, with Service names and ports having sensible and descriptive names. > > The *meaning* of a URL is whatever we make it. There's guidelines > which says we should make URL's as meaningful as possible, but there's > no requirement to do so. But if we can, we should, just with any other > URL out there; REST builds on some nice human principles of > exploration that I find very attractive. Hang on you said it was Opaque and now saying it should be meaningful.... which is it? > > > > If you have a URI and no clue what to do...do a GET and follow your > > > nose[1]. > > > > Sounds like debugging via printf on an application someone else wrote.... > > Sounds like you're trolling... Not at all, having an approach which is "call it and see" isn't really viable commercially. > > Alex > -- > "Ultimately, all things are known because you want to believe you know." > - Frank Herbert > __ http://shelter.nu/ __________________________________________________ >
