users@jersey.java.net

Re: [Jersey] Problems generating wadl

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 10 Jul 2009 16:04:36 +0200

On Jul 10, 2009, at 3:49 PM, Marc Hadley wrote:

> On Jul 9, 2009, at 6:19 PM, vaidya nathan wrote:
>
>> I read through the documentation in http://wikis.sun.com/display/Jersey/WADL
>> for generating the wadl and tried it out but for some reason it
>> didnt work. i am using jersey 1.0.3 and curl to make http
>> requests(Tried with the browser too). So i have a simple
>> HelloWorldResource
>>
>> @Path("/HelloWorld")
>> public class HellowWorldResource {
>>
>> @GET
>> @Produces("text/plain")
>> @Path("ping")
>> public String ping() {
>> System.out.println("Ping pong is fun");
>> return "pong";
>> }
>>
>>
>> }
>>
>> Alternatively with OPTIONS
>> $curl -XOPTIONS http://localhost:8080/services/HelloWorld/application.wadl
>>
> Try
>
> curl -XOPTIONS http://localhost:8080/services/HelloWorld
>
> and
>
> curl http://localhost:8080/services/application.wadl
>
> The application.wadl is relative to the root application context and
> there's no need to add application.wadl to get the WADL for a
> specific resource.
>

Doh! of course :-)

Paul.