You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by Luciano Resende <lu...@gmail.com> on 2010/10/21 19:06:13 UTC

WINK-313 - Where we are with WADL support ?

Where we are with WADL support in Wink ? I noticed WINK-33 is assigned
to Bryant Luk, so before I duplicate efforts and start adding this I'd
like to check if Bryant or anybody else have already started and is
almost done with this.

Thanks in advance

-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Re: WINK-313 - Where we are with WADL support ?

Posted by Luciano Resende <lu...@gmail.com>.
On Thu, Oct 21, 2010 at 11:04 AM, Bryant Luk <br...@gmail.com> wrote:
> Hi Luciano,
>
> Currently working on the WADL generator code in wink-common under the
> org.apache.wink.common.model.wadl package a bit.  Originally I
> intended to just have users do something like:
>
> @Path("servicedoc")
> public class MyServiceDoc {
>   @Context
>   Application app;
>
>    @GET (or @OPTIONS)
>    public org.apache.wink.common.model.wadl.Application get() {
>       return new WADLGenerator.process(app.getClasses());
>    }
> }
>
> Certainly if you have some thoughts or a different code path, I think
> everyone would be happy to see it.
>

Cool, this works with minimal tweaks....

@Path("servicedoc")
public class ServiceDoc {
  @Context
  Application app;

   @GET
   @Produces(MediaType.APPLICATION_XML)
   public org.apache.wink.common.model.wadl.Application get() {
       WADLGenerator generator = new WADLGenerator();
      return generator.generate(app.getClasses());
   }
}

I want to be able to automatically get WADL for any resource,
something like http://.../resource?wadl.
Maybe a handler could help on getting this automated, I'll play with
this in the next couple days...

-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Re: WINK-313 - Where we are with WADL support ?

Posted by Bryant Luk <br...@gmail.com>.
Hi Luciano,

Currently working on the WADL generator code in wink-common under the
org.apache.wink.common.model.wadl package a bit.  Originally I
intended to just have users do something like:

@Path("servicedoc")
public class MyServiceDoc {
   @Context
   Application app;

    @GET (or @OPTIONS)
    public org.apache.wink.common.model.wadl.Application get() {
       return new WADLGenerator.process(app.getClasses());
    }
}

Certainly if you have some thoughts or a different code path, I think
everyone would be happy to see it.

On Thu, Oct 21, 2010 at 12:06 PM, Luciano Resende <lu...@gmail.com> wrote:
> Where we are with WADL support in Wink ? I noticed WINK-33 is assigned
> to Bryant Luk, so before I duplicate efforts and start adding this I'd
> like to check if Bryant or anybody else have already started and is
> almost done with this.
>
> Thanks in advance
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/
>

Re: WINK-313 - Where we are with WADL support ?

Posted by Nicholas Gallardo <ni...@yahoo.com>.
I think the base WADL generator is already in the repository.  There's some 
additional work to hook that up to an OPTIONS request that I believe Bryant has 
already prototyped.  


Here's a pointer to what's there:

http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/wadl/


-N



----- Original Message ----
From: Luciano Resende <lu...@gmail.com>
To: wink-dev@incubator.apache.org
Sent: Thu, October 21, 2010 12:06:13 PM
Subject: WINK-313 - Where we are with WADL support ?

Where we are with WADL support in Wink ? I noticed WINK-33 is assigned
to Bryant Luk, so before I duplicate efforts and start adding this I'd
like to check if Bryant or anybody else have already started and is
almost done with this.

Thanks in advance

-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/