On May 21, 2007, at 6:54 PM, Joe Pallas wrote:
>> > Even the Atom example ultimately describes a single-
>> > endpoint service.
>>
>> The Atom example shows how to describe a particular instance of an
>> Atom service using the technique noted above to define the components
>> of the Atom Publishing Protocol separately from a concrete
>> instantiation of the protocol.
>
> Right, but in the end it describes one and only one concrete
> instantiation of the protocol. That means every single Atom
> service in the entire world-wide web (a pretty big place, if you
> will) needs a separate WADL description, even if they are all
> identical except for the host and port.
>
Right, at some point you have bind a type of service to a concrete
URI, there's no way round that. Currently you can do that with a set
of WADL documents, one per instance. Your suggestion would allow a
single WADL document plus a set of parameter values, one set of
values per instance. I guess my question is how would a particular
instance of a service advertise what set of parameter values it
requires ?
>> > Would it make sense to allow the base URI to have parameters?
>>
>> It might, do you have a particular use-case in mind ?
>
> You betcha:
>
> <resources base="http://{servicehost}:{serviceport}/">
> <param name="servicehost" style="template" required="true" />
> <param name="serviceport" style="template"
> type="xsd:unsignedShort" default="80" />
> ...
> </resources>
>
> Suppose I want to use wadl2java to generate a client stub for a
> service, and that service isn't unique, but might be installed
> anywhere on the Internet. Then it seems I really need something
> like this, or I'll have to generated a new stub for every
> installation of the service.
>
An alternative would be for wadl2java to generate an additional
constructor that would let a client application set the base URI
dynamically. Would that cover your requirement ?
Thanks,
Marc.
---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.
- application/pkcs7-signature attachment: smime.p7s