users@wadl.java.net

Re: Resource class name customization

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Fri, 05 Oct 2007 12:16:49 -0400

On Oct 5, 2007, at 11:25 AM, Farrukh Najmi wrote:

> Assuming a resource with a URI template like:
>
> <resource id="CoolResource" path="Foo/{bar}/{burger}">
>
> The generated class is:
>
> FooBarBurger(String bar, String burger)
>
> This is a little awkward and counterintuitive.
>
> Perhaps the spec should say that if an id is specified for a
> resource then the generated resource class will be based on the id
> of the resource rather than its path.
>
> This would allow above resource to have a generated class of:
> CoolResource
>
> Would this be desirable?
>
I think it would be OK for wadl2java to do that (perhaps optionally)
but I don't think that is something that the WADL spec should define.
WADL is intended to be programming language independent so I wouldn't
want to get into the details of WADL->language binding there.

Marc.

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.