users@jersey.java.net

Re: [Jersey] Problems generating wadl

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 10 Jul 2009 10:45:26 +0200

Hi,

Did you add JAXB to the class path?

See the following:

https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.3/jersey/dependencies.html

and search for "WADL".

Paul.

On Jul 10, 2009, at 12:19 AM, 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
>
> and when i hit with my browser as http://localhost:8080/services/HelloWorld/ping
> I get "pong". To generate the wadl for this when i hit it with
> http://localhost:8080/services/HelloWorld/application.wadl as
> mentioned it says resource not found. Am i missing something ?
>
> Thx