WADL and Dynamic Interfaces

 
It occurs to me that WADL needs some mechanism to indicate that a
particular request may have a variable number of arguments that can't be
discovered until runtime.  Consider the following resource definition:

  <resource name="orderSelector" path="/orders/{sub-selector}">
    <method href="#orderFetcher"/>
  </resource>

On the server, the {sub-selector} could ultimately be mapped to, say,
some named SOL subselect clause that requires some number of parameter
values (e.g., a date range, order-by column list, etc.)  

  /orders/by-date?start=2001&end=2006
  /orders/by-customer?name=smith
  /orders/by-store?id=BostonLoc2

If there is a static number of sub-selectors, these could be explicitly
detailed by concrete resource and method definitions with each parameter
explicitly defined.  But if new sub-select clauses can be added to (and
removed from) the system at runtime, there is no mechanism in WADL to
capture the fact that the names and number of the parameters is
variable.

While the WADL could be generated at runtime, many of the stated use
cases are for more off-line scenarios.   

Perhaps some indicator could be defined to capture a variable number of
parameters:

  <method id="m1">
    <param name="p1"/>
    <param name="p2"/>
    <variable-params/>  <!-- a unknown number of other params -->
  </method>

Received on Thursday, 14 September 2006 15:02:16 UTC